/kastell:kastell-scaffold [check|command|provider|mcp-tool] [name]from kastell
Generate new Kastell components from templates. Creates boilerplate for CLI commands, audit checks, providers, and MCP tools following current architecture (commands thin, core fat, adapters dispatch).
Ships in kastell. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Generate boilerplate files for new Kastell components. Each template follows the post-P63/P64 architecture: commands are thin wrappers, business logic lives in core/, providers handle cloud API, adapters abstract platform ops.
/kastell:scaffold command server-migrate # creates command + core + test files
/kastell:scaffold check filesystem-perms # creates audit check + catalog update
/kastell:scaffold provider ovhcloud # creates provider + registry entry + test
/kastell:scaffold mcp-tool server_migrate # creates MCP tool + registration + test
$ARGUMENTS[0] is the component type. $ARGUMENTS[1] is the component name.
These rules apply in every generated file. The forked subagent does not automatically have kastell-ops context — enforce these rules explicitly.
| Layer | Path | Rule |
|---|---|---|
| Commands | src/commands/ | Parse args + delegate. ZERO business logic. |
| Core | src/core/ | ALL business logic. No chalk/ora/UI imports. |
| Providers | src/providers/ | Cloud API per provider. Extends BaseProvider. |
| Adapters | src/adapters/ | Platform ops via PlatformAdapter. Access via getAdapter(). |
| MCP | src/mcp/tools/ | Zod schema + handler. Delegates to core. |
Critical: Never import CoolifyAdapter or DokployAdapter directly. Always use getAdapter(platform) from src/adapters/factory.ts.
ESM: "type": "module" — use import, not require. All imports use .js extension.
Commands:
!node -e "import('fs').then(f=>console.log(f.readdirSync('src/commands').filter(x=>x.endsWith('.ts')).map(x=>x.replace('.ts','')).join(', '))).catch(()=>console.log('commands dir not found'))"
Providers:
!node -e "import('fs').then(f=>console.log(f.readdirSync('src/providers').filter(x=>x.endsWith('.ts')&&x!=='base.ts').map(x=>x.replace('.ts','')).join(', '))).catch(()=>console.log('providers dir not found'))"
MCP tools:
!node -e "import('fs').then(f=>console.log(f.readdirSync('src/mcp/tools').filter(x=>x.endsWith('.ts')).map(x=>x.replace('.ts','')).join(', '))).catch(()=>console.log('mcp/tools dir not found'))"
Audit categories:
!node -e "import('fs').then(f=>console.log(f.readdirSync('src/core/audit',{withFileTypes:true}).filter(d=>d.isDirectory()).map(d=>d.name).join(', '))).catch(()=>console.log('audit dir not found'))"
Run the scaffold script to generate boilerplate files:
bash scripts/scaffold.sh $ARGUMENTS[0] $ARGUMENTS[1]
The script reads .tpl templates from templates/, replaces __NAME__/__NAME_PASCAL__/__NAME_CAMEL__/__NAME_UPPER__ placeholders, and creates files in the project. Add --dry-run to preview without writing.
Files generated per type:
command → 3 files: src/commands/, src/core/, src/__tests__/core/check → 2 files: src/core/audit/checks/, src/__tests__/core/audit/checks/provider → 2 files: src/providers/, src/__tests__/providers/mcp-tool → 2 files: src/mcp/tools/, src/__tests__/mcp/After running the script, read the matching reference for registration details:
| Type | Reference File |
|---|---|
command | references/template-command.md |
check | references/template-audit-check.md |
provider | references/template-provider.md |
mcp-tool | references/template-mcp-tool.md |
Perform these steps after creating the boilerplate files:
src/index.tsregisterTool() in src/mcp/server.tsPROVIDER_REGISTRY in src/constants.tssrc/core/audit/catalog.tsnpm run build && npm test && npm run lintYeni skill veya agent oluşturulurken aşağıdaki koşullar ZORUNLU:
effort + allowed-tools ekle (minimum zorunlu)disable-model-invocation: true eklemaxTurns belirle, memory scope tanımlareferences/template-audit-check.md (opens in a new tab)references/template-command.md (opens in a new tab)references/template-mcp-tool.md (opens in a new tab)references/template-provider.md (opens in a new tab)scripts/scaffold.sh (opens in a new tab)templates/check-test.ts.tpl (opens in a new tab)templates/check.ts.tpl (opens in a new tab)templates/command-core.ts.tpl (opens in a new tab)templates/command-test.ts.tpl (opens in a new tab)templates/command.ts.tpl (opens in a new tab)templates/mcp-tool-test.ts.tpl (opens in a new tab)templates/mcp-tool.ts.tpl (opens in a new tab)templates/provider-test.ts.tpl (opens in a new tab)templates/provider.ts.tpl (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
mediumThree short reads, in order
kastell, scaffolding, boilerplate, code-generation, cli, mcp-tools
Generated from the plugin's indexed repository (kastelldev/kastell) — no native marketplace selected
npx claudepluginhub p/kastelldev-kastell4 skills in this plugin
/kastell-carefulSafety guard for destructive Kastell operations. Intercepts destroy and restore commands and requires explicit confirmation before proceeding./kastell-opsKastell CLI patterns, architecture, anti-patterns, and decision trees. Use automatically when working in Kastell codebase or when asked about Kastell server infrastructure, security audit, hardening, lock, provision, or provider management./kastell-researchRead-only Kastell codebase exploration. Use when tracing a bug across files, mapping callsites before refactoring, or exploring unfamiliar subsystems. Runs in isolated context with Explore agent.Other plugins' skills for the same job