AI coding agents are fundamentally context-management engines. To make an LLM write consistent code, follow security runbooks, or debug complex frameworks, we supply instructions using three distinct primitives: Principles, Skills, and Workflows.
Understanding how these primitives work under the hood — and how different tools like Cursor, Claude Code, Gemini/Antigravity, Devin, Codex, Windsurf, and Copilot parse them — is essential for building scalable agent setups.
Below is an architectural breakdown of how skills, principles, and workflows function, how model invocation discovery works, and how file structures vary across AI agents.
How Principles, Skills & Workflows Work in AI Agents
Understanding the three core primitives of agent context management, how the LLM Skill Index handles auto-discovery, and how file formats vary across 7 major AI coding agents.
The 3 AI Agent Primitives
Principles are small, concise rule files (e.g. skill-attribution or claim-tagging). They are injected directly into the root system prompt or root agent rules.
Skills are task-specific runbooks (e.g. clarify-first or spring-startup-doctor). They contain YAML frontmatter controlling LLM discovery and step-by-step execution.
Workflows orchestrate multiple primitive skills into end-to-end multi-phase pipelines (e.g. idea-lab running Clarify $\rightarrow$ Scrutinize $\rightarrow$ Harden $\rightarrow$ Prototype).
How Skill Discovery & The Skill Index Work
AI agents cannot load every skill full-text into every conversation turn — doing so would exhaust token context limits. Instead, agent engines use a Skill Index.
disable-model-invocation: false)When a skill is discoverable, its name and short description are registered into the LLM's Skill Index system prompt.
disable-model-invocation: true)When a skill is marked non-discoverable, it is omitted from the automatic Skill Index to conserve LLM tokens.
/skill-name).How Different AI Agents Store Rules & Skills
Every AI coding tool expects a different directory layout and file format. This matrix breaks down where each agent reads its rules:
| AI Agent | Skills Directory Format | Principles (Rules) Format |
|---|---|---|
| Cursor | .cursor/rules/name.mdc | .cursor/rules/name.mdc |
| Claude Code | .claude/skills/name/SKILL.md | .claude/rules/name.md |
| Gemini / Antigravity | .agents/skills/name/SKILL.md | .agents/rules/name.md |
| Devin | .devin/skills/name/SKILL.md | .devin/rules/name.md |
| Codex | .codex/skills/name/SKILL.md | .codex/rules/name.md |
| Windsurf | .windsurf/rules/name.md | .windsurf/rules/name.md |
| GitHub Copilot | — | .github/instructions/name.md |
Next Steps in Agentic Engineering
Now that you understand the architecture, learn how to manage these files seamlessly using Axon CLI or explore our catalog of 23 open-source skills.