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/radix-ng/primitives/new-primitivegit clone --depth 1 https://github.com/radix-ng/primitivesWrote 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/radix-ng/primitives/new-primitive)<a href="https://agentmods.dev/commands/radix-ng/primitives/new-primitive"><img src="https://agentmods.dev/badge/commands/radix-ng/primitives/new-primitive.svg" alt="Measured on agentmods" 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 | $0.00000 | $0.01872 |
| Opus 5 | $0.00000 | $0.00936 |
| Sonnet 5 | $0.00000 | $0.00374 |
| Haiku 4.5 | $0.00000 | $0.00187 |
Grade A, and why
new-primitive 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 5d 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 — 228 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/new-primitive
Scaffold a new headless Angular primitive in packages/primitives/<name>/, following
current project conventions (signals-first, no CDK, newer suffix-less naming).
Usage
/new-primitive <PrimitiveName> [--parts <part1,part2,...>] [--composes <existing-primitive>]
Arguments:
<PrimitiveName>— PascalCase name, e.g.Tabs,ProgressBar,Toggle--parts— comma-separated list of parts beyond Root (defaults to common sense for the ARIA pattern)--composes— existing primitive to build on viahostDirectives
Examples:
/new-primitive Tabs
/new-primitive Toggle --composes Checkbox
/new-primitive Breadcrumb --parts Item,Link,Separator
Conventions to follow (authoritative: CLAUDE.md + .claude/skills/project-knowledge/references/patterns.md)
- Reference Base UI first for the component API/anatomy, Radix UI second.
- Newer naming style (matches dialog/select/drawer): class
Rdx<Name><Role>and file<name>-<role>.ts— noDirectivesuffix, no.directive.ts. Selector[rdx<Name><Role>],exportAsrdx<Name><Role>. - No
@angular/cdk. It is fully removed. ImportBooleanInput/NumberInput/Directionfrom@radix-ng/primitives/core, not@angular/cdk/coercion. UseinjectId()for ids,RdxLiveAnnouncerfor announcements,isPlatformBrowser(inject(PLATFORM_ID))for platform checks. - Signals-first lifecycle. Avoid
ngOnInit/ngOnChanges/ngOnDestroyinsrc/**(ESLint warns). Use theconstructorfor DI/host-element work,effect()/computed()/linkedSignal()for input-driven logic,afterNextRender()/afterRenderEffect()for DOM work,inject(DestroyRef).onDestroy(...)for cleanup. - Headless state via
hostdata-attributes, never inline styles (CSS custom properties for animation dimensions are the only exception). Remove an attribute withundefined. - Compose existing primitives via
hostDirectiveswhen--composesis given (e.g. Accordion Item composes CollapsibleRoot).
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.
- 5d ago First seen · 228 lines · 0 tokens per session scan A bb9c8de5246a
new-primitive is a command published in the GitHub repository radix-ng/primitives (270 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,872 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.
Other commands, from other repositories
zag-changelog
Sync changelog updates from chakra-ui/zag repo to all Ark UI framework changelogs.
sync-docs
Update documentation and agent files based on learnings from recent component development work.
zag
Implement a Zag.js component in Ark UI.
override
Override an @marmoui/ui component or create a new custom component in the app's local ui/ folder — sets up the wrapper convention (src/ui/ re-exporting @marmoui/ui) on first run, then shadows or adds components without forking the package.
init
Initialize a project for on-brand Marmo UI generation — detect or interview for brand basics (layout, primary color, fonts, radius, spacing) and write a DESIGN.md if one doesn't exist.
prototype
Scaffold a shareable Marmo prototype with the comments + AI-edit overlay pre-wired. Deploys to Netlify and returns a public URL reviewers can sign into with Claude.