TsukiNi22/ai-utils:一套基于个人习惯的 Claude Code 技能与路由器仓库
TsukiNi22/ai-utils
TsukiNi22/ai-utils 是一个为 Claude Code 打造的技能仓库,通过 setup.sh 统一安装 routers、skills、tools 和 global context 四类内容。
AI skills, routers, tools and context based on my work.
This repository holds Claude Code skills
built from my own projects and habits. Each skill teaches the assistant how I work (code style,
file layout, tooling), so that what it generates looks like something I wrote myself.
Four kinds of things, all installed by the same setup.sh: the routers, the
skills, the tools and the global context.
Routers
Skills invoked manually that look at the request, the project and the language, then load the right
skills below by themselves. /dev is enough most of the time.
| Router | Loads |
|---|---|
/dev |
everything below, depending on the context (global development entry point) |
/cpp |
cpp-project, cpp-class, cpp-style, cpp-comments, cmake-style, cpp-tests, audit-bugs, audit-quality, libutils, libutils-exception, libutils-install, libutils-setup, coverage, benchmark, ci-cd |
/python |
python-project, python-class, python-style, python-comments, tests, ci-cd, benchmark |
/setup-project |
a whole new project in order: architecture (cpp-project / python-project / coding-style), base unit tests (cpp-tests / tests), license, git-conventions + pre-commit, ci-cd, readme-style, then a quick architecture audit |
/git |
git-conventions, ci-cd, pre-commit |
/doc |
readme-style, html-doc, html-style, explain-doc, report, git-conventions (CHANGELOG), comments, cpp-comments |
/style |
cpp-style, python-style, python-comments, coding-style, cpp-comments, comments, cmake-style (by file type), audit-quality |
/legal |
license, audit-deps (and the future legal skills) |
/audit |
asks which audits to run (checklist: audit-bugs, audit-quality, audit-deps, coverage, benchmark; coverage and benchmark checked and run automatically) and the report format, runs them and writes a summary report in audit/ |
Graph explorer
https://tsukini22.github.io/ai-utils/ (branch gh-pages) - the
project graph of html-doc for any public GitHub or GitLab repository: give its link
(owner/repo, a GitHub / GitLab URL, a branch with /tree/<branch>) and the page reads its sources in the browser to
draw its files, classes, functions, calls, tests and packages in 2D / 3D, plus the execution flow, inheritance tree and
flame graph diagrams. C / C++, Python, JS / TS / web, Java / Kotlin, C#, Go, Rust, Zig, Swift, Dart, PHP, Ruby, Lua,
Julia, Elixir, Haskell, Objective-C and shell are read. The link stays editable (and ?repo=owner/name opens one
directly); it is remembered by the browser until Ctrl + Shift + R (forgets it and reloads the page).
Skills
| Skill | Description |
|---|---|
cpp-class |
Sets up a C++20 architecture / new .hpp & .cpp files (interface I*, abstract A*, class, template, Type/Define, family headers, main.cpp entry point) with the namespaces, the Xartania header and empty bodies only (never the logic), picks libutils attributes or standard [[...]] ones and registers the sources in the CMakeLists.txt. Requires cpp-style & cpp-comments. |
cpp-style |
My C++ coding style: naming, indentation, braces, spacing, loops, switch, lambdas, const correctness, attributes. |
coding-style |
My coding style for every language other than C++ (Python, shell, Lua, JS/TS, C, Rust/Go, YAML/JSON), derived from cpp-style and my real scripts. |
cpp-comments |
How I comment C++ code: section separators, /* group */ labels, aligned trailing comments, no Doxygen. |
git-conventions |
Commit messages type(scope): message, CI keywords, tags, GitHub releases, CHANGELOG, branches (main alone when solo; main/dev/sub//feat//fix/ in a team) and PRs (CHANGELOG-style body, gh assignee/labels), no AI attribution. |
readme-style |
README / Markdown docs structure: Table of Contents, Dependencies, Packages, Quick Setup, Usage, GitHub callouts, tables. |
wiki-style |
GitHub wiki of a project, from the libutils wiki: the <repo>.wiki.git repository, Home (version stamp, pages, dependencies), _Sidebar / _Footer, guide pages, the Sections / Tools-Preview overviews and one page per section (opening callout, Table of Contents, tables of members, Example, Errors); templates and scripts/check_wiki.py (links, anchors, sidebar coverage, code fences, tables). |
html-doc |
One uniform style for the HTML documentation: an optional user guide, the technical documentation and an interactive 2D/3D project graph of any common stack (C / C++, Python, JS / TS / web, Java, C#, Go, Rust, PHP, Ruby) with execution / inheritance / flame diagrams (filters by category/group/relation, rebuilt from the GitHub repository with an update button), all static self-contained pages with a sun/moon theme button. |
html-style |
My visual style for any HTML page (from html-doc): light / dark color tokens, system fonts and type scale, layout, components, SVG diagram classes, sun/moon and EN/FR switches, rules (self-contained, WCAG contrast); scripts/new_page.py builds a self-contained page, scripts/check_style.py checks a page or a palette (tokens, contrast, unreadable inherited colors, external resources). |
explain-doc |
Explanation pages (how something works) in two levels switched in place, Simple (analogies, plain words, numbers) and Technical (terms, formulas, complexity, edge cases, code, sources), with SVG diagrams, step-by-step animations, MathML formulas, interactive playgrounds / simulations checking the formulas, quizzes and a glossary. Built on html-style. |
cpp-project |
Sets up a new C++ project from cpp_project_template: renaming, binary / packaged binary / .a / .so / header-only, libutils or not, exceptions, GTest, CI/CD workflows (build check or full packages + gh-pages mirror), install script, README/CHANGELOG/docs, using the other skills. |
cmake-style |
CMakeLists.txt in my style: section order, explicit sources, Debug/Asan/Optimized modes, release targets, GTest tests, install + find_package config, CPack RPM/DEB stable/pre channels, with app/lib/tests templates. |
cpp-tests |
C++ unit tests like libutils: GoogleTest setup (CMake, CI, unit_tests), one test file per module, isolation of the blocking cases, known bugs kept as failing tests, scripts/untested.py to list what is never tested. |
tests |
Unit tests for any language: detects the existing framework or asks which one to use, then setup, tests, CI (defers to cpp-tests for C++). |
comments |
My comment style for every language (C, C++, CMake, Makefile, shell, Python, Lua, YAML, Markdown) and which file header goes where. |
audit-bugs |
Bug / UB audit loop (sanitizers, tests, static tools, code review, verification of each finding), single agent or subagents on request, fixes only after confirmation. |
audit-quality |
Cleanliness / conventions audit of a project (scripts/collect.py metrics + review against the style skills) delivered as a PDF report. |
report |
Reports in my style as Markdown and/or PDF (format asked: both recommended), English by default (Markdown -> WeasyPrint, A4, Noto, navy title rule, tables and callouts) with scripts/md2pdf.py. |
license |
Finds the license matching the needs (comparison matrix), negotiates the close ones, fetches the official text, replaces the current LICENSE only after confirmation, checks dependencies compatibility. |
audit-deps |
Dependencies (direct + transitive): licenses to credit, copyleft / non-commercial / paid / unknown ones, THIRD_PARTY_NOTICES generation, and known vulnerabilities / compromised versions (OSV, dnf, GitHub advisories), as a PDF report. |
python-style |
My Python style, measured on my scripts (libutils cmake/scripts, MAGIC): header, ##### sections #####, checked imports with a # Used for each, __main__ guards, const.py with frozen dataclasses, exit codes, errors on stderr, type hints; checked by the PY-* rules of xstyle. |
python-class |
Python equivalent of cpp-class: scaffolds class / abstract / tool / module / exception / const / test files (scripts/new_file.py) with the header, sections, checked imports, typed signatures and empty bodies only, the parent import and the __all__ of a package. |
python-comments |
Python equivalent of cpp-comments: ##### Section ##### banners, import labels, a # Used for on every import, aligned trailing comments, block comments, short indented docstrings, never Sphinx fields. |
python-project |
New Python project: script, application in the MAGIC layout (main.py / app.py / const.py, Class/, tool/, data/) or installable package (src layout, single source version, main() returning the exit code, console command, pytest), generated by scripts/new_project.py. |
ci-cd |
CI and CD of a GitHub repository: always asks what to run (build, tests, xstyle style check, coverage / GitHub release from the CHANGELOG, RPM/DEB packages, container image, PyPI, docs, dispatch), my Docker images first (ghcr.io/tsukini22/*) or the smallest official one, my conventions, a missing tool added to the docker-image repository with a local commit. Used by cpp-project / python-project on GitHub repositories. |
pre-commit |
xstyle pre-commit hook of a repository: asks every option (fail on major / warn on minor by default, staged lines, safe fixes, missing xstyle = warning only, local or shared .githooks), keeps an existing hook, installs the missing tools on request, demo repository to try it (scripts/demo_repo.sh); also ./setup.sh hook from the repository. |
rtk |
Token-minimal text for an AI: compacts a text / output / log (legend once, one record per line, shared values written once, one summary line; scripts/compact.py first pass) and designs / implements an --rtk mode on a program or script, like xstyle --rtk. |
benchmark |
Profiling of the current program (perf stat / record, hyperfine, callgrind, heaptrack, flame graph; missing tools installed only after a yes): hot functions, why they are slow, quick wins vs complex changes with their gain, PDF report, optional before / after. |
coverage |
Test coverage of a cpp-tests project (clang / llvm-cov in a copy): per file, functions never called, ranges never run; then tests written module by module until it stops growing, and always the question of a report on what is still missing. |
libutils |
Reference of my library libutils: every section, header and public API generated from a recorded version/commit (reference/VERSION.md), integration and conventions, plus scripts/update.sh to see what changed since that commit and regenerate. |
libutils-exception |
libutils exceptions: classes, codes, throw/catch patterns, and how to add new exception codes to a project (JSON, generator script, CMake block). Requires libutils. |
libutils-install |
Installs / updates / removes libutils on the computer by itself from the OS (dnf, apt, or build from the sources), last version through libutils-pre, debug/asan variants, mirror setup, /usr/local shadowing check. |
libutils-setup |
Adds libutils to the current project: find_package/utils::utils in the CMake and optionally the custom exceptions (JSON, scripts, generation block), installing libutils first if needed. |
Everything is based on my own work, mainly libutils.
Tools
Programs stored next to the skills they enforce, built and installed by the same setup.sh (binary in
~/.local/bin, --prefix <dir> to change it), and the web tools published on the gh-pages branch.
| Tool | Description |
|---|---|
xstyle |
C++20 / libutils checker and fixer of my coding style (C++ first, then Python, shell, Rust and the generic rules): issues with file, line, hyperlink, rule and proposed fix, summary by severity (unforgivable / major / minor / negligible) and by rule, --fix for every fixable rule or only some codes, files or directories, libutils rules (sections, attributes, deprecated names, code libutils already gives) when libutils is installed and used, CMake and comment layout rules, --diff / --staged (changed lines only, pre-commit hook), --commit of the fixes, --libutils-check, bash / zsh / fish completion. Requires libutils, clang++ and CMake. |
claude-cluster |
Several Claude Code sessions in parallel (one or more per project) from one terminal (FTXUI) or window (Qt6), list / grid / tabs: per session the transcript, loaded skills, git graph and diff, tokens (last prompt, current, total), context, cost and limits, live permissions; a global session drives the others through its MCP server (spawn, prompts, permissions, modes, task queue, trash / restore, search, export) with its own system prompt and Remote Control; other agents too (Ollama local, Anthropic- / OpenAI-compatible endpoints, opencode, Codex) with auth login / logout; voice (push-to-talk, always, or a wake phrase like "ok claude"); headless commands (--rtk). Requires libutils, nlohmann/json, toml++ (Qt6 optional). |
| Graph explorer | Web page (branch gh-pages, nothing to install): the project graph of html-doc for any public GitHub / GitLab repository (?repo=owner/name), see Graph explorer. |
Context
The global / default context of Claude Code: what every session loads on my computers, not a skill. It lives in
context/ and is installed by the same setup.sh (install / remove / status / list,
name context), as symlinks in ~/.claude and ~/.local/bin: the files it replaces are saved in
~/.claude/backups/context/ and restored by remove, the hooks are merged in ~/.claude/settings.json without
touching the other settings.
| Item | Installed as | Content |
|---|---|---|
claude/CLAUDE.md |
~/.claude/CLAUDE.md |
Global instructions: git rules, language of the outputs, shell aliases, subagents cost, root access without TTY (graphical sudo), xstyle --rtk |
claude/RTK.md |
~/.claude/RTK.md |
How to read the command output condensed by rtk (imported by CLAUDE.md) |
claude/hooks/session-aliases.sh |
~/.claude/hooks/session-aliases.sh |
SessionStart hook: gives the zsh aliases to Claude (and the ones that lock the session) |
claude/settings.hooks.json |
merged in ~/.claude/settings.json |
Hooks: SessionStart aliases + PreToolUse rtk hook claude |
bin/sudo-askpass |
~/.local/bin/sudo-askpass |
Graphical password prompt (zenity) for sudo -A when there is no terminal |
Note
The context is global: install --project never installs it. --no-context leaves it aside, --no-rtk /
--no-hooks are given to it, ./setup.sh context <command> runs only the context (details in
context/README.md). rtk is installed with its official installer when it is missing.
It is not in the plugin marketplace (a plugin can't write ~/.claude/CLAUDE.md).
Installation
Quick Setup - 1 (without cloning)
Run the setup script directly: it clones (or updates) the repository into ~/.local/share/tsukini-skills
(SKILLS_HOME to change it) and links the skills and the context from there, nothing to clone or clean by hand.
curl -fsSL https://raw.githubusercontent.com/TsukiNi22/ai-utils/main/setup.sh | bash -s -- installor with wget:
wget -qO- https://raw.githubusercontent.com/TsukiNi22/ai-utils/main/setup.sh | bash -s -- installEvery command works the same way, arguments are given after bash -s --:
curl -fsSL https://raw.githubusercontent.com/TsukiNi22/ai-utils/main/setup.sh | bash -s -- install cpp-class # only one skill (+ its requirements) curl -fsSL https://raw.githubusercontent.com/TsukiNi22/ai-utils/main/setup.sh | bash -s -- update # pull the last version curl -fsSL https://raw.githubusercontent.com/TsukiNi22/ai-utils/main/setup.sh | bash -s -- remove --purge # remove everything (skills, tools, context) and the clone
Note
Requires git and bash. Each run updates the managed clone first (fast-forward only).
Quick Setup - 2 (from a clone)
git clone git@github.com:TsukiNi22/ai-utils.git cd ai-utils ./setup.sh install # every skill in ~/.claude/skills (symlinks), the tools and the context
Commands
./setup.sh list # available skills, tools and context ./setup.sh status # what is installed (skills, tools, context) ./setup.sh install cpp-class # only one skill (and the skills it requires) ./setup.sh install xstyle # only one tool (built with CMake, installed in ~/.local/bin, + bash / zsh / fish completion) ./setup.sh install xstyle --prefix /usr/local ./setup.sh install context # only the context (CLAUDE.md, RTK.md, hooks, sudo-askpass), --no-rtk / --no-hooks ./setup.sh install --no-context # everything but the context ./setup.sh install --project ~/my/project # in <project>/.claude/skills instead ./setup.sh install --copy # copy instead of symlink ./setup.sh update # git pull of the repository (+ rebuild of the installed tools) ./setup.sh remove # remove every skill, tool and the context of this repo ./setup.sh remove cpp-class # remove only one (`remove context` restores the replaced files) ./setup.sh remove --purge # (curl/wget mode) also delete the managed clone ./setup.sh hook # xstyle pre-commit hook in the git repository of the current directory ./setup.sh hook --fail-on minor --shared # options (git/pre-commit/scripts/install_hook.sh --help), hook status | remove
By default the skills are symlinked: an update (or a local edit) is used right away,
no need to reinstall. remove only deletes skills that come from this repository
(use --force otherwise).
Plugin marketplace (Claude Code)
The repository is also a Claude Code plugin marketplace (.claude-plugin/marketplace.json),
handy on another machine or in a Claude Code on the web session (no setup.sh needed):
/plugin marketplace add TsukiNi22/ai-utils
/plugin install cpp-skills@tsukini-skills
/plugin install dev@tsukini-skills
| Plugin | Skills |
|---|---|
cpp-skills |
cpp-project, cpp-class, cpp-style, cpp-comments, cmake-style |
libutils-skills |
libutils, libutils-exception, libutils-install, libutils-setup |
doc-skills |
readme-style, wiki-style, html-doc, html-style, explain-doc, report |
git-skills |
git-conventions, ci-cd, pre-commit |
ai-skills |
rtk |
style-skills |
coding-style, comments |
python-skills |
python-project, python-class, python-style, python-comments |
test-skills |
tests, cpp-tests, coverage |
audit-skills |
audit-bugs, audit-quality, audit-deps, benchmark |
legal-skills |
license |
dev, cpp, python, setup-project, doc, git, style, legal, audit |
the routers (/dev, /cpp...) |
The skills of a plugin are named <plugin>:<skill> (e.g. cpp-skills:cpp-class); each plugin carries the whole
repository, so a skill finds the scripts of the others. In a cloud session the marketplace has to be added again in
each session; /plugin marketplace update tsukini-skills gets the new versions.
claude.ai
The same skills in the claude.ai chat (web, desktop, mobile): python3 claude-ai/build.py builds one archive per
skill to upload in Customize > Skills, and claude-ai/preferences.md is the
CLAUDE.md adapted to the chat, to paste in the personal preferences. Details: claude-ai/README.md.
Usage
Once installed, the skill is used automatically when relevant
(ex: "create a Timer class in utils::system", "write the commit message"),
or explicitly with /<skill> (/cpp-class, /git-conventions...).
A skill can require other ones (<skill>/requires.txt): ./setup.sh install <skill> installs them too.
Layout
routers/ dev, cpp, python, setup-project, git, doc, style, legal, audit (manual /commands that load the skills below)
cpp/ cpp-project, cpp-class, cpp-style, cpp-comments, cmake-style
python/ python-project, python-class, python-style, python-comments
libutils/ libutils, libutils-exception, libutils-install, libutils-setup
tests/ tests, cpp-tests, coverage
style/ coding-style, comments, xstyle (tool)
docs/ readme-style, wiki-style, html-doc, html-style, explain-doc, report
git/ git-conventions, ci-cd, pre-commit
audit/ audit-bugs, audit-quality, audit-deps, benchmark
legal/ license
ai/ rtk, claude-cluster (tool)
context/ global context of Claude Code (CLAUDE.md, RTK.md, hooks, sudo-askpass), installed by setup.sh
Every skill is <category>/<skill>/ and is installed flat as ~/.claude/skills/<skill> (the category is only for
the repository):
<category>/<skill>/
├── SKILL.md # instructions loaded by the assistant
├── requires.txt # other skills needed (optional, installed with it)
├── reference/ # detailed rules, read on demand
├── templates/ # file templates
├── examples/ # real files used as ground truth
└── scripts/ # helpers called by the skill
Credits
cpp-class/scripts/fonts/ansi_shadow.flf: ANSI Shadow FIGlet font, as distributed with
pyfiglet (MIT).
来源:GitHub · github.com