code-to-pantry

code-to-pantry is a skill for Claude Code, Codex from nweii/agent-stuff. It costs 33 tokens per session (1,573 once invoked), scanned A, original, MIT.

A skill for using Nathan's Pantry, a personal repository of reusable code recipes. It can list recipes, add a recipe's source to the current project, and save useful code patterns for later reuse.

In plain words
What is it for?
Use it to search the pantry, add a matching component to a project, or preserve a technique as a reusable recipe.
Why use it?
It helps determine whether reusable code already exists and avoids treating copied code as an external dependency.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to search the pantry, add a matching component to a project, or preserve a technique as a reusable recipe.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nweii/agent-stuff/code-to-pantry
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add nweii/agent-stuff --skill code-to-pantry
Clone the repo
git clone --depth 1 https://github.com/nweii/agent-stuff

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-to-pantry

README.md
[![agentmods](https://agentmods.dev/badge/skills/nweii/agent-stuff/code-to-pantry/github.svg)](https://agentmods.dev/skills/nweii/agent-stuff/code-to-pantry)
Your own site
<a href="https://agentmods.dev/skills/nweii/agent-stuff/code-to-pantry"><img src="https://agentmods.dev/badge/skills/nweii/agent-stuff/code-to-pantry/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-to-pantry

Your own site · 80×15
<a href="https://agentmods.dev/skills/nweii/agent-stuff/code-to-pantry"><img src="https://agentmods.dev/badge/skills/nweii/agent-stuff/code-to-pantry.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,573 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00033 $0.01573
Opus 5.5 $0.00013 $0.00629
Sonnet 5.5 $0.00007 $0.00315
Haiku 4.5 $0.00003 $0.00157

Measured 2mo ago against content hash 303e54535275, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-to-pantry scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/code-to-pantry/SKILL.md · 127 lines

How it starts

The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code to pantry

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.

Two directions, and the first is one command:

  • Looking something up — he wants to know whether the pantry already has a thing, or wants it pulled into the current project. See Looking something up and stop there.
  • Putting something in — he's pointing at code worth keeping. Work through Steps 1–4 below.

Looking something up

The pantry ships its own CLI, so neither direction needs the repo cloned:

bunx github:nweii/pantry list
bunx github:nweii/pantry add <name>

list prints every component with its description. add writes the component's source into the current directory — raw source he owns and edits, not a dependency — and names any packages to install.

Read the list before answering whether something exists, rather than answering from memory: the pantry changes without this skill changing. Where a component matches, name it and offer to add it. Where the match is partial, say what the existing one actually does and let him decide between adapting it and building fresh.

Nothing matching is a normal outcome — say so plainly and build the thing. If what gets built turns out to be worth keeping, that's the other direction, and Step 1 starts below.

What makes a good pantry entry

A pantry entry should be:

  • Truly abstracted: no variable names, imports, comments, or usage examples that reference the source project. Someone reading the component cold should have no idea where it came from.
  • Self-contained: all logic lives in one file; external dependencies are minimal and explicit
  • Opinionated defaults: parameterized just enough for useful variation, with sensible defaults that work out of the box without configuration
  • Named for the technique, not the use case (e.g., grain, not background-texture)

Read the full file on GitHub · 127 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed · +4 lines · -46 tokens per session 303e54535275
  2. 3mo ago First seen · 123 lines · 79 tokens per session scan A b0be0ead6577

Subscribe to this mod's changes

code-to-pantry is a skill published in the GitHub repository nweii/agent-stuff (10 stars, last pushed 15d ago), licensed MIT. It adds 33 tokens to every session and 1,573 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

code-to-pantry compared with skills from other repositories

code-to-pantry next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
code-to-pantrynweii/agent-stuffSkill1015d agoMITA33Claude Code, Codex
orbit-notionnexu-io/open-designSkill111kyesterdayApache-2.0A117Claude Code, Codex
agentmailpaperclipai/paperclipSkill119ktodayMITA30Claude Code, Codex
rowboat-spacesrowboatlabs/rowboatSkill18kyesterdayApache-2.0A60Claude Code, Codex
Cortexdanielmiessler/LifeOSSkill21k15d agoMITA184Claude Code
feishuHmbown/CodeWhaleSkill41k4d agoMITA33Claude Code, Codex
pinchtab-mcppinchtab/pinchtabSkill11k8d agoMITA52Claude Code, Codex