setup
Verify and configure repo-fleet-hygiene for a consumer project. check inspects the optional .claude/repo-fleet-hygiene.conf read-only (presence, parse validity, path resolution); apply creates or updates it by adding bounded fleet roots, exact repositories, and remote-keyed canonical checkout overrides, preserving unrelated entries. Use when: 'set up repo fleet audit', 'is repo-fleet-hygiene configured', 'configure fleet roots', 'canonical repo override', 'dotfiles-manager checkout'. Re-runnable and safe.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 30
- Forks
- 7
01 前言 Front Matter
- description
- Verify and configure repo-fleet-hygiene for a consumer project. check inspects the optional .claude/repo-fleet-hygiene.conf read-only (presence, parse validity, path resolution); apply creates or updates it by adding bounded fleet roots, exact repositories, and remote-keyed canonical checkout overrides, preserving unrelated entries. Use when: 'set up repo fleet audit', 'is repo-fleet-hygiene configured', 'configure fleet roots', 'canonical repo override', 'dotfiles-manager checkout'. Re-runnable and safe.
- allowed-tools
- [ "Bash(${CLAUDE_SKILL_DIR}/scripts/setup-config.sh:*)" ]
- argument-hint
- [check|apply] [--config <path>] [--root <dir>]... [--repo <dir>]... [--skip <name>]...
- user-invocable
- true
- disable-model-invocation
- true
02 资源文件 3
- 参考文档evals/evals.json6.2 KB
- 脚本scripts/setup-config.sh4.3 KB
- 脚本scripts/setup-config.test.sh4.2 KB
03 SKILL.md 正文
Arguments. [check|apply] [--config <path>] [--root <dir>]... [--repo <dir>]... [--skip <name>].... Full form: [check|apply] [--config <path>] [--root <dir>]... [--repo <dir>]... [--canonical <github.com/owner/repo=path>]... [--ack-unavailable <github.com/owner/repo>]... [--skip <name>]... [--extend-skip <name>]... [--max-depth <1..12>]
Purpose
Verify and manage the audit's optional Git-format configuration. Setup owns only this file; it never
edits Claude Code settings, pluginConfigs, Git remotes, branches, worktrees, or the installed plugin.
The config file itself is optional to create. A /repo-fleet-hygiene:audit takes scope from a
CLI bare path / --root / --repo, or fleet.root / fleet.repo entries in a consumed config.
Absence of every config on the ladder is therefore INFO for check (nothing to validate yet); a
subsequent no-argument audit then follows its no-scope ladder and exits 3 only when no rung
resolves. Check-centric per the uniform setup contract
(docs/plugin-philosophy.md "Setup is explicit and repeatable" in the marketplace repository):
check inspects read-only; apply creates or updates the file, then re-runs check. No argument
or check runs the check; apply runs the check first, then the write. All non-interactive: when
the arguments fully specify the change, apply proceeds without prompting.
Default config path: ${CLAUDE_PROJECT_DIR}/.claude/repo-fleet-hygiene.conf. An explicit --config
may choose another path. Resolve relative roots/repos/canonical paths from the config file directory.
Scoping rule (state it in check/apply output): the audit consumes config through a ladder:
explicit --config, else the project-scoped default above, else the user-global
~/.claude/repo-fleet-hygiene.conf. A project-scoped config is therefore consumed only when the
audit runs with that same project directory; a fleet config meant to apply from every project
belongs at the user-global path (apply --config ~/.claude/repo-fleet-hygiene.conf). The audit
report header names which config (if any) was consumed.
Argument grammar
check | apply [--config <path>] [--root <dir>]... [--repo <dir>]...
[--canonical <github.com/owner/repo=path>]... [--ack-unavailable <github.com/owner/repo>]...
[--skip <name>]... [--extend-skip <name>]... [--max-depth <1..12>]
--max-depth writes [fleet] maxDepth; --skip writes repeatable [fleet] skip entries;
--extend-skip writes repeatable [fleet] skipAppend entries. This skill owns the config file
that carries them. See "Configuration grammar" below for the skip replace semantics, and state
them whenever you write a skip entry, because "extend" is the naive reading. An operator who
wants to add names to the defaults wants --extend-skip.
check (read-only)
The config file and the grammar below are the source of truth. Probe, report a PASS/FAIL/INFO table
with one remediation line per FAIL, and modify nothing. Do NOT run the collector. That is
/repo-fleet-hygiene:audit; check only validates the configuration the audit would consume, using
git config --file and read-only filesystem probes.
- Config presence. Resolve the config path (
--configor the default). Absent → INFO naming the full ladder: the audit next probes the user-global~/.claude/repo-fleet-hygiene.conf(report whether one exists there); with no config on the ladder and no scope argument, a bare/repo-fleet-hygiene:auditfollows the no-scope ladder in that skill.applyscaffolds a config only if the user wants bounded roots or overrides. - Parse validity. Present config:
git config --file "<path>" --list >/dev/null. A non-zero exit is FAIL with the parse error in the remediation line. Neversourcethe file. - Entry resolution. For each
[fleet] root/repoand each[canonical …] path, resolve it from the config directory and confirm the directory exists and (for roots/repos)git rev-parsesucceeds read-only. A referenced path that does not resolve is FAIL, naming the entry. maxDepth. Present and outside1..12is FAIL; absent is INFO (the audit's own default applies).- Canonical identity. INFO for each
[canonical "github.com/owner/repository"]entry: report the normalized key. Flag as FAIL only a key that is not a normalizablegithub.com/owner/repository. - Acknowledged identities. INFO listing each
fleet.ackUnavailableentry (normalized). FAIL any value that is not a normalizablegithub.com/owner/repository. - Discovery skip names. INFO listing each
fleet.skipandfleet.skipAppendentry. FAIL any value that is empty or contains a path separator (must be a bare directory name). Remind that any presentfleet.skipreplaces the audit default skip list rather than appending, whilefleet.skipAppendadds to whichever list is in effect. - Tracked-file pair (only when the config lives inside a git worktree, e.g. a project's
tracked
.claude/repo-fleet-hygiene.conf): resolve the worktree that owns the file (git -C "$(dirname -- "<path>")" rev-parse --show-toplevel) and run both probes there with a path relative to that toplevel:git -C "<toplevel>" check-ignore -v -- "<rel>"reports no match (a match is FAIL with the pattern, since teammates would never receive the config) ANDgit -C "<toplevel>" ls-files --error-unmatch -- "<rel>"exits 0 (non-zero is un-ignored but untracked; FAIL with "commit it to share with the team"). An explicit--configin another checkout is still that other worktree's file; do not run the pair against the current project's index. Skip both, saying so, when no owning worktree exists (user-global~/.claude/…or any path outside a repository). A git verdict there is meaningless.
apply (idempotent)
Run check, then create or update the config from the supplied arguments.
-
Parse only the declared argument grammar. Validate every root/repository/canonical path with read-only filesystem and
git rev-parsechecks. Normalize canonical keys togithub.com/owner/repository(lowercase host, case-preserving owner/name is acceptable). Validate--max-depthas an integer in1..12and write it as[fleet] maxDepth; this skill owns the file that carries it, so it must be settable here rather than by hand-editing. Validate each--ack-unavailablevalue as a normalizablegithub.com/owner/repository(no filesystem probe, the identity is expected to be inaccessible); write it as a repeatable[fleet] ackUnavailableentry, deduplicating case-insensitively against entries already present. Like roots/repos, apply is additive. Removing an acknowledgment is a manual edit of the consumer's own config file. Validate each--skipvalue as a bare directory name (reject empty and any path separator); write it as a repeatable[fleet] skipentry, deduplicating exact matches against entries already present. State the replace semantics from "Configuration grammar" when writing. Validate each--extend-skipvalue the same way and write it as a repeatable[fleet] skipAppendentry, deduplicating exact matches. Removing a skip entry is a manual edit. -
If the config exists, read it with
git config --file <path> --list --show-origin. Preserve every unrelated entry. Never source it. -
State the proposed additions/updates before writing. With complete arguments, proceed non-interactively; otherwise ask only for the missing values. An empty invocation may create the minimal current-project config:
[fleet] repo = .. maxDepth = 5(
..is relative to.claude/and therefore names${CLAUDE_PROJECT_DIR}.) -
Write
--root,--repo,--skip,--extend-skip, and--max-depthby calling the bundled script, never by hand-editing the file:${CLAUDE_SKILL_DIR}/scripts/setup-config.sh apply [--config <path>] [--project-dir <dir>] [--root <dir>]... [--repo <dir>]... [--skip <name>]... [--extend-skip <name>]... [--max-depth <n>]It validates the same rules as step 1, writes each entry with
git config --file <path> --addafter an exact-match check (a repeated run reports "already configured" and changes nothing), preserves comments and unrelated entries, creates the parent directory, and refuses a symlink target. It exits 2 on a validation error and writes nothing. Without--configit writes<project-dir>/.claude/repo-fleet-hygiene.conf(${CLAUDE_PROJECT_DIR}when--project-diris absent). The script takes only those five options. For--canonicaland--ack-unavailable, which need the identity checks above, make an ordinary file edit so the user sees a deterministic diff, preserving comments and unrelated sections.The script writes each root and repository relative to the config file's directory, which the grammar resolves identically and which passes the write-time path-portability guard some consumer environments run on tracked config. Where no relative path exists (on Windows, two volumes: a fleet root on
D:with a config onC:) it writes the absolute path; say in the report that the relative form was unavailable because the target is on another volume, so the guard's rejection is not mistaken for a consumer error. Write any hand-edited--canonicalpath the same way. -
Verify after remediation. Re-run every
checkprobe against the written file (never claim success on the edit alone). Config-only, exactly ascheckdefines them:- Parse validity.
git config --file "<config-path>" --list >/dev/null - Entry resolution. For each
[fleet] root/repoand each[canonical …] path, resolve from the config directory and confirm the directory exists and (for roots/repos)git rev-parsesucceeds read-only maxDepth. When present, confirm it is an integer in1..12- Canonical identity and acknowledged identities. Confirm each key/value normalizes to
github.com/owner/repository - Discovery skip names. When present, confirm each
fleet.skipandfleet.skipAppendvalue is a bare directory name (non-empty, no path separator) - Tracked-file pair (when the config lives inside a git worktree, e.g. the tracked
.claude/repo-fleet-hygiene.conf): resolve the owning worktree (git -C "$(dirname -- "<config-path>")" rev-parse --show-toplevel) and run both probes there with a toplevel-relative path:git -C "<toplevel>" check-ignore -v -- "<rel>"reports no match (a match is FAIL with the pattern, since teammates would never receive the config) ANDgit -C "<toplevel>" ls-files --error-unmatch -- "<rel>"exits 0 (non-zero means un-ignored but still untracked, the guaranteed state right after a fresh write; report "written but untracked: commit it to share with the team", never success). An explicit--configin another checkout is still that other worktree's file. Skip both, saying so, when no owning worktree exists. A git verdict there is meaningless.
Do not invoke the collector to verify a write. It is the full fleet walk this skill says it never runs: per-repository network queries across every configured root, minutes on a real fleet, and it proves nothing about the file that the
checkprobes do not already prove. If the user explicitly wants an end-to-end run, say that it is a real audit and hand off by invoking/repo-fleet-hygiene:auditvia the Skill tool. - Parse validity.
-
Report path, inferred/explicit entries, preserved entries, and the config-verification result.
Re-running apply with the same arguments after everything resolves changes nothing and reports
"already configured".
Configuration grammar
[fleet]
root = ../../repos/github.com # repeatable discovery root
repo = ../../special/repo # repeatable exact target
maxDepth = 5 # integer 1..12
ackUnavailable = github.com/owner/repository # repeatable; acknowledge a known-inaccessible identity
skip = vendor # repeatable; REPLACE default discovery skip list (not append)
skipAppend = third_party # repeatable; ADD to whichever skip list is in effect
[canonical "github.com/owner/repository"]
path = ../../../canonical-checkout
ackUnavailable demotes a 404/403 github-identity-unavailable finding for that identity from
UNKNOWN to ACKNOWLEDGED in the audit report, still reported, never suppressed, and never
affecting non-404/403 failures or successful-response evidence. Use it for foreseeable 404s:
upstream repositories made private or deleted, or repositories owned by a different GitHub account
than the authenticated gh login.
skip replaces the audit's default discovery skip list (vendor plus the package-manager cache
trees node_modules, .venv, .pnpm-store, .yarn, .npm, .cargo, .rustup, .gradle, .m2,
.nuget, __pycache__, .tox) whenever any entry is present. It does not append. A lone
skip = third_party means only third_party is skipped (plus unconditional . / .. / .git).
To extend the defaults, write skipAppend = third_party instead: skipAppend (and the audit's
--extend-skip) adds to whichever list is in effect, the defaults or an explicit skip list. CLI
--skip and config fleet.skip compose additively with each other the same way other scope inputs
do; so do --extend-skip and fleet.skipAppend.
Resolution priority is explicit audit CLI override, canonical config entry, then the discovered
checkout's own main worktree (the first record of git worktree list --porcelain). A canonical
override is therefore not needed merely to steer the audit away from a linked worktree. The audit
resolves that itself. Never add one because two directory names look similar; verify the normalized
GitHub remote identity on both sides first.
What this skill does NOT do
- Run a fleet audit. That is
/repo-fleet-hygiene:audit.checkvalidates config only; it never walks the fleet. - Write the plugin cache, Claude Code user settings, or
pluginConfigs. Nor any machine-local state. The config is the consumer's own tracked file. - Touch Git remotes, branches, or worktrees.
Gotchas
- Absolute paths in tracked config can be rejected by consumer write guards. A root, repository, or
canonical target written as an absolute path may trip a consumer's write-time path-portability guard;
the same target written relative to the config file's directory passes and resolves identically, so
applyprefers the relative form, except across Windows volumes, where no relative form exists and the absolute path is the only honest option. When that happens, write the absolute path, say in the report that no relative path exists between volumes, and name the consumer's remedies if the guard still rejects the write: colocate the config with the fleet root on one volume, exempt this file or path from the guard, or keep a user-global config outside the guard's scan. Do not fabricate a relative path or leave the consumer to conclude they misconfigured something. - A project-scoped config is consumed only from its own project. Per the Scoping rule above, a
config meant to apply from every project belongs at the user-global
~/.claude/repo-fleet-hygiene.conf, not a per-project path. Otherwise the audit silently narrows to the project it was authored in. Two cases collapse this warning, andcheckshould say which one applies rather than repeating a caution that cannot bite: when the project directory is the home directory both rungs name the same file, and when no project directory reaches the audit (the session did not supply one) the project rung is unreachable outright, leaving the user-global path the only one that can be consumed. - Config-supplied scope is additive to the audit's CLI scope. A configured root is walked even
when the audit is invoked with an explicit
--repo, so a persisted fleet config widens every later run. The audit'sScope:header line names each contributing rung; a consumed config cannot be suppressed for a single run.
04 同仓库更多 Skills
track
Backlog reads through the bound tracker: search open and closed items, view one item with its comments and state history. Use when another skill searches or reads tracker items.
reviewer-media
Reviewer media for one pull request: decides whether it needs a narrated walkthrough, builds the storyboard from /review:explain-change's digest, has /explainer-video:produce render it and hands the manifest to /source-control:pull-request media. Use when asked for 'reviewer media', 'a walkthrough video for this PR', 'a produced video of this change', or when pull-request ready or monitor hands a PR over.
route
Model and effort per agent role (orchestrator, worker, verifier, retrieval) for a multi-agent run, resolved through the bundled defaults and the user, team and personal override config layers into fenced JSON with single-agent and fan-out variants and the layer behind each value. Use when asked 'which model for the subagents', 'route the roles' or 'model routing', or before a skill passes a role's model on a spawn.
route
Model and effort per agent role (orchestrator, worker, verifier, retrieval) for a multi-agent run, resolved through the bundled defaults and the user, team and personal override config layers into fenced JSON with single-agent and fan-out variants and the layer behind each value. Use when asked 'which model for the subagents', 'route the roles' or 'model routing', or before a skill passes a role's model on a spawn.
principles
Module-design vocabulary for architecture findings, and the checks built on it. Use when: 'what is a deep module', 'what is a seam', 'deep vs shallow module', 'what is the deletion test', 'leverage and locality', 'module design vocabulary', 'which word do we use for X in architecture findings'. Scanning a codebase for friction is /architecture:improve.
write
Structured five-field bug report (title, steps to reproduce, expected vs actual, justified severity, suggested fix location) from an informal description, read-only. Use when the user names a defect they observed, or asks for one written up ('report a bug', 'file a bug', 'write this up as a bug').