Repository navigation
Claude Code Integration
The hooks, the guideline blocks, the Istarnova building blocks and the shared skills.
The Claude Code hooks, pointed at from each project's .claude/settings.json:
"command": "d=\"${DEVSCRIPTS:-$HOME/dev/tools/devscripts}\"; [ -d \"$d/hooks\" ] || d=\"$CLAUDE_PROJECT_DIR/.devscripts\"; bash \"$d/hooks/prefer-repo-scripts.sh\""No copy, so no drift; the checkout is found as the shims find it. They locate the repository through
CLAUDE_PROJECT_DIR.
install.py --claude enters them, chosen like the skills (HOOKS in install.py), and only ever adds:
a hook the file already names, every other key and the project's own hooks stay as they are.
| Hook | Entered for |
|---|---|
no-cd-into-repo-root.sh, prefer-repo-scripts.sh, no-decorative-comments.sh
|
every project |
load-the-skill.sh |
a project with a .claude/skill-map
|
no-direct-logger.sh |
[dotnet] |
prefer-localized-grid.sh |
[istarnova] |
The one thing that differs per project is which skill covers which files, and that is read from the project's own
.claude/skill-map: one <glob> <skill> per line for a folder, and ~<regex> <skill> (no spaces in
the regex) for what an edit writes — logging and JSON are done in any file, so no folder names them.
Text files (.md, .json, .txt) are skipped for the content lines. Each hook has a .test.sh
beside it; run them after touching one.
prefer-localized-grid.sh refuses a raw <FluentDataGrid> in a .razor file, but only in a project with an
[istarnova] block (below): the raw grid draws its menus, empty message and paginator in English.
A skill explains how to use something; it does not set the rules of a project. Those are in CLAUDE.md,
and most of them are the same for every project of one kind. They live here as one block per kind, and a
project's .claude/CLAUDE.md imports the ones it gets:
@~/dev/tools/devscripts/claude/base.md
@~/dev/tools/devscripts/claude/rust.md
Claude Code expands such a line, so this is a reference and not a copy: a rule is changed here once. The path is outside the repository, so Claude Code asks once per project whether it may load the files.
| Block | Imported for |
|---|---|
base.md |
every project |
rust.md, cpp.md, dotnet.md, php.md, web.md
|
the project.toml block of that name |
kde.md |
a CMakeLists.txt that asks for KF6
|
blazor.md |
[istarnova] |
install.py --claude writes the file when there is none, with a section for what holds in that project
only, and never touches that section again. A later run adds the import for a block enabled since. A
CLAUDE.md written by hand, with no such import, is kept as it is; the summary names the lines it could
add. A new kind of project is a new block here and an entry in CLAUDE_BLOCKS in install.py.
Istarnova is a .NET library whose Blazor part holds the EF Core
foundation, the circuit state, the localized grids, the navigation and the hosting pieces several applications
share (Istarnova.EfCore, Istarnova.Blazor, Istarnova.Blazor.FluentUI, Istarnova.AspNetCore). A project
that uses them says so:
[istarnova]
raw_grid_baseline = 0 # how many raw FluentDataGrid `dotnet.py verify` tolerates; zero unless said otherwiseThat one block turns on, for the project:
- the skills
blazor-ui(withreferences/),data-layerand, through[dotnet],logging- written byinstall.py --skills, each with the project's.claude/skill-extras/<name>.mdappended - a default
.claude/skill-mapfor the hooks' doorbell, when the project has none (plus the localization lines if it has[localization]) - the
prefer-localized-grid.shhook, once.claude/settings.jsonpoints at it - the raw-grid count in
dotnet.py verify(--no-istarnova-checkskips it)
What is specific to a project - its schemas, how it opens dialogs, whether migrations are committed - goes in the extras, never into the shared skill.
The half of a skill that is about the workflow rather than about one codebase. install.py --skills
copies each one into the project's .claude/skills/ with the project's own
.claude/skill-extras/<name>.md appended after a ---.
So: edit the shared skill here, or the project's extras file. Never
.claude/skills/*/SKILL.md in a project — that file is generated and the next --skills run
overwrites it.
A file under references/ is different: it has no extras file. --skills replaces it only
while it is what the last run wrote (the digest is in .claude/skills/.installed.json, committed
with the project). A reference the project changed, or one with no record yet, is kept and named
in the summary; --force replaces it. The project text then belongs in the shared skill if it is
general, and stays a deliberate local edit if it is not. python3 install.test.py checks this.
A skill can be gated on a project.toml block, through SKILL_BLOCKS in install.py, the same
way a script is. localization needs [localization] and i18n needs [i18n], so no project gets
both and a project gets neither unless it localizes. This is not tidiness: localization states
that every .resx is generated from JSON and must never be hand-edited, which in a gettext project
is four confident instructions about files that do not exist. A skill that does not apply is not
read sceptically — it is followed.
Gating only decides what a fresh --skills run writes. A skill installed before its gate existed
stays on disk until it is deleted.