skills/code-to-pantry/SKILL.md
Extract a code pattern from the current codebase into Nathan's pantry repo as a reusable recipe. Use when Nathan says 'add to pantry', 'save this code pattern', or wants to preserve a technique for reuse.
npx skillsauth add nweii/agent-stuff code-to-pantryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Nathan's pantry (github.com/nweii/pantry) is a personal collection of modular, self-contained code recipes. The goal is to capture the technique, stripped of its original context, in a form that can be dropped into any future project without modification.
A pantry entry should be:
grain, not background-texture)Read the code the user is pointing at. If they haven't pointed at specific code, ask them to identify it.
Then identify:
Propose an abstraction plan and get Nathan's approval before writing any files. Cover:
If the source code is deeply entangled with app-specific concerns, surface that tension explicitly. Sometimes the right call is to extract a narrower slice of the technique rather than trying to abstract everything at once.
Wait for approval before proceeding.
Try these in order until one works:
~/Developer, ~/code, ~/projects, etc.) for a directory named pantry with a registry.jsongh repo clone nweii/pantry to clone it to a temporary locationOnce you have local access, write to src/<name>.<ext> where <ext> matches the stack.
// ABOUTME: <one-sentence description of what this file does> (use # for Python)<MyComponent />, <div className="relative">, etc.)react (peer dep)useId() (React 18+) for any internally-generated IDsMatch the idioms of the target language. For plain TypeScript/JavaScript utilities: export named functions. For CSS: export as a standalone file with a usage comment at the top. For other languages/frameworks, use the standard module export pattern for that ecosystem.
The pantry uses a pre-commit hook (scripts/sync.js) that auto-generates registry.json and src/index.ts. Do not edit those files manually — just commit and the hook handles them.
From the pantry repo directory:
git add src/<name>.<ext>
git commit -m "add <name>"
git push
The pre-commit hook will stage registry.json and src/index.ts automatically as part of the commit.
Confirm to Nathan that the component is live and available via:
bunx github:nweii/pantry add <name>
testing
Command-invoked tutoring pass for understanding something deeply: a concept being learned, or work just done in the session. Locates where the learner is, teaches one step per turn, quizzes to verify, and continues until they can explain the material back and apply it. Can produce durable artifacts (a walkthrough of the work, a record of what was learned, a glossary) saved through whatever the environment supports. Best run after substantive work, or when the aim is to learn something.
testing
Search, read, filter, combine, adapt, and save recipes in the Brain vault collection. Use whenever cooking and the collection are relevant — 'what should I make', 'recipes with miso', 'save this one' all imply it.
testing
Socratic teaching pass over the work just done in a session: incremental comprehension stages, a running checklist doc, restate-understanding-first, and AskUserQuestion quizzes. The session doesn't end until the user has demonstrated understanding. Run after Claude has completed substantive work worth deeply understanding.
development
Writing-partner processes that draw out the user's own writing through questioning: guided drafting sessions, fragment mining, shaping raw material into a piece, and phrase tightening. Use for help discovering, developing, and structuring writing (notes, essays, messages, etc).