From scaffold
Create, edit, and test scaffold templates for projects or current-dir file generation, configuring scaffold.yaml with questions, presets, rewrites, injects, and bootstrapping via scaffold init.
npx claudepluginhub hay-kot/scaffold --plugin scaffoldThis skill uses the workspace's default tool permissions.
User-invocable: true
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
User-invocable: true Auto-triggerable: true
Triggers when: User wants to create a new scaffold template, edit scaffold.yaml, write template files, or test/validate a scaffold.
Creates a new directory named after the project. The user is prompted for a project name.
my-scaffold/
├── scaffold.yaml
└── {{ .ProjectKebab }}/ # or any project name pattern
├── README.md
└── src/
└── main.go
Valid root directory names: {{ .Project }}, {{ .ProjectSlug }}, {{ .ProjectSnake }}, {{ .ProjectKebab }}, {{ .ProjectCamel }}, {{ .ProjectPascal }}
Generates files into the current directory. No project name prompt. The templates/ prefix is stripped from output paths. Use rewrites and inject to place files precisely.
my-scaffold/
├── scaffold.yaml
└── templates/
├── component.tsx
└── component.test.tsx
scaffold init # creates .scaffold/ with example template scaffold
Or create manually:
.scaffold/my-project/
├── scaffold.yaml
└── {{ .ProjectKebab }}/
└── main.go
scaffold.yaml:
questions:
- name: description
prompt:
message: "Project description"
validate:
required: true
- name: license
prompt:
message: "License"
default: "MIT"
options: ["MIT", "Apache-2.0", "GPL-3.0"]
presets:
default:
description: "My project"
license: "MIT"
{{ .ProjectKebab }}/main.go:
// {{ .Scaffold.description }}
package main
func main() {}
.scaffold/add-component/
├── scaffold.yaml
└── templates/
└── component.tsx
scaffold.yaml:
questions:
- name: component_name
prompt:
message: "Component name"
validate:
required: true
rewrites:
- from: templates/component.tsx
to: "src/components/{{ .Scaffold.component_name }}.tsx"
presets:
default:
component_name: "Button"
scaffold initCreates .scaffold/ with a hello-world template scaffold example.
scaffold init --stealthSame as above, but adds .scaffold to .git/info/exclude so it's hidden from git without touching .gitignore. Useful for personal scaffolds in shared repos.
See scaffold-yaml-schema.md for the complete field reference. Key sections:
See template-engine.md for the complete template reference. Key points:
.Project, .ProjectKebab, .Scaffold.*, .Computed.*, .Each.*wraptmpl, toPlural, toSingular, isPlural, isSingular, partialpartials/ directory at the scaffold rootscaffold lint .scaffold/my-scaffold/scaffold.yaml
Validates question names, prompt types, computed names, skip globs, rewrite paths, injection modes, and delimiter configs.
scaffold inspect .scaffold/my-scaffold
Outputs JSON showing questions (with resolved types), presets, computed values, features, and messages. Use this to verify the scaffold looks correct.
scaffold new --dry-run --no-prompt --preset default .scaffold/my-scaffold
Renders fully but writes nothing. Outputs JSON listing all files that would be created. Catches template errors without side effects.
scaffold new \
--output-dir :memory: \
--no-prompt \
--preset default \
--snapshot stdout \
.scaffold/my-scaffold
Renders in-memory and outputs a full AST with file contents. Ideal for:
scaffold \
--log-level error \
new \
--output-dir :memory: \
--no-prompt \
--preset default \
--snapshot stdout \
.scaffold/my-scaffold
Template errors show:
Common causes:
.Scaffold.typo)Always define at least one preset (typically default) so scaffolds can be tested non-interactively. The preset should provide valid values for all required questions.
presets:
default:
description: "Test project"
license: "MIT"
use_database: true
db_type: "postgres"
minimal:
description: "Minimal"
license: "MIT"
use_database: false
Test each preset:
for preset in default minimal; do
scaffold new --output-dir :memory: --no-prompt --preset "$preset" --snapshot stdout .scaffold/my-scaffold
done