skills/scaffold-cli/SKILL.md
Scaffolds a production-ready TypeScript CLI and npm package with ESM, a dual tsdown build (CLI binary plus typed library), vitest, oxlint and oxfmt via ultracite, changesets, GitHub Actions CI with OIDC npm publishing, AGENTS.md, and a bundled agent skill definition. Use when creating a new CLI tool, bootstrapping a TypeScript package, scaffolding a node CLI, starting a new npm package, or asking "scaffold a CLI project" or "set up a new TypeScript CLI". For a Next.js web app use scaffold-nextjs; for structuring an existing codebase use define-architecture; for releasing an already-built package use autoship.
npx skillsauth add mblode/agent-skills scaffold-cliInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Scaffold a production-ready TypeScript CLI project (Node 22+) with ESM modules, a dual build (CLI binary plus typed library), automated changeset releases, and an agent skill definition.
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).This is a low-freedom scaffold. Generate files exactly as templated, substituting only the {{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: templates for package.json, tsconfig, tsdown, gitignore, license, changeset config, GitHub Actions |
| references/scaffold-source.md | Steps 4-5: templates for 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 command sequence, 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
Collect from the user (ask only what was not provided):
| 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}} with actual values.
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; the post-scaffold sequence in Step 6 creates it exactly once.
Load references/post-scaffold.md. Run the full command sequence in order. The order matters: git init must run before 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; do not report success from a visual once-over. The placeholder sweep (grep for leftover {{variable}} tokens) is part of this checklist.
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 for common packages: use node:util styleText instead of chalk (stable since Node 22.13), and the @clack/prompts spinner instead of ora.
"type": "module"; a require() call or missing .js import extension fails the NodeNext typecheck and build.src/cli.ts. The tsdown banner option injects #!/usr/bin/env node at build time; a source shebang produces a doubled shebang in dist/cli.js.oxlint/oxfmt scripts or devDependencies by hand, and do not call those binaries directly. ultracite init owns them; run npm run check (lint) and npm run fix (autofix) instead, or duplicate script entries and version skew result.ultracite init before git init. Its lefthook integration installs hooks into .git/hooks during the install it triggers and fails without a repo."test": "vitest run" without --passWithNoTests. The scaffold ships zero test files, so plain vitest run exits 1 and the first CI run goes red.skills/ directory; the scaffold's contract is that every generated CLI is agent-ready out of the box.For the first and subsequent releases of the generated package, the autoship skill drives the changeset, CI, and Version Packages PR flow end to end.
development
Designs and builds UI end to end, from visual direction (palettes, type scales, design tokens, layout systems, landing-page CRO strategy, brand kits) to Tailwind implementation with the ui.sh design guideline system, including multiple variants with an in-browser picker, semantic markup scaffolds from screenshots, retrofitting dark mode or responsive behavior, and componentizing or canonicalizing Tailwind code. Use when asked to "build a landing page", "create a dashboard", "make this look good", "make this look premium", "pick a visual style", "design the UI for", "show me 3 hero options", "improve conversions", "create a brand kit", "turn this screenshot into markup", "add dark mode", "make a dark version of this image", "make this responsive", "fix this on mobile", "componentize this page", "clean up the Tailwind", or any prompt that designs, creates, or refines UI code. For auditing existing UI use ui-audit; for motion use ui-animation; for landing page copy use copywriting.
development
Collaborative interrogation that produces an implementation plan before any code is written. Explores the codebase and relevant docs first, asks one question at a time with a concrete recommended answer, grills the rationale behind documented decisions, flags fuzzy terminology, and walks a decision tree until shared understanding is reached, then writes a plan file. First step of the shipping pipeline; it creates plans, plan-reviewer stress-tests them, pr-creator opens the PR. Use when asked to "create a plan", "help me think through this", "plan this feature", "I want to build X", "grill me", "grill with docs", "understand the docs", "unpack the decisions", "brainstorm a spec", "what should the plan be", "think this through with me", or before starting any non-trivial implementation.
development
--- name: pr-reviewer description: Reviews the current local diff or branch and returns a read-only, severity-tiered findings report. It never edits files. Four modes: standard bug and compliance review, structural quality, AI slop detection, and whole-codebase security audit. Use when asked to run /pr-reviewer, "review my changes", or "code review" before commit, push, or handoff. "Thermo-nuclear review", "structural review", "deep code quality audit", "harsh maintainability review", and "code
development
--- name: ux-audit description: Feature-level UX audit for React/Next.js code, diff-aware by default. Catches what Lighthouse, axe, ESLint, and Storybook miss: state-coverage gaps (missing loading/empty/error), form data loss on validation, double-submit, broken focus management, optimistic UI without rollback, stale async responses, skeleton-induced layout shift, and vague microcopy. 33 modern failure-mode rules plus 30 Laws of UX rules across 12 feature playbooks. Produces a 3-tier ship-readin