scaffold-cli

scaffold-cli is a skill for Claude Code, Codex from porcupine-md/jonggrang. It costs 18 tokens per session (1,061 once invoked), scanned A, original, MIT.

A guide for adding a new command to an existing command-line program, including its arguments, help text, handling code, and tests.

In plain words
What is it for?
Use it to add a command in Go, Rust, Python, or Node.js, with validated options, usage examples, error handling, and automated tests.
Why use it?
It reduces the need to work out the project's command structure and conventions from scratch. Following the existing patterns helps the new command behave like the others.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/porcupine-md/jonggrang/scaffold-cli
Any agent
npx skills add porcupine-md/jonggrang --skill scaffold-cli
Clone the repo
git clone --depth 1 https://github.com/porcupine-md/jonggrang

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for scaffold-cli

README.md
[![agentmods](https://agentmods.dev/badge/skills/porcupine-md/jonggrang/scaffold-cli.svg)](https://agentmods.dev/skills/porcupine-md/jonggrang/scaffold-cli)
Your own site
<a href="https://agentmods.dev/skills/porcupine-md/jonggrang/scaffold-cli"><img src="https://agentmods.dev/badge/skills/porcupine-md/jonggrang/scaffold-cli.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,061 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00018 $0.01061
Opus 5 $0.00009 $0.00531
Sonnet 5 $0.00004 $0.00212
Haiku 4.5 $0.00002 $0.00106

Measured 6d ago against content hash 532cb372e27d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

scaffold-cli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/core/scaffold-cli/SKILL.md · 121 lines

How it starts

The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Context

Project {{project_name}} is a CLI application using {{stack}}. You will create a new command "{{input.name}}".

Read AGENTS.md for conventions. Read existing commands to understand patterns.

Instructions

  1. Analyze existing command patterns

    • Read existing command files
    • Identify: argument parsing library (cobra, clap, click, commander, argparse, etc.)
    • Identify: command registration pattern (subcommands, router, etc.)
    • Identify: output formatting (table, JSON, plain text, colored)
    • Note error handling patterns (exit codes, stderr vs stdout)
  2. Create command file

    • Path: according to project convention
      • Go (cobra): cmd/{{input.name}}.go or internal/cmd/{{input.name}}.go
      • Rust (clap): src/commands/{{input.name}}.rs
      • Python (click): src/commands/{{input.name}}.py
      • Node (commander): src/commands/{{input.name}}.ts
    • Implement:
      • Command definition with name, description, aliases
      • Argument/flag parsing with validation
      • Help text with usage examples
      • Handler function with business logic
  3. Create argument/flag definitions

    • Define all required and optional flags
    • Set proper types (string, bool, int, etc.)
    • Add short aliases where appropriate (-o for --output)
    • Set sensible defaults
    • Add validation for required args
  4. Register command

    • Add to root command / command registry
    • Ensure it shows up in --help output
    • Set up proper parent-child relationship for subcommands
  5. Implement handler logic

    • Separate business logic from CLI plumbing
    • Use project's existing service/logic layer
    • Handle errors gracefully with helpful messages
    • Respect --quiet/--verbose flags if they exist
    • Use proper exit codes (0 = success, 1 = error, 2 = usage error)
  6. Create tests

    • Path: according to convention
    • Test cases:
      • Command executes successfully with valid args
      • Help text is correct
      • Required args validation works
      • Flag parsing works correctly
      • Error cases return proper exit codes
      • Output format is correct

Read the full file on GitHub · 121 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 121 lines · 18 tokens per session scan A 532cb372e27d

Subscribe to this mod's changes

scaffold-cli is a skill published in the GitHub repository porcupine-md/jonggrang (11 stars, last pushed 10d ago), licensed MIT. It adds 18 tokens to every session and 1,061 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

sync-new-data-type

Adds scaffolding for a new Sync data type in Chromium across protocol buffers, DataType definitions, feature flags, controller builders, unit tests, and metrics.

chromium/chromium · 36 tokens

generate-testability-wrappers

DO NOT USE when the target already consumes an injected interface or built-in abstraction such as IFileSystem or TimeProvider, even if the request says "generate a wrapper"; no new wrapper is needed. Use only when C# source calls an ambient/static dependency and no injectable seam exists: first-time TimeProvider…

dotnet/skills · 147 tokens

convex-test

Generate convex-test tests for the app's Convex functions.

openclaw/clawhub · 16 tokens

platform-apex-test-generate

Generate and validate Apex test classes with TestDataFactory patterns, bulk testing (251+ records), mocking strategies, assertion best practices, and disciplined test-fix loops. Use this skill when creating new Apex test classes, improving test coverage, debugging and fixing failing Apex tests, running test execution…

forcedotcom/sf-skills · 135 tokens

platform-apex-test-run

Apex test execution, coverage analysis, and test-fix loops with 120-point scoring. Use when the user needs to run Apex tests, check code coverage, fix failing tests, or work with Test.cls / Test.cls files. TRIGGER when: user runs Apex tests, checks code coverage, fixes failing tests, or touches Test.cls / Test.cls…

forcedotcom/sf-skills · 124 tokens

backend/testing-guide

后端测试编写指南,包括单元测试、集成测试和E2E测试的编写方法和最佳实践.

echoVic/boss-skill · 30 tokens