scaffold-component

scaffold-component is a command for Claude Code from oxygen-fragment/claude-modular. It costs 0 tokens per session (634 once invoked), scanned A, original, MIT.

A command that creates a new software component—a reusable part of an application—with its code, styles, tests, and documentation. It follows patterns already used in the project.

In plain words
What is it for?
Use it to create typed components with accessibility support, responsive styling, tests, Storybook examples, and project exports.
Why use it?
It reduces repetitive setup and helps new components match the project's existing structure and conventions.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to create typed components with accessibility support, responsive styling, tests, Storybook examples, and project exports.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/oxygen-fragment/claude-modular/scaffold-component
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/oxygen-fragment/claude-modular

Made for: Claude Code.

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-component

README.md
[![agentmods](https://agentmods.dev/badge/commands/oxygen-fragment/claude-modular/scaffold-component.svg)](https://agentmods.dev/commands/oxygen-fragment/claude-modular/scaffold-component)
Your own site
<a href="https://agentmods.dev/commands/oxygen-fragment/claude-modular/scaffold-component"><img src="https://agentmods.dev/badge/commands/oxygen-fragment/claude-modular/scaffold-component.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 634 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.00634
Opus 5 $0.00000 $0.00317
Sonnet 5 $0.00000 $0.00127
Haiku 4.5 $0.00000 $0.00063

Measured 7d ago against content hash 12ba153bd753, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

scaffold-component 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 7d 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.

.claude/commands/project/scaffold-component.md · 99 lines

What it actually says

Scaffold Component Command

2. **Component Generation**
   - Create component file with proper structure
   - Generate TypeScript interfaces/PropTypes
   - Add default props and proper typing
   - Include accessibility attributes

3. **Styling**
   - Create corresponding style files
   - Add responsive design considerations
   - Include theme variables and design tokens
   - Follow BEM or project naming conventions

4. **Testing**
   - Generate unit tests with common scenarios
   - Add accessibility testing
   - Create visual regression tests if configured
   - Include interaction testing

5. **Documentation**
   - Generate Storybook stories
   - Add JSDoc or similar documentation
   - Create usage examples
   - Document props and variants

6. **Integration**
   - Update component index files
   - Add to component library exports
   - Update type definitions
   - Add to design system documentation
# Generated files:
# - components/Button/Button.tsx
# - components/Button/Button.styles.ts
# - components/Button/Button.test.tsx
# - components/Button/Button.stories.tsx
# - components/Button/index.ts
```

```bash
# Complex component with variants
/project:scaffold-component Card --variants=default,outlined,elevated

# Generated with:
# - Multiple style variants
# - Comprehensive prop types
# - Stories for each variant
# - Accessibility considerations
```

```bash
# Form component with validation
/project:scaffold-component ContactForm --type=form --validation=yup

# Generated with:
# - Form state management
# - Validation schema
# - Error handling
# - Submission logic
```
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. 7d ago First seen · 99 lines · 0 tokens per session scan A 12ba153bd753

Subscribe to this mod's changes

scaffold-component is a command published in the GitHub repository oxygen-fragment/claude-modular (283 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 634 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-08-30.