Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/PolicyEngine/policyengine-claudenpx agentmods add commands/policyengine/policyengine-claude/create-new-componentWrote 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.
[](https://agentmods.dev/commands/policyengine/policyengine-claude/create-new-component)<a href="https://agentmods.dev/commands/policyengine/policyengine-claude/create-new-component"><img src="https://agentmods.dev/badge/commands/policyengine/policyengine-claude/create-new-component/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/policyengine/policyengine-claude/create-new-component"><img src="https://agentmods.dev/badge/commands/policyengine/policyengine-claude/create-new-component.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00024 | $0.02033 |
| Opus 5.5 | $0.00010 | $0.00813 |
| Sonnet 5.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 1mo 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.
- 1mo 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 (32 stars, last pushed 2d ago), licensed MIT. It adds 24 tokens to every session and 2,033 once invoked, about $0.0001 per session on Opus 5.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
profile
Save, load, inspect, update, reset, or delete diagram-design client profiles.
erne-animate
ERNE — Implement animations using the ui-designer agent with Reanimated and Gesture Handler.
ui-flow-review
Review menus, HUD, navigation, and player flow from a UX perspective.
design-audit
Audit the rendered design of live sites. Evidence capture first, then one critique per site. Argument is a URL, a repo name, or all.
responsive-design-specialist
Use when a layout breaks between sizes. Arbitrary breakpoints, type that does not scale, images that blow out the grid, or a desktop design retrofitted onto mobile.
ppt-image2-editable-rebuild
Rebuild image2 or imagegen reference slides as editable PowerPoint decks.