add-primitive
Skill7 starsChanged 3 months agoISCView on GitHub
Add or modify AI primitive definitions in the data layer with correct typing and complete metadata. Use when adding new primitives, updating descriptions, or extending primitive categories.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-providerSkill
- advisorSkill
- co-authorSkill
- create-componentSkill
- create-pageSkill
- generate-llmsSkill
- page-stylingSkill
- refresh-provider-docsSkill
- semantic-commitSkill
- theme-stylingSkill
- write-e2e-testSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Add or modify AI primitive definitions for agentconfig.org.
- Very specific: line 74
If the primitive has associated files, add nodes to both trees in site/src/data/fileTree.ts:
- Very specific: line 76
For Copilot: - Add to copilotTree:
- Very specific: line 93
For Claude, Cursor, and Codex: - Add to the corresponding tree (claudeTree, cursorTree, codexTree) with equivalent structure.
- Very specific: line 154
Do not reuse the retired execution/safety category names.
- Distinctive: line 158
Before considering the primitive complete:
- Distinctive: line 171
Missing file tree entries: - If the primitive has files, both trees need updates
- Distinctive: line 174
Missing support level: - Every provider implementation needs a support level
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add Primitive
Add or modify AI primitive definitions for agentconfig.org.
Overview
Primitives appear in these places:
- Primitive Cards -
site/src/data/primitives.ts(the single canonical source) - File Tree -
site/src/data/fileTree.ts - Provider Comparison -
site/src/data/comparison.ts(derived automatically fromprimitives.ts; never hand-edited) - Provider Profiles -
site/src/data/providerProfiles.ts(also derived automatically fromprimitives.ts; never hand-edited)
Step-by-Step Process
1. Define the Primitive
Edit site/src/data/primitives.ts:
{
id: 'your-primitive-id', // lowercase, hyphens
name: 'Display Name',
description: 'One-sentence summary.',
whatItIs: 'Detailed explanation of the concept.',
useWhen: [
'First use case',
'Second use case',
],
prevents: 'What problem/failure this prevents',
combineWith: ['Other Primitive', 'Another Primitive'],
implementations: [
{
provider: 'copilot',
implementation: 'How Copilot implements this',
location: '.github/path/to/file',
support: 'full', // 'full' | 'partial' | 'diy'
sourceUrl: 'https://docs.github.com/...', // primary provider documentation
},
{
provider: 'claude',
implementation: 'How Claude implements this',
location: '.claude/path/to/file',
support: 'full',
sourceUrl: 'https://code.claude.com/docs/...',
},
{
provider: 'cursor',
implementation: 'How Cursor implements this',
location: '.cursor/path/to/file',
support: 'full',
sourceUrl: 'https://cursor.com/docs/...',
},
{
provider: 'codex',
implementation: 'How Codex implements this',
location: '~/.codex/path/to/file',
support: 'full',
sourceUrl: 'https://developers.openai.com/codex/...',
},
],
category: 'instructions', // one of the 8 layer ids — see Categories below
}Always list all four providers (copilot, claude, cursor, codex) even when support is partial or diy — a missing provider entry silently reads as "no data" rather than "not supported," which the refresh-provider-docs skill and comparison table both rely on to stay honest. Cite a primary sourceUrl for every claim; do not add a primitive with unverified provider claims (use the refresh-provider-docs skill first if you have not already confirmed the paths against current documentation).
2. Add to File Tree (if applicable)
If the primitive has associated files, add nodes to both trees in site/src/data/fileTree.ts:
For Copilot - Add to copilotTree:
{
id: 'copilot-your-primitive',
name: 'your-file.md',
type: 'file',
details: {
label: 'Short Label',
description: 'What this file does.',
whatGoesHere: ['Content item 1', 'Content item 2'],
whenLoaded: 'When this file is loaded.',
loadOrder: 5, // 1 = first loaded
example: `Example content here`,
},
}For Claude, Cursor, and Codex - Add to the corresponding tree (claudeTree, cursorTree, codexTree) with equivalent structure.
3. Comparison Matrix and Provider Profiles need no separate edit
site/src/data/comparison.ts and site/src/data/providerProfiles.ts both compute their rows from primitives.ts at import time (comparisonData maps every entry in the primitives array). Once step 1 adds all four provider implementations to primitives.ts, the comparison matrix and provider profiles pick up the new primitive automatically. Do not hand-edit either file — doing so would duplicate the same fact in two places and reintroduce the drift this derivation was built to eliminate (see PR #42's review history for the class of bug this prevents).
4. Add scope metadata, not a new primitive, when the concept is "where this applies"
If what you're adding describes where a primitive applies (user vs. repository vs. directory vs. session, etc.) rather than a new independent capability, it belongs in scopeModel in primitives.ts, not as a new peer primitive. Scopes are not primitives — see the Scope Model section on the homepage for the existing nine-scope vocabulary before inventing a new one.
Data Types Reference
Primitive Interface
interface Primitive {
id: string
name: string
description: string
whatItIs: string
useWhen: string[]
prevents: string
combineWith: string[]
implementations: ProviderImplementation[]
category: LayerId
}Provider Implementation
interface ProviderImplementation {
provider: 'copilot' | 'claude' | 'cursor' | 'codex'
implementation: string
location: string
support: 'full' | 'partial' | 'diy'
sourceUrl?: string // primary provider documentation backing this claim
}Support Levels
primitives.ts (ProviderImplementation.support) uses one shared enum: 'full' | 'partial' | 'diy':
full- Native, well-documented supportpartial- Works but with limitationsdiy- No built-in support; requires custom setup to approximate
comparison.ts's SupportLevel type is now a type alias for this same enum (ComparisonRow[provider].level derives directly from ProviderImplementation.support), so a row with diy in primitives.ts also shows diy in the comparison table — there is no separate none value to translate to.
Categories (Layers)
The taxonomy groups primitives into eight layers (LayerId in site/src/data/primitives.ts), each representing a different concern in an agent's configuration:
instructions- Standing guidance loaded into context (e.g. AGENTS.md)procedures- Repeatable, invokable workflows (e.g. slash commands, skills)tools-context- External tools and data sources (e.g. MCP)delegation- Handing off work to another agent persona (e.g. custom agents)control-approval- Constraints on what the agent may do (e.g. guardrails, hooks, sandboxing)memory-state- Durable state carried across sessions (reserved; not yet backed by a primitive — see the CCR note onglobal-instructionsbefore adding one)distribution- How shared configuration is packaged and discovered across scopesverification-observability- Checks that validate output before it ships
Do not reuse the retired execution/safety category names; every primitive's category field must be one of the eight ids above, and site/src/data/primitives.ts's categories array is the source of truth for display names and ordering.
Checklist
Before considering the primitive complete:
- Added to
primitives.tswith all required fields, all four providers, and asourceUrlper implementation - Added to
fileTree.tsfor each provider with associated files idis unique and matches acrossprimitives.tsandfileTree.tscombineWithreferences valid primitive names- Examples in file tree are accurate and helpful
- Run
bun run typecheck- No TypeScript errors - Visually verify the primitive on the Primitive Cards, Provider Comparison, and Provider Profiles sections (the latter two derive automatically from
primitives.ts— verifying them confirms the derivation picked up the new row, not that you need to edit them)
Common Mistakes
- Hand-editing
comparison.tsorproviderProfiles.ts- Both derive fromprimitives.ts; edit onlyprimitives.tsand the derived views update automatically - Missing file tree entries - If the primitive has files, both trees need updates
- Stale combineWith - Referencing primitives that don't exist
- Incorrect load order - File tree
loadOrdershould reflect actual precedence - Missing support level - Every provider implementation needs a support level
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

