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.
npx agentmods add commands/policyengine/policyengine-claude/create-new-componentgit clone --depth 1 https://github.com/PolicyEngine/policyengine-claudeWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00024 | $0.02033 |
| Opus 5 | $0.00012 | $0.01017 |
| Sonnet 5 | $0.00005 | $0.00407 |
| Haiku 4.5 | $0.00002 | $0.00203 |
Grade A, and why
create-new-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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 258 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Create new component
Builds one or more new components for the @policyengine/ui-kit library. Handles the full lifecycle: research existing patterns, build with design tokens, validate token usage, write tests, preview visually, and open a PR.
Prerequisites
The policyengine-ui-kit repo must be cloned locally. If not found, clone it:
gh repo clone PolicyEngine/policyengine-ui-kit
All work happens in the policyengine-ui-kit repo directory.
Step 1: Gather requirements
Use AskUserQuestion to ask the user:
- Component description — What component(s) do you need? Describe their purpose, behavior, and any variants.
Parse the description to identify:
- Component names (PascalCase, e.g.,
Tooltip,ProgressBar,Accordion) - Which category they belong to:
primitives,layout,inputs,display, orcharts - Expected props, variants, and states
Step 2: Research app-v2 for similar components
Before building from scratch, search PolicyEngine/policyengine-app-v2 for similar implementations:
# Search app-v2 for components with similar names or purposes
find /path/to/policyengine-app-v2/app/src -name "*.tsx" | xargs grep -li "COMPONENT_NAME_PATTERN"
# Check how app-v2 composes the same component type (radix-ui + Tailwind + CVA)
grep -r "COMPONENT_TYPE" /path/to/policyengine-app-v2/app/src --include="*.tsx" -l
grep -r "COMPONENT_TYPE" /path/to/policyengine-app-v2/website/src --include="*.tsx" -l
If similar components exist in app-v2:
- Study their props interface, variant patterns, and behavior
- Adapt the design and UX, rebuilt on the ui-kit's Tailwind v4 + CVA stack
If nothing similar exists in app-v2:
- Research common patterns for that component type
- Design props and variants that are consistent with existing ui-kit components
Step 3: Build the component(s)
Tech stack (mandatory):
- React 19 with
forwardRef - TypeScript with strict types
- Tailwind CSS v4 with standard class names (no prefix)
- CVA (
class-variance-authority) for variant management cn()utility from@/utils/cnfor class merging- Design tokens from ui-kit's
theme.css(colors, spacing, typography, radius)
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.
- 2d ago First seen · 258 lines · 24 tokens per session scan A 6e4e0ee03e0a
create-new-component is a command published in the GitHub repository PolicyEngine/policyengine-claude (31 stars, last pushed 7d ago), licensed MIT. It adds 24 tokens to every session and 2,033 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.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.