agentleFS
BULDEEBULDEE/ai-craftsman-superpowers/skills/scaffold/SKILL.md

scaffold

Skill35 starsChanged 53 days agoApache-2.0View on GitHub

Unified scaffolder for all pack types. Use when creating new entities, use cases, components, hooks, API resources, or custom packs. Types loaded from active packs.

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

We split this skill into the rules it gives an agent

12 rules. 0 are common, 2 are distinctive, and 10 are very specific to this project.

  • 0

    Common

    Most of the 42 edited versions we read keep these.

  • 2

    Distinctive

    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
  1. Very specific:

    Use the Read tool to read .craft-config.yml.

    line 18
  2. Very specific:

    Use the Glob tool: Glob("packs/*/pack.yml").

    line 24
  3. Distinctive:

    Before generating ANY code, you MUST load and read the canonical example for the requested type.

    line 43
  4. Very specific:

    Before generating entity, usecase, component, or hook code, offer the user a template variant matching their case, loaded from the pack's …

    line 56
  5. Very specific:

    Follow the exact patterns: final class, private constructor, factory methods, Value Objects

    line 81
  6. Distinctive:

    Follow the exact patterns: named exports, branded types, TanStack Query integration

    line 86
  7. Very specific:

    Create pack.yml with the name, version 1.0.0, description placeholder, and stack ["*"]

    line 91
  8. Very specific:

    Create a starter validator in hooks/<name>-validator.sh with a pack_validate_<name>() function

    line 92
  9. Very specific:

    Create empty directories: agents/, knowledge/canonical/, commands/scaffold-types/, static-analysis/, templates/

    line 93
  10. Very specific:

    Create a test file at tests/packs/test-<name>.sh with basic structure checks

    line 94
  11. Very specific:

    Run scripts/validate-pack.sh packs/<name>/ to verify the generated pack

    line 95
  12. Very specific:

    Run /craftsman:verify to ensure code passes all hook validators

    line 101

“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

/craftsman:scaffold - Unified Scaffolder

Outcome Contract

  • Outcome: generated code that already satisfies the active rules, not a template to fix afterwards.
  • Done when: the generated files pass the quality gate on write, the template variant was chosen deliberately, and the code compiles or lints clean.
  • Evidence: the hook output on the generated files and the variant selected.

Project Context

Use the Read tool to read .craft-config.yml. If the file does not exist, say "No config found. Run /craftsman:setup first."

Available Types

Detect available scaffold types from loaded packs:

Use the Glob tool: Glob("packs/*/pack.yml"). For each found file, use the Read tool to read it and extract the scaffold_types: list. Display each pack's types as **<pack-name>:** <type1>, <type2>, .... If no scaffold types found, say "No scaffold types available. Check pack configuration."

Usage

/craftsman:scaffold <type> [name]

Examples:

/craftsman:scaffold entity Order
/craftsman:scaffold usecase CreateOrder
/craftsman:scaffold component UserProfile
/craftsman:scaffold hook useOrders
/craftsman:scaffold pack my-go-pack

Iron Law

Before generating ANY code, you MUST load and read the canonical example for the requested type.

TypeCanonical Example
entitypacks/symfony/knowledge/canonical/php-entity.php
usecasepacks/symfony/knowledge/canonical/php-usecase.php
componentpacks/react/knowledge/canonical/ts-react-component.tsx
hookpacks/react/knowledge/canonical/ts-tanstack-hook.ts
api-resourcepacks/symfony/knowledge/canonical/php-state-provider.php
pack(generates new pack from convention - no canonical needed)

Template Variants (v2.1.0+)

Before generating entity, usecase, component, or hook code, offer the user a template variant matching their case, loaded from the pack's templates/ directory:

PackTemplateUse Case
Symfonybounded-context-backendStandard DDD entity
Symfonycrud-apiAPI Platform 4 CRUD
Symfonyevent-sourcedEvent Sourcing + Projections
Reactbounded-context-frontendStandard TanStack Query hook
Reactform-heavyMulti-step wizard + Zod
Reactdashboard-dataTanStack Table + Recharts

Process

Phase 1: Context

  1. Detect project stack from .craft-config.yml
  2. Validate the requested type exists in an active pack
  3. Load the canonical example for the type

Phase 2: Generate

Based on the type argument:

Symfony types (entity, usecase):

  • Load the canonical example file from packs/symfony/knowledge/canonical/
  • Follow the exact patterns: final class, private constructor, factory methods, Value Objects
  • Generate: Entity/UseCase + tests + migration if needed

React types (component, hook):

  • Load the canonical example file from packs/react/knowledge/canonical/
  • Follow the exact patterns: named exports, branded types, TanStack Query integration
  • Generate: Component/Hook + tests + Storybook if component

Meta type (pack):

  • Generate the full pack directory structure under packs/<name>/
  • Create pack.yml with the name, version 1.0.0, description placeholder, and stack ["*"]
  • Create a starter validator in hooks/<name>-validator.sh with a pack_validate_<name>() function
  • Create empty directories: agents/, knowledge/canonical/, commands/scaffold-types/, static-analysis/, templates/
  • Create a test file at tests/packs/test-<name>.sh with basic structure checks
  • Run scripts/validate-pack.sh packs/<name>/ to verify the generated pack
  • Print next steps: "Pack created at packs/<name>/. Edit pack.yml to configure stack compatibility and add your rules."

Phase 3: Verify

After generation:

  • Run /craftsman:verify to ensure code passes all hook validators
  • Confirm naming conventions match project standards

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.