scaffold-module
Skill3 starsChanged 11 days agoMITView on GitHub
Use for /scaffold-module <feature>. Creates src/web/modules/<feature>/ with six layer folders, a barrel, a view, a query key factory and domain tests.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- abgmgp/simple-agentic-project-templatetheir own version, first seen Oct 20, 2026
- HenryCordes/ai-engineering-workflowtheir own version, first seen Jul 14, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- abgmgp/simple-agentic-project-template★ 0same name
- HenryCordes/ai-engineering-workflow★ 0same name
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 repository3 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-shadcn-componentSkill
- scaffold-backend-sliceSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 4 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Make sure that the name is kebab-case.
- Very specific: line 20
Make sure that src/web/modules/<feature>/ does not exist.
- Distinctive: line 24
Create the six layer folders.
- Very specific: line 35
Write src/web/modules/<feature>/views/<Feature>View.tsx with this content:
- Very specific: line 74
Write src/web/modules/<feature>/queries/<feature>-queries.ts with this content.
- Very specific: line 103
Put each file in one of the six layer folders.
- Very specific: line 105
Import a file in another folder with the @/ alias.
- Distinctive: line 106
Do not import a sibling module.
- Very specific: line 107
Do not use the JSX style prop.
- Very specific: line 108
Call fetch and import src/web/lib/http.ts only in queries/.
- Very specific: line 110
Put a <subject>.test.ts file next to each domain file and each *-queries.ts file.
- Very specific: line 111
Do not add comments to a .tsx file.
- Distinctive: line 116
Run these commands. Each command must pass.
- Very specific: line 126
Run env -u NODE_ENV npm run deadcode.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Scaffold a frontend module
The rules are in docs/standards/frontend-architecture.md, in the sections "Layer definitions", "Import matrix", "Naming" and "Tests".
Names
<feature>is the module name in kebab-case. Example:card-detail.<Feature>is the same name in PascalCase. Example:CardDetail.<featureCamel>is the same name in camelCase. Example:cardDetail.
Before you start
- Get the module name from the argument of the command.
- Make sure that the name is kebab-case. If the name is not kebab-case, stop and tell the user.
- Make sure that
src/web/modules/<feature>/does not exist. If it exists, stop and tell the user.
Procedure
Create the six layer folders. Use these six commands. Do not use brace expansion.
mkdir -p src/web/modules/<feature>/views mkdir -p src/web/modules/<feature>/containers mkdir -p src/web/modules/<feature>/components mkdir -p src/web/modules/<feature>/hooks mkdir -p src/web/modules/<feature>/domain mkdir -p src/web/modules/<feature>/queriesWrite
src/web/modules/<feature>/views/<Feature>View.tsxwith this content:export function <Feature>View() { return ( <section className="flex flex-col gap-2"> <h1 className="text-lg font-semibold"><Feature></h1> </section> ); }Write
src/web/modules/<feature>/domain/<feature>-label.tswith this content:/** * Return the display label for one <feature> item. */ export function <featureCamel>Label(title: string): string { return title.trim() || "Untitled"; }Write
src/web/modules/<feature>/domain/<feature>-label.test.tswith this content:import { test } from "node:test"; import assert from "node:assert/strict"; import { <featureCamel>Label } from "./<feature>-label.js"; test("<featureCamel>Label trims the title", () => { assert.equal(<featureCamel>Label(" One "), "One"); }); test("<featureCamel>Label returns Untitled for an empty title", () => { assert.equal(<featureCamel>Label(" "), "Untitled"); });Write
src/web/modules/<feature>/queries/<feature>-queries.tswith this content. This file holds the query key factory.export const <featureCamel>Keys = { all: ["<feature>"] as const, detail: (id: string) => ["<feature>", "detail", id] as const, };Write
src/web/modules/<feature>/queries/<feature>-queries.test.tswith this content:import { test } from "node:test"; import assert from "node:assert/strict"; import { <featureCamel>Keys } from "./<feature>-queries.js"; test("<featureCamel>Keys.detail starts with the module key", () => { assert.deepEqual(<featureCamel>Keys.detail("1"), ["<feature>", "detail", "1"]); });Write
src/web/modules/<feature>/index.tswith this content:export { <Feature>View } from "@/modules/<feature>/views/<Feature>View";
Rules for the next files
- Put each file in one of the six layer folders. Do not put other files in the module root. The module root holds only
index.ts. - Export only views and
queryOptionsfactories fromindex.ts. - Import a file in another folder with the
@/alias. Import a file in the same layer folder with a relative path. - Do not import a sibling module.
- Do not use the JSX
styleprop. Do not write a hex colour. Use Tailwind token classes. - Call
fetchand importsrc/web/lib/http.tsonly inqueries/. - Give each new
.tsxfile a PascalCase name. Give each new.tsfile a kebab-case name. - Put a
<subject>.test.tsfile next to each domain file and each*-queries.tsfile. - Do not add comments to a
.tsxfile. Add a JSDoc block only to a function in a.tsfile.
Checks
- Format the new files with
env -u NODE_ENV npx oxfmt <each new file>. A long name can make a line too long for the template layout. Run these commands. Each command must pass.
env -u NODE_ENV npm run format:check env -u NODE_ENV npm run lint env -u NODE_ENV npm run typecheck env -u NODE_ENV npm run depcruise env -u NODE_ENV npm run test- Run
env -u NODE_ENV npm run deadcode. Until a route imports the module barrel, knip reports the files of the new module. This result is correct. Do not add a route for this reason. Add a route only when the user asks for it. - Git does not keep an empty folder. The empty layer folders stay on disk until a file goes into them.
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.

