agentsclimarketplace

Scaffold

Skill BULDEE/ai-craftsman-superpowers/skills/scaffold

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.From its SKILL.md

Install
npx -y skills add BULDEE/ai-craftsman-superpowers --skill scaffold

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

4.1 KB, as published. Nobody here has run it

/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

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.