Skip to content

Blogs

Under the Hood: How Skills, Principles & Workflows Work in AI Agents

A deep dive into AI agent architecture: how Principles, Skills, and Workflows differ, how the Skill Index is populated in system prompts, and how Cursor, Claude Code, Antigravity, Devin, Codex, Windsurf, and Copilot store them.

All blogs
1 min readAI AgentsArchitectureSystem DesignAxonAgentic Engineering

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.

AI Agent ArchitectureDeep Dive Guide

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

1. Principles (Rules)
ALWAYS-ON CONSTITUTION

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.

⚡ Always active across every turn.
2. Skills (Runbooks)
ON-DEMAND TASK RUNBOOKS

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.

🎯 Invoked autonomously or explicitly.
3. Workflows
MULTI-STAGE PIPELINES

Workflows orchestrate multiple primitive skills into end-to-end multi-phase pipelines (e.g. idea-lab running Clarify $\rightarrow$ Scrutinize $\rightarrow$ Harden $\rightarrow$ Prototype).

🚀 End-to-end product incubation.

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.

Discoverable Skills (disable-model-invocation: false)

When a skill is discoverable, its name and short description are registered into the LLM's Skill Index system prompt.

Result: LLM reads user prompt $\rightarrow$ matches intent $\rightarrow$ automatically loads and executes the full skill.
Non-Discoverable Skills (disable-model-invocation: true)

When a skill is marked non-discoverable, it is omitted from the automatic Skill Index to conserve LLM tokens.

Result: LLM will not auto-trigger. Skill only executes when explicitly invoked (e.g. /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 AgentSkills Directory FormatPrinciples (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.