/repo-agent-setup:repo-setupfrom repo-agent-setup
Audit and fix a repository's agent infrastructure — CLAUDE.md presence and whether git actually tracks it, the .claude/state/ folder of per-window working records and its ignore line, the graphify knowledge graph and its freshness, an origin remote for cloud routines, declared routines and their .mcp.json, and skills the stack needs that nothing can route to automatically. Use when the SessionStart notice says "Repo setup:", when someone asks whether a repo is set up for agents, when onboarding an unfamiliar repo, or when asked to snooze or dismiss one of those notices, or to set a repo up for early clears (the context action). Not for writing CLAUDE.md content itself — that is /init — and not for scheduling, which is /repo-schedule.
Ships in repo-agent-setup. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Reports what a repository is missing for agent work, then hands each fix to the skill that owns it. This skill diagnoses and delegates. Only the context and format actions write to the repository, and only when the reader asks for them.
node ~/.claude/skills/repo-setup/audit.js [<repo-path>] # human-readable
node ~/.claude/skills/repo-setup/audit.js --json [<repo-path>]
With no path it audits the repository containing the working directory. Show the reader the table as-is rather than paraphrasing it; the fix column is the part they act on.
| Check | Meaning | Hand off to |
|---|---|---|
instructions | No CLAUDE.md or AGENTS.md at the root | /init |
instructions-ignored | The file exists but git ignores it | see below — fix here |
graph | No graphify-out/graph.json, or it predates the newest commit | audit.js context, or /graphify --update when stale |
state-file | No .claude/state/ folder, or still the old single .claude/state.md | audit.js context, or ccfg state migrate for the old file |
state-file-tracked | Git would track .claude/state/ | ccfg state migrate |
remote | No origin, so no cloud routine can clone the repo | the reader adds a remote |
routines | What .claude/routines/ declares | /repo-schedule |
routine-mcp | Routines declared with no .mcp.json | /repo-schedule |
skill-overrides | The stack needs a skill no paths: rule can reach | see below — fix here |
format-hooks | .pre-commit-config.yaml does not use the shared formatters | audit.js format |
Two findings are resolved here because no other skill owns them.
instructions-ignored is the one that costs the most and shows the least.
A CLAUDE.md git ignores is invisible to every teammate and to every cloud
session, because routines and web sessions clone from the remote and never see
the working tree. The repo looks configured locally and is unconfigured
everywhere else. Fix it by removing the rule from .gitignore and committing
the file. If it is ignored on purpose because it holds something private, say so
plainly and suggest splitting the private part out rather than leaving the whole
file dark.
skill-overrides means the repository's dependencies call for a skill that
carries no paths: frontmatter, so nothing routes to it automatically. The fix
is a skillOverrides entry in .claude/settings.local.json, which promotes the
skill in that repository and nowhere else. The audit prints the exact object.
node ~/.claude/skills/repo-setup/audit.js context [<repo-path>]
Sets a repository up for early clears in one step: runs ccfg state migrate,
which creates .claude/state/, moves an old single .claude/state.md in if
there is one, and writes the .claude/state/ line to .gitignore; then builds the
code graph with graphify update, which reads code only and makes no model
calls. It does not start graphify's pass over documents, papers and images,
which spends model tokens: offer that, and run /graphify only on a yes.
The SessionStart banner raises graph, state-file and state-file-tracked on
every start until they are fixed or dismissed, because without them a /clear
loses the work.
node ~/.claude/skills/repo-setup/audit.js format [<repo-path>]
Sets a repository up with format-hooks (github.com/fishnos/format-hooks), the
pre-commit package that pins ruff, clang-format, Prettier and shfmt to shared
settings and adds comment checks. With no .pre-commit-config.yaml, it writes
one listing every hook, pinned to the newest tag (v0.2.0 when the tag lookup
cannot reach GitHub), then runs pre-commit install and the sync-config
hook, which writes the four shared settings files. With a config that already
exists, it edits nothing and prints the block to paste in. It never runs
pre-commit run --all-files, because that rewrites every file in the
repository: offer it, and run it only on a yes.
node ~/.claude/skills/repo-setup/audit.js snooze <check-id> [<repo-path>] # 14 days
node ~/.claude/skills/repo-setup/audit.js dismiss <check-id> [<repo-path>] # permanent
node ~/.claude/skills/repo-setup/audit.js reset [<repo-path>] # clear both
State lives in ~/.claude/cache/repo-setup/, never in the repository, so
declining a suggestion never dirties a working tree. Snooze when the work is
real but not now; dismiss when the check does not apply to this repository at
all. Prefer snooze — a dismissal is never raised again.
Fix only what the reader agrees to. A repo missing four things is a menu, not a
work order, and running /graphify on a large repository is a long operation
nobody asked for. Report, recommend, wait.
The SessionStart hook (~/.claude/hooks/repo-setup.js) reads the same check
definitions from ~/.claude/hooks/lib/repo-audit.js. Add a check there so both
the notice and this report gain it at once. Checks needing git or the network
belong in audit.js, since the hook runs in front of every session and must not
spawn anything.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub fishnos/claude-config --plugin repo-agent-setup4 skills in this plugin
/find-docsRetrieves up-to-date documentation, API references, and code examples for any developer technology. Use this skill whenever the user asks about a specific library, framework, SDK, CLI tool, or cloud service -- even for well-known ones like React, Next.js, Prisma, Express, Tailwind, Django, or Spring Boot. Your training data may not reflect recent API changes or version updates.
Always use for: API syntax questions, configuration options, version migration issues, "how do I" questions mentioning a library name, debugging that involves library-specific behavior, setup instructions, and CLI tool usage.
Use even when you think you know the answer -- do not rely on training data for API details, signatures, or configuration options as they are frequently outdated. Always verify against current docs. Prefer this over web search for library documentation and API details./graphifyUse for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools./repo-scheduleDeclare a repository's scheduled cloud agents (Claude Code routines) as committed files under .claude/routines/, then reconcile them against the account so the repo is the source of truth. Use when asked what should run on a schedule for a repo, to add or change a recurring or GitHub-triggered agent for a project, to check whether a repo's declared routines are actually live, or when /repo-setup reports the routines check. For a personal one-off reminder unattached to a repository, use /schedule instead.