gen-claudemd
Skill6 starsChanged 3 months agoMITView on GitHub
Regenerate the nyann-managed block in CLAUDE.md from the current profile, stack detection, and doc plan — without re-running a full bootstrap or retrofit. TRIGGER when the user says "regenerate CLAUDE.md", "update CLAUDE.md", "refresh CLAUDE.md", "rebuild CLAUDE.md", "re-gen CLAUDE.md", "my CLAUDE.md is stale", "CLAUDE.md doesn't match my profile", "sync CLAUDE.md with the profile", "/nyann:gen-claudemd". Do NOT trigger on "optimize CLAUDE.md" / "trim CLAUDE.md" / "what's unused" — that's the `optimize-claudemd` skill (usage-analytics-driven). Do NOT trigger on "explain CLAUDE.md" / "what's in CLAUDE.md" — that's `explain-state`. Do NOT trigger on initial project setup — that's `bootstrap-project`.
In this repository41 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-team-sourceSkill
- bootstrap-projectSkill
- check-prereqsSkill
- cleanup-branchesSkill
- commitSkill
- diagnoseSkill
- diff-profileSkill
- doctorSkill
- explain-diffSkill
- explain-stateSkill
- fleet-retrofitSkill
- fleetSkill
- gen-ciSkill
- gen-dependency-updaterSkill
- gen-devcontainerSkill
- gen-templatesSkill
- gh-protectSkill
- hotfixSkill
- iac-applySkill
- iac-planSkill
- inspect-profileSkill
- learn-profileSkill
- migrate-profileSkill
- new-branchSkill
- optimize-claudemdSkill
- prSkill
- record-decisionSkill
- releaseSkill
- retrofitSkill
- route-docsSkill
- settingsSkill
- setupSkill
- shipSkill
- suggestSkill
- syncSkill
- sync-team-profilesSkill
- undo-bootstrapSkill
- undoSkill
- wait-for-pr-checksSkill
- watchSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
Check profile.documentation.storage_strategy.
- Distinctive: line 38
Write the resulting DocumentationPlan JSON to a temp file.
- Very specific: line 51
Before running the generator, capture the existing managed block so you can show a before/after diff.
- Very specific: line 59
Ask: "Regenerate the nyann-managed block in CLAUDE.md?"
- Very specific: line 82
If the script warns about the 3 KB soft cap, relay the warning and suggest /nyann:optimize-claudemd as a follow-up.
- Very specific: line 85
If the script refuses at the 8 KB hard cap, explain and offer --force to override.
- Distinctive: line 90
Before/after diff of the managed block.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
gen-claudemd
Standalone CLAUDE.md regeneration. Wraps bin/gen-claudemd.sh with the
same inputs bootstrap uses, but skips the full bootstrap pipeline so the
user can refresh CLAUDE.md after changing their profile, adding docs, or
restructuring workspaces.
1. Gather inputs
The generator needs three inputs. Resolve them in this order:
- Profile — resolve the active profile via preferences or CLAUDE.md
markers; load with
bin/load-profile.sh <name>. If the user names a specific profile, use that instead. - Doc plan — the generator needs a DocumentationPlan. To preserve
the repo's existing doc routing (local / Obsidian / Notion / split),
re-derive the plan using the same routing the user originally chose.
Check
profile.documentation.storage_strategy; if it names a non-local backend, also runbin/detect-mcp-docs.shand pass--mcp-targetsto route-docs. For local-only repos (the common case):bin/route-docs.sh --profile <profile-path>suffices. Write the resulting DocumentationPlan JSON to a temp file. - Stack (optional but recommended) — run
bin/detect-stack.sh --path .for a StackDescriptor JSON. Write it to a temp file. Skip if detection fails (gen-claudemd falls back to profile-only data).
For monorepos, also resolve workspace configs:
bin/resolve-workspace-configs.sh --stack <stack-path> --profile <profile-path>Pass the result via --workspace-configs <path>.
2. Snapshot the current state
Before running the generator, capture the existing managed block so
you can show a before/after diff. If CLAUDE.md exists with markers,
read the content between <!-- nyann:start --> and
<!-- nyann:end -->. If no markers exist, note that a new block will
be appended.
3. Confirm before writing
Ask: "Regenerate the nyann-managed block in CLAUDE.md?"
Show what will feed into the generation (profile name, stack, storage strategy) so the user can verify the inputs are correct. Skip the confirmation only when the user said "just do it".
4. Run the generator
On confirmation:
bin/gen-claudemd.sh \
--profile <profile-path> \
--doc-plan <doc-plan-path> \
[--stack <stack-path>] \
[--workspace-configs <ws-path>] \
[--project-name <name>] \
--target <cwd>The script writes CLAUDE.md in-place — content outside markers is preserved verbatim.
If the script warns about the 3 KB soft cap, relay the warning and
suggest /nyann:optimize-claudemd as a follow-up.
If the script refuses at the 8 KB hard cap, explain and offer
--force to override.
5. Report
- Before/after diff of the managed block.
- Byte count of the managed block.
- Whether user content outside markers was preserved (always yes).
When to hand off
- "Optimize CLAUDE.md based on usage" →
optimize-claudemdskill. - "What does nyann see in this repo?" →
explain-stateskill. - "Check if my repo is healthy" →
doctorskill. - "Switch to a different profile" →
migrate-profileskill (which calls gen-claudemd internally after the switch).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

