add-team-source
Register a git URL as a team-profile source so nyann can periodically sync and expose its profiles under a namespace. TRIGGER when the user says "add a team…
Safely undo the most recent git commit(s) on a feature branch. TRIGGER when the user says "undo my last commit", "undo last N commits", "oops revert that commit", "undo the commit but keep my changes", "uncommit", "revert my last change", "take back that commit", "/nyann:undo".
$ npx -y skills add thettwe/nyann --skill undo --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/undoContext preview
The summary Claude sees to decide when to auto-load this skill.
Safely undo the most recent git commit(s) on a feature branch. TRIGGER when the user says "undo my last commit", "undo last N commits", "oops revert that commit", "undo the commit but keep my changes", "uncommit", "revert my last change", "take back that commit", "/nyann:undo".
name: undo description: > Safely undo the most recent git commit(s) on a feature branch. TRIGGER when the user says "undo my last commit", "undo last N commits", "oops revert that commit", "undo the commit but keep my changes", "uncommit", "revert my last change", "take back that commit", "/nyann:undo". Trigger on "revert" only when the user clearly means undoing a local commit (not `git revert` on a published one — see DISAMBIGUATION). DISAMBIGUATION: if the user says "revert a commit that's already on main" / "revert a pushed commit" / mentions a specific remote SHA, this is the `git revert` workflow — undo-skill refuses pushed commits by default. Explain the difference and either use --allow-pushed (risky) or direct them to `git revert <sha>`. Do NOT trigger on "undo the last edit" (that's editor-level) or "rollback the deploy" (that's infrastructure, out of scope). Do NOT trigger on main/master/develop — long-lived branches should never be history-rewritten; use `git revert` instead.
Wraps `bin/undo.sh`. History-mutating operation — treat as destructive.
Before any mutation, run `bin/undo.sh --dry-run` and show the user which commits will be undone. The preview JSON lists them newest- first with SHA and subject. Read it back and ask the user to confirm — even for a single-commit undo.
Exception: the user's request explicitly included "don't ask" / "just do it" AND `--count` is 1 AND `--strategy` is `soft` (the safest default). For anything multi-commit or non-soft, always confirm.
Default is `soft` (safest — all changes stay staged). When the user's intent is unclear, **you MUST call the `AskUserQuestion` tool** (not plain text):
{
"questions": [
{
"question": "How should the commit be undone?",
"header": "Strategy",
"multiSelect": false,
"options": [
{ "label": "Soft (Recommended)", "description": "Undo commit, keep changes staged" },
{ "label": "Mixed", "description": "Undo commit, keep changes in working tree (unstaged)" },
{ "label": "Hard", "description": "Undo commit AND discard all changes permanently" }
]
}
]
}For `hard`, warn the user twice: the work is gone after hard reset. Confirm before executing even after the picker selection.
when the user says "undo the last 3 commits" or similar.
`last-N-commits` is more dangerous because commits partway down the stack are harder to recover. For N > 3, suggest using `git reflog`
| Refusal reason | What to tell the user | |---|---| | `long-lived branch` | "Can't undo on main/master/develop. Use `git revert <sha>` to create a reverting commit." | | `merge commit` | "HEAD is a merge commit — undo with `git revert -m 1 <merge-sha>` manually." | | `already on upstream` | "The commit is already pushed to `<upstream>`. Either `git revert` it (safe) or pass `--allow-pushed` to force-push after the reset (only if nobody else pulled)." | | `detached HEAD` | "Detached HEAD — checkout a branch first." | | `fewer than N commits` | "Branch only has M commits; can't undo N." |
bin/undo.sh --target <cwd> \ [--scope last-commit|last-N-commits] [--count N] \ [--strategy soft|mixed|hard] [--allow-pushed] [--dry-run]
On success, echo back:
or gone (hard).
recover the discarded history if they change their mind soon.
commit with `--allow-pushed`), they'll need `git push --force-with-lease`. Don't run this automatically; explain and let them decide.
Handle this as a separate one-off; don't add reflog logic to the undo skill itself.
ငြမ်း is Burmese for scaffolding. Nyann is the Claude Code plugin that picks expert git defaults for your stack — branching, working hooks (Husky / pre-commit.com / lefthook), commits, releases, CI, docs — then keeps the repo on those rails through every PR
Repo: thettwe/nyann
Register a git URL as a team-profile source so nyann can periodically sync and expose its profiles under a namespace. TRIGGER when the user says "add a team…
Bootstrap a fresh or existing repo with nyann. TRIGGER when the user says "set up this project", "initialize git workflow", "bootstrap this repo", "scaffold…
Survey the machine and report which nyann features are usable right now. TRIGGER when the user says "is my machine ready for nyann", "what do I need to…
Prune local branches whose work is already merged into the base. TRIGGER when the user says "clean up branches", "delete merged branches", "prune local…
Generate a Conventional Commits message from the staged diff and create the commit after user confirmation. TRIGGER when the user says "commit these changes",…
Bundle a redacted, support-grade snapshot of the current nyann state for inclusion in a bug report or support request. Combines explain-state + doctor + git…