agentleFS
mauroepcemauroepce/claude-workspace/skills/scaffold/SKILL.md

scaffold

Skill1 starsChanged 3 months agoMITView on GitHub

List available templates from ~/.claude/templates/ and insert the chosen one into the working directory. Templates encode Mauricio's senior conventions and good practices, ready to copy-adapt. Use when starting a new file from scratch in any project — avoids re-typing boilerplate.

  • Pipes a download into a shell

49 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ascii-diagram, docs-ci and 10 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.
  • SethGammonSkill

    ascii-diagram

    Generate perfectly aligned ASCII diagrams — architecture, flow, sequence, box-and-arrow. Uses a programmatic character-grid approach so alignment is guaranteed by math, not token prediction. Includes post-render verification.

    Also in 4 projects that use this

  • jh941213Skill

    docs-ci

    문서 CI(링크·OpenAPI lint·breaking 게이트·mermaid 검증)나 문서 드리프트 감지(docs.yaml 신선도 검사)를 설치하거나 돌릴 때 사용. 문서 내용 작성은 docs-architecture·docs-interfaces·docs-manuals.

    Also in 3 projects that use this

  • jh941213Skill

    docs-interfaces

    API·이벤트 인터페이스 문서(OpenAPI·swagger·AsyncAPI 명세, 엔드포인트 레퍼런스, API 구성도·시퀀스, API CHANGELOG)를 만들거나 코드와 맞출 때 사용. 시스템 구성도는 docs-architecture, API 설계 원칙은 api-design-principles.

    Also in 3 projects that use this

  • SethGammonSkill

    research-fleet

    Parallel research using Fleet wave mechanics. Spawns multiple scout agents, each investigating a different angle of the same question. Findings are compressed between waves. Produces a unified research brief from multiple independent perspectives.

    Also in 3 projects that use this

  • RachaelQuiselSkill

    client-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

  • vicoa-aiSkill

    live-preview

    Start a local app in the current user project, expose it through a tunnel, and return preview details in structured Markdown. Use when the user asks for a preview URL, public URL, shareable localhost, mobile/web preview, or tunnel setup.

    Also in 4 projects that use this

  • +4 more from jh941213

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. 0 are common, 9 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 42 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If $ARGUMENTS is empty or the user just wants to browse:

    line 16
  2. Distinctive:

    If the directory doesn't exist, tell the user:

    line 23
  3. Distinctive:

    If templates exist, present them grouped by directory:

    line 27
  4. Very specific:

    If $ARGUMENTS is a clear path (backend/nest-controller), use that.

    line 54
  5. Distinctive:

    If it's a keyword:

    line 56
  6. Distinctive:

    If ambiguous, list the matches and ask the user to pick.

    line 70
  7. Distinctive:

    Wait for an answer. Don't write to a default location — the user knows their project structure.

    line 78
  8. Very specific:

    If the file already exists, warn: "File <path> exists.

    line 80
  9. Very specific:

    If the user mentioned a resource name (e.g., /scaffold nest-controller orders), rename users → orders, User → Order, etc., consistently …

    line 86
  10. Very specific:

    If the template references other templates (e.g., the test imports ../utils/async-retry), adjust import paths to match the user's project …

    line 87
  11. Distinctive:

    Write to the target path.

    line 89
  12. Very specific:

    If the template had a companion files section (like next-page.tsx mentioning error.tsx and loading.tsx), suggest scaffolding those too.

    line 106
  13. Distinctive:

    Don't write the file without confirming the target path.

    line 110
  14. Distinctive:

    Don't silently overwrite existing files.

    line 111
  15. Distinctive:

    Don't strip the teaching comments by default.

    line 112
  16. Very specific:

    Don't invent templates. If the requested template doesn't exist in ~/.claude/templates/, say so and suggest the closest match.

    line 113
  17. Very specific:

    Don't add Co-Authored-By: Claude to the scaffolded file (templates are user-owned conventions, not AI authorship).

    line 114

“Common” is measured: kept by at least 6 in 10 of the 42 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/scaffold — Insert a template

You are Claude. The user invoked /scaffold to pick a template from their personal collection and adapt it to the current task.

Argument (optional): $ARGUMENTS may be:

  • Empty → list all templates and ask user to pick
  • A template path like backend/nest-controller → load that template directly
  • A type keyword like endpoint, form, retry → match to the most likely template

Phase 1 — Discover available templates

If $ARGUMENTS is empty or the user just wants to browse:

ls -1 ~/.claude/templates/ 2>/dev/null
find ~/.claude/templates -name "*.ts" -o -name "*.tsx" 2>/dev/null | sed 's|.*/templates/||' | sort

If the directory doesn't exist, tell the user:

"Templates not installed. Run curl -fsSL https://raw.githubusercontent.com/mauroepce/claude-workspace/main/bin/install-personal.sh | bash to install."

If templates exist, present them grouped by directory:

Templates available:

backend/
  - express-endpoint.ts       Express + Zod + error classes
  - nest-controller.ts        NestJS controller + service + DTO
  - next-api-route.ts         Next.js App Router API handler

frontend/
  - next-page.tsx             Next.js page with Server Component
  - react-form.tsx            react-hook-form + Zod validation

utils/
  - async-retry.ts            Exponential backoff retry with jitter
  - result-type.ts            Result<T, E> pattern
  - zod-helpers.ts            Common Zod schemas (email, UUID, pagination, etc.)

tests/
  - vitest-setup.ts           Vitest config + first integration test

Pick one (e.g., "backend/nest-controller" or "retry") and tell me the target file path.

Phase 2 — Match the user's intent

If $ARGUMENTS is a clear path (backend/nest-controller), use that.

If it's a keyword:

Keyword (case-insensitive)Match
endpoint, express, apibackend/express-endpoint.ts
nest, controllerbackend/nest-controller.ts
next-api, route-handlerbackend/next-api-route.ts
page, next-pagefrontend/next-page.tsx
form, react-formfrontend/react-form.tsx
retryutils/async-retry.ts
resultutils/result-type.ts
zod, schemasutils/zod-helpers.ts
test, vitesttests/vitest-setup.ts

If ambiguous, list the matches and ask the user to pick.

Phase 3 — Confirm destination

Ask:

"Target file path? (e.g., src/api/users/route.ts or src/utils/retry.ts)"

Wait for an answer. Don't write to a default location — the user knows their project structure.

If the file already exists, warn: "File <path> exists. Overwrite, or place at <path>.scaffold for review?"

Phase 4 — Read template + adapt + write

  1. Read ~/.claude/templates/<chosen>.
  2. Adapt to the target context. Specifically:
    • If the user mentioned a resource name (e.g., /scaffold nest-controller orders), rename users → orders, User → Order, etc., consistently throughout the file.
    • If the template references other templates (e.g., the test imports ../utils/async-retry), adjust import paths to match the user's project structure.
    • Strip teaching comments only if user explicitly asks; default is to KEEP them (they encode the why).
  3. Write to the target path.

Phase 5 — Tell the user what to do next

Output:

✓ Wrote <target path>.

Next steps:
- Install dependencies: <list from template's header comment>
- Adapt the schema + handler to your specific case
- Drop the teaching comments once you've internalized them (or keep — they explain the why)

Want to scaffold a companion file? (e.g., the test for this, the route wiring, etc.)

If the template had a companion files section (like next-page.tsx mentioning error.tsx and loading.tsx), suggest scaffolding those too.

What NOT to do

  • Don't write the file without confirming the target path.
  • Don't silently overwrite existing files. Always warn.
  • Don't strip the teaching comments by default. They're part of the value.
  • Don't invent templates. If the requested template doesn't exist in ~/.claude/templates/, say so and suggest the closest match.
  • Don't add Co-Authored-By: Claude to the scaffolded file (templates are user-owned conventions, not AI authorship).

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.