1fpf
Decompose a sprawling module into orchestrator + helpers in one pass. Applies four agent-readable-code disciplines: orchestrator/helper structure, one default export per file (1fpf), schema-derived types, and cascading verb-first folder names. Gates code mutations on a single approval at Phase 3.
Install
curl -fsSL -L https://tetsukod.ai/api/skills/1fpf/download | tar -xz -C ~/.claude/skills/Drops the `1fpf/` skill folder into `~/.claude/skills/`. Once it lands, `/1fpf <module-path>` is available in any Claude Code session — no further wiring required.
What it does
/1fpf audits a target module against four agent-readable-code disciplines, drafts a refactor plan with the target folder tree and per-helper signatures, then pauses for explicit approval before mutating any code. Structural only — behavior changes and bug fixes stay out of scope.
The four disciplines it enforces:
- Orchestrator/helper pattern — the parent
index.tsreads as a thin recipe of imports and sequenced calls. Helpers live in their own subfolders. - One default export per file — file size is a downstream symptom of correct decomposition, not the rule itself.
- Schema-derived types —
Pick,GetPayload, indexed access, intersection variants. Never inline ad-hoc shapes. - Cascading domain structure — folder names are verb-first domain concepts (
crawlWebsite,scoreLeads,handleBounce). Noutils/,helpers/, orlib/at the leaf level.
What's inside
Four files, organized as orchestrator + reference. SKILL.md is the thin orchestrator (boot, five-phase workflow, hard constraints, args contract). Three sibling notes under reference/ carry the catalog: disciplines.md (the four disciplines with what / why / check / worked examples, including the schema-derived-type derivation toolkit), supporting-rules.md (JSDoc, step comments, colocated tests, vertical imports, escalation, naming, ordering, early returns, three-tier progressive disclosure), and violations.md (the audit hit list). The skill follows the disciplines it enforces — orchestrator at the root, one concern per reference file.
# 1fpf — orchestrator/helperify a module
A self-contained refactor skill that decomposes a god-file or sprawling module into orchestrator + helpers, applying all four agent-readable-code disciplines in one pass. Audits, plans, gates on approval, then mutates code with `Edit` / `Write` — never bulk-rewrites.
When to reach for it
An agent shipped a PR that's too sprawling to skim. An existing module has accreted into a god-file bundling parsing, validation, persistence, and notification with types invented inline. Before landing a new feature in a messy module — restructure first, then ship the feature into the clean shape. Do not reach for it for behavior changes, bug fixes, or reuse/quality review — /1fpf is structural only.
Every new skill,
in subscribers' hands first.
Free skills stay free. Subscribers get the PRO folders, early drops, and the field notes behind each one — every other Tuesday.
Subscribe on Substack