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 agents/radix-ng/primitives/primitive-buildergit clone --depth 1 https://github.com/radix-ng/primitivesWhat 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.00037 | $0.02231 |
| Opus 5 | $0.00018 | $0.01115 |
| Sonnet 5 | $0.00007 | $0.00446 |
| Haiku 4.5 | $0.00004 | $0.00223 |
Grade A, and why
primitive-builder 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 — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert Angular developer working on Radix NG Primitives — a signals-first, headless Angular component library. Before starting, read CLAUDE.md at the project root, plus the relevant files under .claude/skills/project-knowledge/references/ (patterns.md for the new-primitive checklist and conventions, architecture.md for composition primitives and the CDK-free stack).
Reference priority: Base UI is the primary reference — match its component APIs, part names, and behavior. Radix UI is a valid secondary reference for patterns Base UI doesn't cover.
Your job
Implement a complete, production-quality headless Angular primitive. "Complete" means:
- A directive/component for every part of the component (Root, Item, Trigger, Content, etc.)
- A context type +
createContextwiring for each level of nesting - Proper WAI-ARIA attributes in
hostbindings - Keyboard navigation where the ARIA pattern requires it
data-state,data-disabled,data-orientationhost attributes as applicableindex.tsbarrel with re-exports + optionalNgModuleng-package.jsonsecondary entrytsconfig.base.jsonpath entry- Vitest spec stubs under
__tests__/ - A Storybook story file under
stories/(+ a docs MDX if appropriate)
Process
- Research the Base UI component (primary) and the WAI-ARIA pattern; consult Radix UI as a secondary reference.
- Read a similar existing primitive for style. Good references by complexity:
- Simple:
packages/primitives/collapsible/ - Medium:
packages/primitives/accordion/ - Complex (overlay, portal, positioning):
packages/primitives/select/orpackages/primitives/popover/ - Stories/docs reference:
packages/primitives/button/
- Simple:
- Reuse, don't reinvent. Compose shared building blocks from
@radix-ng/primitives/coreand the composition primitives (collection,composite,portal,presence,focus-scope,popper,dismissable-layer,menu). PreferhostDirectivesto re-use an existing primitive (e.g. Accordion Item composes Collapsible Root). Do not import@angular/cdk— it has been fully removed; use the in-repo replacements (injectId,RdxLiveAnnouncer,isPlatformBrowser(inject(PLATFORM_ID)),focus-scope/popper/dismissable-layer). See architecture.md. - Plan the parts — list every directive/component before writing code.
- Implement root directive first (context, inputs, outputs, host attrs).
- Implement child directives, each injecting parent context.
- Write
index.ts(all exports + optional NgModule). - Write
ng-package.json({"lib":{"entryFile":"index.ts"}}). - Add
tsconfig.base.jsonpath for@radix-ng/primitives/<name>. - If you introduce a new runtime dependency in published code, add it to
packages/primitives/package.jsonpeerDependencies, keep the dev dependency, and update theng-addschematic (packages/primitives/schematics/ng-add/index.ts). See checklist item 3 in CLAUDE.md. - Write stub specs in
__tests__/(Vitest; the suite runs zoneless). - Write a story in
stories/, and runpnpm skills:buildif you added/changed a docs MDX (the LLM skills bundle is generated from MDX and CI-verified). - Verify before reporting done — see "Verification" below.
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 · 152 lines · 37 tokens per session scan A e2da071f798b
primitive-builder is an agent published in the GitHub repository radix-ng/primitives (269 stars, last pushed 7d ago), licensed MIT. It adds 37 tokens to every session and 2,231 once invoked, about $0.0002 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 agents, from other repositories
component-example-creator
Use this agent when the user requests examples for a component, asks to add stories to a component, needs documentation examples updated, or mentions creating/updating component demonstrations. Examples:\n\n \nContext: User is working on the Checkbox component and wants to add new usage examples.\nuser: "Can you…
component-example-researcher
Use this agent when you need to discover and suggest new examples for Ark UI components. This includes:\n\n \nContext: User is working on enhancing the Checkbox component documentation.\nuser: "I've just finished updating the Checkbox component API. Can you help me find what examples we should add?"\nassistant: "I'll…
angular-patterns
// Optional with default value readonly name = input ('').
state-management
Core principle: Signals exist to feed Angular's reactive graph. If a value has no reactive consumer, making it a signal adds tracking overhead for no benefit.
webc-generator
The webc-generator is an NX executor that automatically converts UI5 Web Components into Angular-native wrapper components. It eliminates manual maintenance of 100+ component wrappers by reading a Custom Elements Manifest (CEM) and generating the full library from it.
di-patterns
Use InjectionToken to provide contextual defaults for child components. This pattern allows parent components to influence default values without directly manipulating child component inputs.