scaffold

scaffold is a command for Claude Code from fatihkan/badi. It costs 0 tokens per session (397 once invoked), scanned A, original, MIT.

A code-generation command that creates starter files for modules, user-interface components, API endpoints, database changes, tests, and other common structures. It first studies the project's existing layout and coding patterns.

In plain words
What is it for?
Use it to create consistent skeletons for components, services, REST or GraphQL APIs, CRUD operations, middleware, migrations, or tests.
Why use it?
It reduces repetitive setup work and helps new files follow the project's naming, import, error-handling, and test conventions.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Part of the badi plugin — 81 skills, 86 commands, 30 agents, 7 hooks shipped together

Good fit Use it to create consistent skeletons for components, services, REST or GraphQL APIs, CRUD operations, middleware, migrations, or tests.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/fatihkan/badi/scaffold
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.

Clone the repo
git clone --depth 1 https://github.com/fatihkan/badi

Made for: Claude Code.

Or install badi, the plugin that ships this one along with the rest of its 81 skills, 86 commands, 30 agents, 7 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/fatihkan/badi/scaffold.svg)](https://agentmods.dev/commands/fatihkan/badi/scaffold)
Your own site
<a href="https://agentmods.dev/commands/fatihkan/badi/scaffold"><img src="https://agentmods.dev/badge/commands/fatihkan/badi/scaffold.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 397 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00000 $0.00397
Opus 5 $0.00000 $0.00198
Sonnet 5 $0.00000 $0.00079
Haiku 4.5 $0.00000 $0.00040

Measured today against content hash 1a64a0ab2e0b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

scaffold 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 today.

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.

.claude/commands/scaffold.md · 60 lines

What it actually says

Code scaffolding command. Analyzes project structure and generates consistent module, component, or API skeletons.

Required Tools

  • Read (existing code patterns)
  • Write (scaffold files)
  • Grep (pattern scan)
  • Glob (file structure analysis)
  • Agent (code-generator agent)

Procedure (5 Steps)

Step 1: Determine the Scaffold Type

Learn from the user what to create:

  • Module/Component — A new UI component or business-logic module
  • API Endpoint — A new REST/GraphQL endpoint set
  • CRUD — Full CRUD operations from a model definition
  • Test — Test scaffolding for existing code
  • Migration — A database migration file
  • Middleware — Middleware skeleton
  • Service — A new service class/module

Step 2: Analyze the Project Patterns

Scan the existing project structure:

  • Directory layout and naming conventions
  • Import/export patterns
  • Error-handling approach
  • Test file placement
  • Type definition styles

Step 3: Delegate to the Code-Generator Agent

Pass the agent:

  • Scaffold type and target name
  • The detected project patterns
  • Existing files to use as references

Step 4: Create the Files

Write the generated scaffold to disk:

  • Create the new files
  • Update the necessary index/barrel files
  • Add the imports

Step 5: Verify

  • Check the generated files match the project conventions
  • Verify there are no TypeScript/lint errors
  • List the next steps (TODO-marked spots)

Output Format

=== BADI SCAFFOLD ===
Type: [module/api/crud/test/migration]
Name: [component name]

Created Files:
  + [file path] (new)
  ~ [file path] (updated)

Next: add business logic at the TODO-marked spots.
====================
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. today First seen · 60 lines · 0 tokens per session scan A 1a64a0ab2e0b

Subscribe to this mod's changes

scaffold is a command published in the GitHub repository fatihkan/badi (7 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 397 tokens. 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-09-06.