Borrowing it
Nothing to install: this file belongs to radix-ng/primitives. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/radix-ng/primitives/main/.claude/agents/primitive-builder.mdgit 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/agents/radix-ng/primitives/primitive-builder)<a href="https://agentmods.dev/agents/radix-ng/primitives/primitive-builder"><img src="https://agentmods.dev/badge/agents/radix-ng/primitives/primitive-builder/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/agents/radix-ng/primitives/primitive-builder"><img src="https://agentmods.dev/badge/agents/radix-ng/primitives/primitive-builder.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.00037 | $0.02231 |
| Opus 5.5 | $0.00015 | $0.00892 |
| Sonnet 5.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 2mo 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.
- 2mo 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 (277 stars, last pushed 2d ago), licensed MIT. It adds 37 tokens to every session and 2,231 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.
primitive-builder compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| primitive-builderradix-ng/primitives | Agent | 277 | 2d ago | MIT | A | 37 | Claude Code |
| component-architectNickCrew/Claude-Cortex | Agent | 66 | 4mo ago | MIT | A | 37 | Claude Code |
| frontend-designerandisab/swe-marketplace | Agent | 21 | yesterday | MIT | A | 356 | Claude Code |
| design-token-extractorAdityaraj0421/naksha-studio | Agent | 353 | 19d ago | MIT | A | 280 | Claude Code |
| a11y-write-playwright-testsAmadeusITGroup/otter | Agent | 59 | yesterday | BSD-3-Clause | A | 59 | Claude Code |
| component-reviewerAboudjem/ui-ux-suite | Agent | 7 | 2mo ago | MIT | A | 15 | Claude Code |
| perspectivistSuanFishXYY/suanfish-design-system | Agent | 8 | 4mo ago | none | A | 82 | Claude Code |