learn-profilelisted
Install: claude install-skill thettwe/nyann
# 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.
- **`--stdout`** when 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 \
-