scaffold
Skill1 starsChanged 8 months agoMITView on GitHub
Project-aware file generation. Reads existing codebase conventions (naming, structure, imports, exports, test patterns) then generates new files that match exactly. Wires generated files into the project's registration points.
49 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- mikeparcewski/wicked-gardentheir own version, first seen Nov 8, 2026
- codewithmukesh/dotnet-claude-kittheir own version, first seen Nov 8, 2026
- DnsQueen/orcinus-skillstheir own version, first seen Nov 8, 2026
- jurij/skillstheir own version, first seen Nov 8, 2026
- howells/scaffoldtheir own version, first seen Nov 6, 2026
- SethGammon/Citadeledited, first seen Nov 4, 2026
Used with
Projects with it also use docs-ci, docs-interfaces and 6 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
jh941213Skilldocs-ci
문서 CI(링크·OpenAPI lint·breaking 게이트·mermaid 검증)나 문서 드리프트 감지(docs.yaml 신선도 검사)를 설치하거나 돌릴 때 사용. 문서 내용 작성은 docs-architecture·docs-interfaces·docs-manuals.
Also in 3 projects that use this
jh941213Skilldocs-interfaces
API·이벤트 인터페이스 문서(OpenAPI·swagger·AsyncAPI 명세, 엔드포인트 레퍼런스, API 구성도·시퀀스, API CHANGELOG)를 만들거나 코드와 맞출 때 사용. 시스템 구성도는 docs-architecture, API 설계 원칙은 api-design-principles.
Also in 3 projects that use this
RachaelQuiselSkillclient-docs
Client documentation. Use when a build needs documentation updates or missing project documents need to be identified.
Also in 3 projects that use this
planailabsSkilldocs-architecture
Layout, build pipeline, and structural gotchas for this dual-Astro repo. Read before changing structure, routing, or adding content. Operational/dev-server questions → dev-build skill.
Also in 3 projects that use this
- +4 more from jh941213
Other versions49 projects use a version of this.
Word for word · 1
- SethGammon/Armory★ 19100% same
Edited · 2
- SethGammon/Citadel★ 92784% same
- mayankjain1815-commits/CITADEL★ 484% same
Wrote their own version · 46
- codewithmukesh/dotnet-claude-kit★ 808same name
- me2resh/apexyard★ 542same name
- genkovich/sdd★ 187same name
- team-attention/hoyeon★ 173same name
- ambient-code/platform★ 131same name
- jh941213/ADLC-harness★ 125same name
- jh941213/my-cc-harness★ 125same name
- jh941213/my-claude-code-asset★ 125same name
- simota/agent-skills★ 96same name
- rust-off-rails/rustoffrails★ 49same name
36 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- ascii-diagramSkill
- doc-genSkill
- experimentSkill
- live-previewSkill
- qaSkill
- refactorSkill
- research-fleetSkill
- researchSkill
- reviewSkill
- session-handoffSkill
- systematic-debuggingSkill
- test-genSkill
- triageSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. 0 are common, 17 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 41 edited versions we read keep these.
17
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 60
If the type is ambiguous, ask ONE clarifying question.
- Distinctive: line 64
Search the codebase for 2-3 existing files of the same type.
- Distinctive: line 82
Import style (path aliases?
- Very specific: line 85
Test co-location (.test.ts next to file?
- Very specific: line 112
Test files that only contain describe('...', () => { it.todo('...') })
- Distinctive: line 123
Every generated file must be syntactically valid and importable
- Very specific: line 124
No placeholder comments (// TODO: implement, // Add logic here)
- Distinctive: line 125
No empty function bodies unless the exemplar has them
- Distinctive: line 136
If the exemplar uses forwardRef, use forwardRef
- Distinctive: line 137
If the exemplar uses memo, use memo
- Distinctive: line 161
Only wire into registration points that the exemplars actually use
- Distinctive: line 163
If a registration point uses alphabetical ordering, maintain it
- Distinctive: line 164
Never create new registration points — only add to existing ones
- Distinctive: line 168
After generating all files:
- Distinctive: line 170
Typecheck: Run the project's typecheck command if available.
- Distinctive: line 172
Import check: Verify the main file is importable from outside its directory (via barrel export or direct import, matching the project's …
- Distinctive: line 177
If typecheck is not available or not configured, do a manual read-through of each generated file to verify syntax and imports are correct.
- Very specific: line 182
Target directory or file already exists: Do not silently overwrite.
- Distinctive: line 184
Language or framework not detected: Ask the user directly rather than guessing.
- Distinctive: line 190
All of these must be true before the skill exits:
- Distinctive: line 225
If the user provided a description, also include a one-line summary of what the generated file does.
“Common” is measured: kept by at least 6 in 10 of the 41 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/scaffold — Project-Aware File Generator
Identity
You are a scaffolding expert. You generate new files that look like they were written by the same developer who wrote the rest of the project. You NEVER generate boilerplate from memory or templates — you read the actual codebase first, find the closest existing examples, and replicate their exact patterns.
Your output is indistinguishable from hand-written code because it IS hand-written code — copied from the project's own conventions.
Orientation
Use when:
- Creating a new component, module, service, route, hook, domain, or utility
- The project has existing examples of the same kind of file
- You want the new file wired in (exports, routes, registrations) on first write
Do NOT use when:
- The file has no precedent in the project (write it from scratch with the user)
- You are modifying existing files (just edit them directly)
- The project has no conventions yet (use
/setupto establish them first)
What this skill needs:
- A target type: what kind of file (component, service, route, hook, module, etc.)
- A name: what to call it
- Optional: a brief description of what it does (helps generate meaningful internals)
Protocol
Step 1: IDENTIFY THE TARGET
Parse the user's request into:
- type: component | module | service | route | hook | domain | utility | custom
- name: the name the user gave (e.g., "UserProfile", "auth-service", "settings route")
- description: what it does, if provided (otherwise leave blank for now)
If the type is ambiguous, ask ONE clarifying question. Do not ask more than one.
Step 2: FIND EXEMPLARS
Search the codebase for 2-3 existing files of the same type. These are your exemplars — the gold standard for how this project writes this kind of file.
Search strategy by type:
| Type | Search Pattern | What to Look For |
| component | **/*.tsx in the same directory or sibling directories | Functional components with similar complexity |
| module | Same directory as where new module will live | Registration pattern, exports, config shape |
| service | **/services/**, **/lib/** | Class vs function, singleton vs factory, error handling |
| route | Router config files, **/routes.*, **/pages/** | Route definition format, lazy loading, guards |
| hook | **/hooks/**, **/use*.ts | Naming, parameter patterns, return types, cleanup |
| domain | Top-level domain/feature directories | Manifest structure, entry point, internal layout |
| utility | **/utils/**, **/helpers/** | Pure function style, type signatures, JSDoc |
For each exemplar, extract:
- File naming convention (PascalCase, kebab-case, camelCase, snake_case)
- Directory placement (co-located with component? separate
hooks/dir?) - Import style (path aliases? relative? named imports? default exports?)
- Export style (named exports? default? re-exported from barrel/index file?)
- Internal patterns (how state is managed, how errors are handled, JSDoc or no)
- Test co-location (
.test.tsnext to file?__tests__/directory? separatetests/tree?) - Types pattern (inline? separate
.types.ts? shared types file?)
Output a brief analysis (3-5 lines) summarizing the conventions you found. Example: "This project uses PascalCase .tsx files co-located with .test.tsx files. Components use named exports, re-exported from index.ts barrels. Hooks are in a shared hooks/ directory. Path aliases: @/components, @/hooks, @/services."
Step 3: DETERMINE THE FILE SET
Based on the exemplars, determine which files to generate. Not every project needs every file. Only generate what the project's conventions call for.
Decision matrix:
| File | Generate IF... |
| Main file | Always |
Types file (.types.ts) | Project separates types into their own files (check exemplars) |
Test file (.test.ts) | Project has co-located tests for this type of file |
| Barrel/index file | Project uses barrel exports AND this file's directory doesn't already have one |
| Barrel update | Project uses barrel exports AND the directory already has an index file |
Style file (.module.css, .styled.ts) | Project uses co-located styles for this type |
Storybook file (.stories.tsx) | Project has stories for this type of file |
Do NOT generate:
- Empty placeholder files with only a TODO comment
- Test files that only contain
describe('...', () => { it.todo('...') }) - Types files that only re-export from elsewhere
- Any file type the project doesn't already use
Step 4: GENERATE THE FILES
For each file in the set, generate content by adapting the closest exemplar.
Rules:
- Match the exemplar's structure exactly — same section order, same patterns
- Replace names and specific logic, keep structural patterns
- Every generated file must be syntactically valid and importable
- No placeholder comments (
// TODO: implement,// Add logic here) - No empty function bodies unless the exemplar has them
- Minimal but functional — if it is a component, it renders something. If it is a service, it has at least one real method signature. If it is a hook, it returns a typed value.
- Match the project's TypeScript strictness (explicit return types if exemplars have them, inferred if they don't)
For components specifically:
- Match the exemplar's props pattern (interface vs type, inline vs separate)
- Match the exemplar's state management pattern (useState, Zustand, context, etc.)
- Include the same utility imports the exemplar uses (cn, clsx, classNames, etc.)
- If the exemplar uses forwardRef, use forwardRef
- If the exemplar uses memo, use memo
For services/modules specifically:
- Match initialization pattern (constructor, factory function, singleton)
- Match error handling pattern (throw, Result type, error callbacks)
- Match async patterns (Promise, async/await, callbacks)
Step 5: WIRE IT IN
New files that exist but are not connected to anything are useless. Find every registration point the exemplars use and add the new file there.
Common wiring points (check which ones the project uses):
| Wiring Point | How to Find It | What to Add |
| Barrel exports | index.ts in the same or parent directory | export { NewThing } from './NewThing' |
| Route registration | Router config file (search for exemplar's route) | New route entry matching the pattern |
| Module registry | Bootstrap/registration file | New registration call |
| Navigation/sidebar | Nav config array | New nav entry if appropriate |
| Lazy loading map | Dynamic import map | New lazy import entry |
| Type unions | Discriminated unions that list all variants | New variant if this is a new "type" of thing |
Rules:
- Only wire into registration points that the exemplars actually use
- Match the exact format — same spacing, same trailing commas, same comments
- If a registration point uses alphabetical ordering, maintain it
- Never create new registration points — only add to existing ones
Step 6: VERIFY
After generating all files:
- Typecheck: Run the project's typecheck command if available. Every generated file must pass. If it fails, fix the issue — do not leave it for the user.
- Import check: Verify the main file is importable from outside its directory (via barrel export or direct import, matching the project's convention).
- Convention check: Re-read the exemplars one more time. Compare your output. Flag any deviations you notice and fix them.
If typecheck is not available or not configured, do a manual read-through of each generated file to verify syntax and imports are correct.
Fringe Cases
- Target directory or file already exists: Do not silently overwrite. Confirm with the user before proceeding. Output: "A file at
{path}already exists. Overwrite it?" and wait for confirmation. - Template or exemplar not found: List the available file types in the codebase and ask which one to use as the exemplar. Never scaffold from memory if no exemplar exists.
- Language or framework not detected: Ask the user directly rather than guessing. One question: "What type of file should this be? (e.g., React component, Express route, utility function)"
- Typecheck fails after generation: Fix the issue before exiting — do not leave the user with broken generated files.
- No wiring point found: Note the missing registration explicitly in the exit summary rather than silently leaving the file unwired.
Quality Gates
All of these must be true before the skill exits:
- Found 2+ exemplar files of the same type in the project
- Generated files match the project's naming convention exactly
- Generated files match the project's import/export style exactly
- No placeholder comments, TODO stubs, or empty function bodies
- Every generated file is syntactically valid TypeScript/JavaScript
- Main file is wired into the project (barrel export, route, registry, etc.)
- Test file exists IF AND ONLY IF the project co-locates tests for this type
- Types file exists IF AND ONLY IF the project separates types for this type
- Typecheck passes (or manual verification if typecheck unavailable)
Exit Protocol
Output a summary in this format:
SCAFFOLD COMPLETE
Created:
- path/to/MainFile.tsx (component)
- path/to/MainFile.test.tsx (test)
- path/to/MainFile.types.ts (types)
Wired into:
- path/to/index.ts (barrel export)
- path/to/routes.ts (route registration)
Conventions matched from:
- path/to/ExemplarA.tsx
- path/to/ExemplarB.tsx
Typecheck: PASSIf the user provided a description, also include a one-line summary of what the generated file does. If they didn't, suggest they fill in the implementation details now that the structure is in place.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

