From mblode-agent-skills
Scaffolds a production-ready TypeScript CLI and npm package with tsdown, vitest, oxlint, changesets, and GitHub Actions CI. Use when bootstrapping a new CLI tool or Node package.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mblode-agent-skills:scaffold-cliThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- **IS:** bootstrapping a brand-new TypeScript CLI or npm package (Node 22+) from the pinned templates in `references/`.
references/.scaffold-nextjs), folder structure or module contracts for an existing codebase (use define-architecture), or shipping a release of an existing package (use autoship).Low-freedom scaffold. Generate files exactly as templated, substituting only {{placeholder}} variables. Do not swap tools (no eslint, prettier, tsup, jest, chalk, or ora) or restructure the layout.
| File | Read When |
|---|---|
references/scaffold-configs.md | Step 3: package.json, tsconfig, tsdown, gitignore, license, changeset config, GitHub Actions |
references/scaffold-source.md | Steps 4-5: src/cli.ts, src/index.ts, src/types.ts, AGENTS.md, README.md, skills/SKILL.md |
references/post-scaffold.md | Steps 6-7: post-scaffold commands, validation checklist, troubleshooting |
Copy this checklist to track progress:
Scaffold progress:
- [ ] Step 1: Gather project info
- [ ] Step 2: Create directory structure
- [ ] Step 3: Generate config files
- [ ] Step 4: Generate source files
- [ ] Step 5: Generate docs and skill
- [ ] Step 6: Run post-scaffold commands
- [ ] Step 7: Validate scaffold
Ask only for what the user didn't provide:
| Variable | Example | Default | Used in |
|---|---|---|---|
{{name}} | md-tools | required | package.json name, README title |
{{description}} | CLI tool to convert content to markdown | required | package.json, README, SKILL.md |
{{bin}} | md | same as {{name}} | package.json bin field, CLI examples |
{{repo}} | acme/md-tools | required | package.json repository, badges |
{{author}} | Your Name | required | package.json, LICENSE |
{{year}} | 2026 | current year | LICENSE |
{{name}}/
.changeset/
.github/
workflows/
src/
skills/{{bin}}/
Load references/scaffold-configs.md. Generate all config files, replacing every {{placeholder}}.
Files: package.json, tsconfig.json, tsdown.config.ts, .gitignore, LICENSE.md, .changeset/config.json, .changeset/README.md, .github/workflows/ci.yml, .github/workflows/npm-publish.yml
Load references/scaffold-source.md. Generate:
src/cli.ts: Commander entry pointsrc/index.ts: Public API exportssrc/types.ts: Shared type definitionsFrom the same references/scaffold-source.md, generate:
AGENTS.md: commands, architecture, gotchasREADME.md: install, usage, API, agent skill install, licenseskills/{{bin}}/SKILL.md: agent skill definitionDo not create the CLAUDE.md symlink here; Step 6 creates it exactly once.
Load references/post-scaffold.md. Run the full sequence in order: git init must precede ultracite init (lefthook hooks need .git/ to install into).
Run the validation checklist in references/post-scaffold.md. Every item must pass with command output as evidence, not a visual once-over. Includes the placeholder sweep (grep for leftover {{variable}} tokens).
Runtime: @clack/prompts, commander
Development (in the package.json template): @changesets/cli, @types/node, tsdown, typescript, ultracite, vitest
Added by ultracite init (never list by hand): oxlint, oxfmt, lefthook, plus check, fix, and prepare scripts
Replacements: node:util styleText instead of chalk (stable since Node 22.13), @clack/prompts spinner instead of ora.
"type": "module"); a require() or missing .js import extension fails the NodeNext typecheck and build.src/cli.ts. tsdown's banner injects #!/usr/bin/env node at build; a source shebang doubles it in dist/cli.js.oxlint/oxfmt scripts or devDeps by hand, or call those binaries directly. ultracite init owns them; run npm run check (lint) and npm run fix (autofix). By-hand entries cause duplicate scripts and version skew.ultracite init before git init. Its lefthook integration installs hooks into .git/hooks and fails without a repo."test": "vitest run" without --passWithNoTests. Zero test files means plain vitest run exits 1 and the first CI run goes red.skills/. The contract is that every generated CLI is agent-ready out of the box.For releases of the generated package, the autoship skill drives the changeset, CI, and Version Packages PR flow.
npx claudepluginhub joshuarweaver/cascade-code-general-misc-4 --plugin mblode-agent-skillsScaffolds TypeScript CLI packages using tsdown, pnpm, Vitest, ESLint, and npm Trusted Publisher for CI releases.
Scaffolds projects with directory structures, configs, dependencies, linting, testing, CI/CD basics, and docs for frontend, backend, mobile, CLI, libraries, and monorepos.
Autonomously generates complete production-ready projects from descriptions: structure, code, tests, docs, config, git. Orchestrates pipeline with verification to ensure builds and tests pass.