Agent skill

Scaffold

by SethGammon in SethGammon/Citadel

Project-aware file generation. An agent skill from SethGammon/Citadel.

MITAuto-check passedAgent Workflows

Install Scaffold

skills CLI
$ npx skills add SethGammon/Citadel --skill scaffold -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install SethGammon/Citadel scaffold --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/SethGammon/Citadel.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/scaffold .claude/skills/scaffold && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
scaffold
GitHub stars
922
Token cost
~2.1k tokens
SKILL.md length
1,016 words
Files
3
Skills in repo
48
Repo updated
First seen
Licence
MIT

At a glance

Project-aware file generation. An agent skill from SethGammon/Citadel.

  • Works in 6 steps: IDENTIFY THE TARGET → FIND EXEMPLARS → DETERMINE THE FILE SET → …
  • Agent Workflows work in your project
  • SKILL.md covers Orientation, Protocol, Fringe Cases and Contextual Gates, plus 2 more sections
  • Calls git

What it does

Scaffold is an agent skill from SethGammon/Citadel. Project-aware file generation. Reads existing codebase conventions (naming, structure, imports, exports, test patterns) then generates new files that match exactly. Wires generated files into the project's registration points.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `__benchmarks__/component-from-exemplar.md` and `__benchmarks__/existing-dir.md`).

It sits in Agent Workflows. The repository describes itself as: The operating layer for Claude Code + OpenAI Codex: persistent project memory, intent routing, safety hooks, cost telemetry, and parallel agent fleets. The licence is MIT.

When your agent uses it

  • Agent Workflows work in your project

Example prompts

  • “/scaffold”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. IDENTIFY THE TARGET
  2. FIND EXEMPLARS
  3. DETERMINE THE FILE SET
  4. GENERATE THE FILES
  5. WIRE IT IN
  6. VERIFY

What it can do on your machine

Read from SKILL.md and the folder at commit e41ff1d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Scaffold loads about 2.1k tokens when it runs. Until then it costs about 59 tokens; SKILL.md has 1,016 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~59
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from SethGammon/Citadel at commit e41ff1d, republished under its MIT licence (© SethGammon). 1,016 words, ~2,111 tokens.

Download SKILL.mdSave it as .claude/skills/scaffold/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
scaffold
description
Project-aware file generation. Reads existing codebase conventions (naming, structure, imports, exports, test patterns) then generates new files that match exactly. Wires generated files into the project's registration points.
license
MIT
user-invocable
true
auto-trigger
false
trigger_keywords
scaffold, generate component, generate module, generate service, new component, new module, new route, new service, create component, stub out, bootstrap

/scaffold — Project-Aware File Generator

Orientation

Use when: Creating a new component, module, service, route, hook, domain, or utility with existing examples in the project.

Do NOT use when: The file has no precedent (use /marshal for unconstrained generation), you're modifying existing files (use /refactor), or the project has no conventions yet.

Needs: target type, name, and optional description.

Protocol

Step 1: IDENTIFY THE TARGET

Parse the user's request into:

  • type: component | module | service | route | hook | domain | utility | custom
  • name: the name the user gave (e.g., "UserProfile", "auth-service", "settings route")
  • description: what it does, if provided (otherwise leave blank for now)

If the type is ambiguous, ask ONE clarifying question. Do not ask more than one.

Step 2: FIND EXEMPLARS

Search the codebase for 2-3 existing files of the same type.

Search strategy by type:

TypeSearch PatternWhat to Look For
component**/*.tsx in the same directory or sibling directoriesFunctional components with similar complexity
moduleSame directory as where new module will liveRegistration pattern, exports, config shape
service**/services/**, **/lib/**Class vs function, singleton vs factory, error handling
routeRouter config files, **/routes.*, **/pages/**Route definition format, lazy loading, guards
hook**/hooks/**, **/use*.tsNaming, parameter patterns, return types, cleanup
domainTop-level domain/feature directoriesManifest structure, entry point, internal layout
utility**/utils/**, **/helpers/**Pure function style, type signatures, JSDoc

For each exemplar, extract:

  1. File naming convention (PascalCase, kebab-case, camelCase, snake_case)
  2. Directory placement (co-located with component? separate hooks/ dir?)
  3. Import style (path aliases? relative? named imports? default exports?)
  4. Export style (named exports? default? re-exported from barrel/index file?)
  5. Internal patterns (how state is managed, how errors are handled, JSDoc or no)
  6. Test co-location (.test.ts next to file? __tests__/ directory? separate tests/ tree?)
  7. Types pattern (inline? separate .types.ts? shared types file?)

Output a brief analysis (3-5 lines) summarizing the conventions you found.

Step 3: DETERMINE THE FILE SET

Based on the exemplars, determine which files to generate. Not every project needs every file. Only generate what the project's conventions call for.

Decision matrix:

FileGenerate IF...
Main fileAlways
Types file (.types.ts)Project separates types into their own files (check exemplars)
Test file (.test.ts)Project has co-located tests for this type of file
Barrel/index fileProject uses barrel exports AND this file's directory doesn't already have one
Barrel updateProject uses barrel exports AND the directory already has an index file
Style file (.module.css, .styled.ts)Project uses co-located styles for this type
Storybook file (.stories.tsx)Project has stories for this type of file

Do NOT generate:

  • Empty placeholder files with only a TODO comment
  • Test files that only contain describe('...', () => { it.todo('...') })
  • Types files that only re-export from elsewhere
  • Any file type the project doesn't already use
Step 4: GENERATE THE FILES

For each file in the set, generate content by adapting the closest exemplar.

Rules:

  1. Match the exemplar's structure exactly — same section order, same patterns
  2. Replace names and specific logic, keep structural patterns
  3. Every generated file must be syntactically valid and importable
  4. No placeholder comments (// TODO: implement, // Add logic here)
  5. No empty function bodies unless the exemplar has them
  6. Minimal but functional — renders something, has at least one real method, returns a typed value
  7. Match the project's TypeScript strictness

Match the exemplar's props pattern, state management, utility imports, async patterns, and error handling exactly.

Show full SKILL.md (460 more words)Show less
Step 5: WIRE IT IN

Find every registration point the exemplars use and add the new file there.

Common wiring points (check which ones the project uses):

Wiring PointHow to Find ItWhat to Add
Barrel exportsindex.ts in the same or parent directoryexport { NewThing } from './NewThing'
Route registrationRouter config file (search for exemplar's route)New route entry matching the pattern
Module registryBootstrap/registration fileNew registration call
Navigation/sidebarNav config arrayNew nav entry if appropriate
Lazy loading mapDynamic import mapNew lazy import entry
Type unionsDiscriminated unions that list all variantsNew variant if this is a new "type" of thing

Rules:

  1. Only wire into registration points that the exemplars actually use
  2. Match the exact format — same spacing, same trailing commas, same comments
  3. If a registration point uses alphabetical ordering, maintain it
  4. Never create new registration points — only add to existing ones
Step 6: VERIFY

Run typecheck — every generated file must pass. Fix failures before exiting. If typecheck is unavailable, do a manual read-through for syntax and import correctness.

Fringe Cases

  • Target directory or file already exists: Do not silently overwrite. Confirm with the user before proceeding. Output: "A file at {path} already exists. Overwrite it?" and wait for confirmation.
  • Template or exemplar not found: List the available file types in the codebase and ask which one to use as the exemplar. Never scaffold from memory if no exemplar exists.
  • Language or framework not detected: Ask the user directly rather than guessing. One question: "What type of file should this be? (e.g., React component, Express route, utility function)"
  • Typecheck fails after generation: Fix the issue before exiting — do not leave the user with broken generated files.
  • No wiring point found: Note the missing registration explicitly in the exit summary rather than silently leaving the file unwired.

Contextual Gates

Reversibility: Amber — creates new files and modifies registration points; git checkout to undo. Cost: No cost actions — file generation only; no agents spawned, no confirmation needed. Trust: No gates — safe at all trust levels; overwrite confirmation is in Fringe Cases.

Quality Gates

All of these must be true before the skill exits:

  • Found 2+ exemplar files of the same type in the project
  • Generated files match the project's naming convention exactly
  • Generated files match the project's import/export style exactly
  • No placeholder comments, TODO stubs, or empty function bodies
  • Every generated file is syntactically valid TypeScript/JavaScript
  • Main file is wired into the project (barrel export, route, registry, etc.)
  • Test file exists IF AND ONLY IF the project co-locates tests for this type
  • Types file exists IF AND ONLY IF the project separates types for this type
  • Typecheck passes (or manual verification if typecheck unavailable)

Exit Protocol

Output a summary in this format:

SCAFFOLD COMPLETE

Created:
  - path/to/MainFile.tsx (component)
  - path/to/MainFile.test.tsx (test)
  - path/to/MainFile.types.ts (types)

Wired into:
  - path/to/index.ts (barrel export)
  - path/to/routes.ts (route registration)

Conventions matched from:
  - path/to/ExemplarA.tsx
  - path/to/ExemplarB.tsx

Typecheck: PASS
---HANDOFF---
- Scaffolded: {name} ({type})
- Created: {N} files, wired into {N} registration points
- Conventions matched from: {exemplar names}
- Reversibility: green -- new files only, delete to undo
---

© SethGammon, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in skills/scaffold of SethGammon/Citadel.

  • SKILL.md
  • __benchmarks__/component-from-exemplar.md
  • __benchmarks__/existing-dir.md

Open the folder on GitHubat commit e41ff1d

Compare with similar skills

Scaffold next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Scaffold compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Scaffold this skillSethGammon/Citadel922—~2.1kAutomated safety check: PassMIT
Orca CLIstablyai/orca87k2 repos~593Automated safety check: PassMIT
OpenSpec Guided OnboardingFission-AI/OpenSpec71k1 repos~4.5kAutomated safety check: PassMIT
Claude Code Plugin Structureanthropics/claude-plugins-official38k10 repos~3.4kAutomated safety check: PassApache-2.0
Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills21k—~1.9kAutomated safety check: PassMIT
O2 Review Loopopenobserve/openobserve22k—~3.7kAutomated safety check: PassAGPL-3.0

Similar skills

  • Orca CLI

    stablyai/orca

    Operate Orca-managed worktrees, folder contexts, terminals, repos, automations, artifacts, skill sharing, worktree comments, and Orca's embedded browser…

    87k GitHub starsUsed in 2 repos~593 tokens
    Agent WorkflowsAuto-check passed
  • OpenSpec Guided Onboarding

    Fission-AI/OpenSpec

    Walks you through a complete OpenSpec workflow cycle with narration while doing real work in your codebase.

    71k GitHub starsUsed in 1 repo~4.5k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Plugin Structure

    anthropics/claude-plugins-official

    Official

    Explains the directory layout, plugin.json manifest and component organization of a Claude Code plugin, including auto-discovery and portable paths.

    38k GitHub starsUsed in 10 repos~3.4k tokens
    Agent WorkflowsAuto-check passed
  • Neat-Freak Knowledge Closeout

    KKKKhazix/khazix-skills

    Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.

    21k GitHub stars~1.9k tokensUpdated 7 days ago
    Agent WorkflowsAuto-check passed
  • O2 Review Loop

    openobserve/openobserve

    Splits a change into planner, coder and independent reviewer roles: you confirm a spec, a subagent implements it, and a separate reviewer checks each round's local WIP commit.

    22k GitHub stars~3.7k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Autoresearch Iteration Loop

    uditgoenka/autoresearch

    Runs an autonomous modify, verify, keep-or-discard loop against any metric, with subcommands for planning, debugging, fixing, security audits, shipping and more.

    6.5k GitHub starsUsed in 1 repo~2k tokens
    Agent WorkflowsAuto-check passed

More from SethGammon/Citadel

All 48 skills in this repo
  • Create Skill

    SethGammon/Citadel

    Creates new skills from the user's repeating patterns. An agent skill from SethGammon/Citadel.

    922 GitHub stars~1.9k tokensUpdated 6 days ago
    Auto-check passed
  • Houseclean

    SethGammon/Citadel

    Cross-drive storage audit and cleanup. An agent skill from SethGammon/Citadel.

    922 GitHub stars~2.2k tokensUpdated 6 days ago
    Auto-check passed
  • Loop

    SethGammon/Citadel

    Bounded foreground repetition for the current session. An agent skill from SethGammon/Citadel.

    922 GitHub stars~1.4k tokensUpdated 6 days ago
    Auto-check passed
  • Triage

    SethGammon/Citadel

    GitHub issue and PR investigator. An agent skill from SethGammon/Citadel.

    922 GitHub stars~2.7k tokensUpdated 6 days ago
    Auto-check passed
  • Watch

    SethGammon/Citadel

    File sentinel that monitors the working directory for changes and marker comments, then auto-triggers appropriate skills.

    922 GitHub stars~2.9k tokensUpdated 6 days ago
    Auto-check passed
  • Archon

    SethGammon/Citadel

    Autonomous multi-session campaign agent. An agent skill from SethGammon/Citadel.

    922 GitHub stars~5.4k tokensUpdated 6 days ago
    Auto-check passed

Questions about Scaffold

What does Scaffold do?

Project-aware file generation. An agent skill from SethGammon/Citadel. Scaffold is an agent skill from SethGammon/Citadel. Project-aware file generation.

When should I use Scaffold?

Scaffold fits situations like: agent Workflows work in your project.

How do I install Scaffold in Claude Code?

Run `npx skills add SethGammon/Citadel --skill scaffold -a claude-code`. Or copy the skill folder (skills/scaffold in SethGammon/Citadel) into .claude/skills/scaffold in your project. Claude Code loads it when a task matches its description.

How do I install Scaffold in Codex?

Run `npx skills add SethGammon/Citadel --skill scaffold -a codex`. Or copy the skill folder (skills/scaffold in SethGammon/Citadel) into .agents/skills/scaffold in your project. Codex loads it when a task matches its description.

Can I use Scaffold in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add SethGammon/Citadel --skill scaffold -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/scaffold, .gemini/skills/scaffold, .github/skills/scaffold and .opencode/skills/scaffold in your project.

What does Scaffold need to run?

Going by SKILL.md and its folder, Scaffold needs the command-line tools its instructions call (git).

Does Scaffold access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Scaffold safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Scaffold use?

Scaffold is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Scaffold use?

About 2.1k tokens (SKILL.md is roughly 8.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Scaffold?

Skills that share tags, products or a category with Scaffold: Orca CLI (stablyai/orca, 87k stars), OpenSpec Guided Onboarding (Fission-AI/OpenSpec, 71k stars), Claude Code Plugin Structure (anthropics/claude-plugins-official, 38k stars) and Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Scaffold?

SethGammon (a GitHub user) maintains it in SethGammon/Citadel, which has 922 GitHub stars. The repository holds 48 skills in this directory. The repository was last updated on October 1, 2026.

Source: SethGammon/Citadel on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.