learn-profile
Skill6 starsChanged 3 months agoMITView on GitHub
Inspect a reference repo and save its nyann-relevant setup (stack, hooks, branching, commit convention, extras) as a reusable profile. TRIGGER when the user says "save this setup as a profile called X", "learn a profile from ~/projects/foo", "capture this repo's setup as my-profile", "make a profile from this repo", "turn this repo into a profile", "extract a profile from <path>", "remember this setup as <name>", "/nyann:learn-profile". Do NOT trigger on "what does this profile do?" — that's `inspect-profile`. Do NOT trigger on "apply profile X to this repo" — that's `bootstrap-project`. Do NOT trigger on "fix drift" — that's `retrofit`.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- vasanthsreeram/Alvarmethodtheir own version, first seen Aug 16, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- vasanthsreeram/Alvarmethod★ 161same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
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-claudemdSkill
- gen-dependency-updaterSkill
- gen-devcontainerSkill
- gen-templatesSkill
- gh-protectSkill
- hotfixSkill
- iac-applySkill
- iac-planSkill
- inspect-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
4 rules. About 0 are common, 2 are distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Read-only inspection of a reference repo.
- Very specific: line 40
--stdout: when the user wants to inspect the inferred JSON without writing it to disk. - Very specific: line 49
Check whether a profile with the same name already exists at <user-root>/profiles/<name>.json.
- Distinctive: line 95
When evidence is thin (e.g.
≈ “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
learn-profile
Read-only inspection of a reference repo. Writes one JSON file (the new profile) to the user's profile root. Never touches the reference repo itself.
1. Resolve inputs
Need two things:
--target <path>— the reference repo to learn from. Default to the current working directory only if the user says "this repo"; otherwise ask for the path explicitly. Profile learning from the wrong repo produces a confusing profile, so err on the side of confirming.--name <slug>— the profile name. Must match^[a-z0-9][a-z0-9-]*$. If the user offers a name with spaces or caps (e.g. "My Next Starter"), propose a slug (my-next-starter) and confirm before running.
Optional:
--user-root <dir>defaults to~/.claude/nyann. Only pass explicitly when the user wants a different root.--stdoutwhen the user wants to inspect the inferred JSON without writing it to disk. Useful for "show me what you'd save".
2. Pre-flight checks
- Confirm the target path exists and is a directory. If it's not a git repo, say so — the inference loses most of its signal (branching strategy comes from branches + tags, commit convention from subject history). Offer to continue anyway, but warn.
- Check whether a profile with the same name already exists at
<user-root>/profiles/<name>.json. If it does, ask the user whether to overwrite or pick a different name. Never silently clobber.
3. Invoke
bin/learn-profile.sh \
--target <resolved-path> \
--name <slug> \
[--user-root <dir>] \
[--stdout]Expected exit codes:
| Code | Meaning | What to do |
| 0 | profile written | Tell the user the path + show the inferred summary |
| 1 | bad input (missing target, invalid name, etc.) | Surface the error verbatim; fix and retry |
| other | internal failure | Surface stderr and stop — don't paper over |
4. Report back
On success, show the user:
- Where the file was written (
~/.claude/nyann/profiles/<name>.json). - What was inferred — read back the key fields (primary_language,
framework, branching strategy, commit_format, hook list). Any field
marked
"inferred": truein the output came from heuristics rather than explicit config; call those out so the user knows to double-check. - Next step — "To apply this profile to a new repo, run
bootstrap-projectwith--profile <name>" (or the matching natural language).
5. Handling weak signal
learn-profile reads:
detect-stack.shoutput → stack block.husky/,.pre-commit-config.yaml,commitlint.config.*, installed git hooks → hooks block- Last 50 commit subjects →
conventions.commit_format - Branches + tags →
branching.strategy .editorconfig,.gitignore→ extras block
When evidence is thin (e.g. a fresh repo with 2 commits), the inferred profile will be sparse. That's fine — flag it to the user ("I could only infer X and Y; everything else defaults"). Don't invent data to fill gaps.
When to hand off
- User asks "now use this profile in a new repo" →
bootstrap-projectwith--profile <name>. - User asks "what does this profile do?" →
inspect-profileor read the JSON directly. - User asks to share the profile with a team → mention
add-team-sourcefor the team-profile side;learn-profileitself only writes to the user root.
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.

