Once you use LLM tools for more than casual chat, you run into a problem: you keep repeating the same instructions. “Use this style.” “Check these files.” “Run this test.” “Prefer this source.” “Do not edit generated files.”
Skills, rules, agents, and subagents are different ways of making those instructions reusable.
Mental model: durable context for repeatable work
Think of these concepts as layers of reusable behavior:
| Concept | Beginner meaning |
|---|---|
| Rule | A standing instruction or constraint |
| Skill | A reusable workflow with instructions, references, scripts, or assets |
| Agent | A model-driven worker with tools and a task |
| Subagent | A specialized helper agent delegated by a main agent |
| Project instructions | Repo-specific guidance for how work should be done |
| MCP tool | A live capability exposed to a model, such as reading issues or querying a database |
Durable Context Hierarchy
Click an entity to see its role
Rules
Rules are durable instructions. In Google Antigravity, official docs describe rules as Markdown files that can be global or workspace-specific, with activation modes such as manual, always on, model decision, or glob-based. The current docs say workspace rules live in .agents/rules, while older .agent/rules paths remain supported.
Rules are best for constraints:
| Good rule | Weak rule |
|---|---|
“Use Hugo front matter with title, date, draft, and type.” | “Write better.” |
“Do not edit generated public/ files unless asked.” | “Be careful.” |
“Run hugo after content changes.” | “Make sure it works.” |
Official docs to verify:
Skills
A skill is a reusable workflow. In Codex-style environments, a skill can contain instructions plus supporting files, scripts, references, or assets. The useful thing about a skill is not just the prompt. It is packaging repeatable work so the agent knows how to do the task next time.
Good skill candidates:
| Skill idea | Why it helps |
|---|---|
| Blog post editor | Applies front matter, style, link checks, and build verification |
| Local model evaluator | Runs the same prompts against multiple models and records results |
| PR reviewer | Uses a consistent review checklist |
| Literature search | Searches sources, stores summaries, and writes citations |
Official OpenAI Codex resources mention saving workflows as skills and testing agent skills with evaluations. Verify current Codex skill mechanics in current OpenAI docs before publishing exact file layouts.
Agents
An agent is a model wrapped in a loop: observe, decide, act, observe again. For coding tools, actions may include reading files, searching code, editing, running tests, opening a browser, or calling MCP tools.
Agents are useful when:
- The task has multiple steps.
- The system can observe whether each step worked.
- Tools are available.
- Mistakes can be reviewed or rolled back.
- The value of autonomy is higher than the risk.
Agents are not magic. A one-shot prompt is often better for small tasks.
Subagents
Subagents are specialized workers delegated by a main agent. Anthropic’s Claude Code SDK docs describe subagents as separate agent instances for focused subtasks, context isolation, parallel work, specialized instructions, and tool restrictions. The current SDK docs emphasize programmatic definitions, while filesystem-based .claude/agents/ definitions are also documented as an alternative.
Subagents are useful when:
| Situation | Useful subagent |
|---|---|
| Large codebase search | Research subagent |
| Risky diff | Code review subagent |
| Broken tests | Debugging subagent |
| Security-sensitive change | Security audit subagent |
Official docs to verify:
Local LLMs and reusable workflows
Local LLMs can use the same ideas, but usually with more manual wiring. A local model does not automatically know your rules, tools, or project conventions. Your app or agent framework has to provide them.
Typical local pattern:
- Store instructions in Markdown.
- Load the relevant instruction file into the prompt.
- Expose local tools through an agent framework or MCP.
- Keep a small evaluation set.
- Record model, runtime, prompt, and result.
Example: local LLM evaluator skill
A simple local evaluator workflow could say:
---
name: local-llm-evaluator
description: Compare local models on a small fixed prompt set before recommending one.
---
1. Record hardware and runtime.
2. Verify model IDs and quantization.
3. Run the fixed prompt set.
4. Score output quality, speed, and failures.
5. Recommend the smallest model that passes the target tasks.
6. Save results with date, model ID, runtime, and parameters.
The important part is repeatability. If you test models differently every time, you are mostly testing your mood.
- Ouyang et al. (2022), "Training Language Models to Follow Instructions with Human Feedback": foundational work on instruction tuning and RLHF that explains why trained agents follow reusable instructions better than base models.
- Wei et al. (2022), "Emergent Abilities of Large Language Models": explains scaling phenomena relevant to choosing between models for reliable instruction and tool-use compliance.
- Xu et al. (2023), "Agents That Can Read: Diverse Retrieval-Augmented Generation for Questionnaire-style Machine Reading Assessment": relevant to how agents and subagents manage context, instructions, and information retrieval.
What to verify because tools change
Verify product-specific file paths, activation rules, subagent support, and tool permissions from official docs. The concepts are stable, but the exact implementation details differ across Codex, Claude Code, Antigravity, and local agent frameworks.
The practical lesson: skills and rules are how you stop retyping your working style. Subagents are how you split large work into focused roles. Local LLMs can participate, but the surrounding tool system decides how agentic they really are.