npx skills add ...
npx skills add gjkim42/kanon-repo --skill pre-session-end
Use this skill PROACTIVELY when the user indicates they are done working, ending the session, wrapping up, or saying goodbye. Also use when significant work has been completed and the user hasn't explicitly asked to continue. Analyzes the session to evolve skills/commands/agents and propagates useful project permissions to global settings.
npx skills add gjkim42/kanon-repo --skill pre-session-end
Run this skill before ending a Claude Code session to capture learnings and propagate useful settings.
/pre-session-endBefore proceeding with other steps, provide a corrected or more natural version of the user's original prompt from this session.
Format:
Review the chat history and identify:
Patterns that could become reusable skills:
Operations that could become slash commands:
Specialized task patterns that could become agents:
For each candidate, present to user:
.claude/settings.local.json~/.claude/settings.jsonFor each permission found only in project settings:
Categorize the permission:
Bash(git:*), Bash(npm:*), Bash(docker:*) → likely useful globallyWebFetch(domain:docs.example.com) → ask user if generally usefulmcp__* → ask user (may be project-specific)Present each selectively:
~/.claude/skills/learned/~/.claude/settings.jsonProvide a brief summary:
## Session Wrap-Up Complete
**Learnings captured:**
- [X] Created skill: skill-name
- [X] Created command: command-name
- [ ] Skipped: pattern-name (user declined)
**Permissions propagated:**
- [X] Bash(helm:*) → global
- [ ] WebFetch(domain:internal.corp) → kept project-only
**Ready to end session.**