Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
mblode avatar

Scaffold Cli

  • 388 installs
  • 74 repo stars
  • Updated August 5, 2026
  • mblode/agent-skills

scaffold-cli is an agent skill that generates CLI project skeletons with argument parsing, packaging, tests, and release conventions so developers and agents ship command-line tools quickly.

About

scaffold-cli is an mblode agent-skills generator for bootstrapping command-line tool repositories. It produces project skeletons that include argument parsing setup, package manifest structure, test layout, and release conventions so new CLIs are runnable and publishable without hand-rolling boilerplate. Developers reach for scaffold-cli when starting a internal dev tool, agent-invoked utility, or open-source CLI and want consistent structure across repos. The skill targets the build phase before feature logic is added—pair it with domain-specific implementation skills afterward. It suits Node, Python, or similar CLI ecosystems where packaging and test harness mistakes slow first releases. Specify language, binary name, and subcommands in the prompt for a tighter scaffold aligned with team conventions.

  • CLI project templates
  • Argument and subcommand layout
  • Packaging and binary layout
  • Test harness setup
  • Release-friendly structure

Scaffold Cli by the numbers

  • 388 all-time installs (skills.sh)
  • +19 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #141 of 550 CLI & Terminal skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/mblode/agent-skills --skill scaffold-cli

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs388
repo stars74
Last updatedAugust 5, 2026
Repositorymblode/agent-skills

How do you scaffold a CLI project with tests and packaging?

Generate CLI project skeletons with argument parsing, packaging, tests, and release conventions so agents and developers ship command-line tools quickly.

Who is it for?

Developers starting a new command-line tool who want parsing, tests, and packaging wired before writing command logic.

Skip if: Adding subcommands to an existing mature CLI or building GUI, API-only, or library projects without a binary entrypoint.

When should I use this skill?

The user asks to create, scaffold, or bootstrap a new CLI tool with tests, packaging, and release setup.

What you get

CLI project skeleton with argument parsing, package manifests, test files, and release configuration

  • CLI project skeleton
  • Test and packaging scaffolding

Files

SKILL.mdMarkdownGitHub ↗

Scaffold CLI

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.

  • IS: bootstrapping a brand-new TypeScript CLI or npm package from the pinned templates in references/.
  • IS NOT: a Next.js web app (use 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.

Reference Files

FileRead When
references/scaffold-configs.mdStep 3: templates for package.json, tsconfig, tsdown, gitignore, license, changeset config, GitHub Actions
references/scaffold-source.mdSteps 4-5: templates for src/cli.ts, src/index.ts, src/types.ts, AGENTS.md, README.md, skills/SKILL.md
references/post-scaffold.mdSteps 6-7: post-scaffold command sequence, validation checklist, troubleshooting

Scaffold Workflow

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

Step 1: Gather project info

Collect from the user (ask only what was not provided):

VariableExampleDefaultUsed in
{{name}}md-toolsrequiredpackage.json name, README title
{{description}}CLI tool to convert content to markdownrequiredpackage.json, README, SKILL.md
{{bin}}mdsame as {{name}}package.json bin field, CLI examples
{{repo}}acme/md-toolsrequiredpackage.json repository, badges
{{author}}Your Namerequiredpackage.json, LICENSE
{{year}}2026current yearLICENSE

Step 2: Create directory structure

{{name}}/
  .changeset/
  .github/
    workflows/
  src/
  skills/{{bin}}/

Step 3: Generate config files

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

Step 4: Generate source files

Load references/scaffold-source.md. Generate:

  • src/cli.ts: Commander entry point
  • src/index.ts: Public API exports
  • src/types.ts: Shared type definitions

Step 5: Generate docs and skill

From the same references/scaffold-source.md, generate:

  • AGENTS.md: commands, architecture, gotchas
  • README.md: install, usage, API, agent skill install, license
  • skills/{{bin}}/SKILL.md: agent skill definition

Do not create the CLAUDE.md symlink here; the post-scaffold sequence in Step 6 creates it exactly once.

Step 6: Run post-scaffold commands

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).

Step 7: Validate scaffold

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.

Dependencies

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.

Anti-patterns

  • Do not use CommonJS. Everything is ESM with "type": "module"; a require() call or missing .js import extension fails the NodeNext typecheck and build.
  • Do not put a shebang in 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.
  • Do not merge the dual tsdown builds. The CLI entry (shebang, no dts) and library entry (dts, no shebang) have conflicting output needs; merging breaks one or the other.
  • Do not add 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.
  • Do not run ultracite init before git init. Its lefthook integration installs hooks into .git/hooks during the install it triggers and fails without a repo.
  • Do not write "test": "vitest run" without --passWithNoTests. The scaffold ships zero test files, so plain vitest run exits 1 and the first CI run goes red.
  • Do not skip AGENTS.md or the skills/ directory; the scaffold's contract is that every generated CLI is agent-ready out of the box.
  • Do not create test files in the scaffold; the user adds tests for their specific features.
  • Do not add chalk or ora; see the replacements above.

After Scaffolding

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.

Related skills

FAQ

What does scaffold-cli include in a new project?

scaffold-cli generates a CLI skeleton with argument parsing, packaging configuration, test layout, and release conventions so developers can implement command logic on a runnable, publishable base.

When should developers use scaffold-cli?

scaffold-cli fits greenfield CLI projects before feature code is written. Use it when you need consistent parsing, tests, and packaging rather than patching an existing mature CLI codebase.

CLI & Terminaldevopsbackend

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.