From atomic tools to reusable skills in AI agents
How prompts, atomic tools, and packaged skills fit together in AI agent runtimes, with progressive disclosure and a concrete SKILL.md release workflow.
Plain prompts and raw function-calling tools aren’t enough to run multi-step engineering workflows reliably. This post breaks down the hierarchy of prompts, atomic tools, and procedural skills, then walks through progressive disclosure and a production
SKILL.mdlayout.
Why atomic tool calls fall short
Function calling gave LLMs a way to interact with external systems. Reading files, running shell commands, and calling REST APIs let an agent inspect and change real state instead of just generating text.
Once I started wiring agents into real engineering tasks, though, I hit a clear structural limit: a flat list of atomic tools won’t produce repeatable automation on its own.
Tools are stateless and lack procedural knowledge
An individual tool is stateless and atomic. Take run_command: it accepts a shell command string and returns stdout and stderr. That signature (parameters: { command: string }) can’t encode engineering procedure:
- Which order the build, test, and tag steps must run in
- Which logs to inspect and how to roll back when a step fails
- Which pre-flight checks must pass before pushing a production release
Without procedural rules, the model has to re-invent the workflow from scratch on every run. Sometimes it gets the order right; sometimes it skips a check or guesses a destructive flag.
Bloated system prompts dilute attention
The usual workaround is stuffing every workflow rule into one giant system prompt. Once you pack Git release rules, database migration checks, API security guidelines, and code review criteria into a single prompt, three things break down:
- Wasted context and higher inference cost: Every turn pays token cost for instructions that have nothing to do with the current request.
- Attention dilution (lost in the middle): Once a system prompt stretches into tens of thousands of tokens, the model starts ignoring key constraints or mixing rules from unrelated workflows.
- No reuse or version control: A monolithic prompt blob is hard to edit safely, review in a pull request, or share across repositories.
That gap is where skills come in.
The three-tier hierarchy of prompts, tools, and skills
To keep an agent runtime predictable, you need clean boundaries between what a prompt, a tool, and a skill own.
flowchart TD
subgraph AgentRuntime["Agent Runtime"]
UserGoal["User goal ('Cut release v1.2.0')"]
Planner["Orchestrator / Reasoning Engine"]
SysPrompt["System prompt (lightweight skill index)"]
end
subgraph SkillLayer["Skill Layer (Procedural Capability)"]
SkillMeta["Skill metadata (name, trigger condition)"]
SkillDoc["SKILL.md (steps, constraints, checks)"]
Scripts["scripts/ (deterministic helpers)"]
Refs["references/ (domain policy docs)"]
end
subgraph ToolLayer["Tool Layer (Atomic Mechanism)"]
ToolGit["run_command (git tag, push)"]
ToolFile["read_file / write_to_file"]
ToolHTTP["curl / GitHub API calls"]
end
UserGoal --> Planner
SysPrompt --> Planner
Planner -->|"1. Match user intent"| SkillMeta
SkillMeta -->|"2. Load instructions on demand"| SkillDoc
SkillDoc -->|"3. Read domain rules"| Refs
SkillDoc -->|"4. Run deterministic scripts"| Scripts
SkillDoc -->|"5. Chain atomic tools"| ToolGit
SkillDoc --> ToolFile
SkillDoc --> ToolHTTP
Comparing the three layers
| Layer | Abstraction | Core responsibility | Example |
|---|---|---|---|
| Prompt | Cognitive state | Sets role, persona, output format, and top-level operating principles | “You are a backend release engineer.” |
| Tool | Atomic mechanism | Executes a single I/O operation against the outside world | run_command, read_file, web_search |
| Skill | Procedural capability | Packages instructions + tool orchestration + domain rules + deterministic scripts + rollback logic for one repeatable job | git-release-manager, db-migration-verifier |
I like to think of the split in plain terms:
- Tools are hands—they execute a single action, but they don’t know what comes next.
- Prompts set high-level intent and persona, but lose focus if you overload them with step-by-step procedures for dozens of jobs.
- Skills are packaged procedures. They define which tools to call, in what order, what to verify, and how to recover when a step fails.
Progressive disclosure in agent runtimes
The main architectural trick behind skills is progressive disclosure. Instead of dumping every workflow document into the prompt at startup, the runtime loads context in three stages only when it’s needed.
sequenceDiagram
autonumber
participant Agent as Agent Runtime
participant Memory as LLM Context Window
participant Disk as Skill Filesystem (.agent/skills/)
Note over Agent,Memory: Stage 1: Discovery
Disk->>Memory: Inject skill names and 1-line descriptions (~50 tokens/skill)
Note over Agent,Memory: Stage 2: Activation
Agent->>Agent: Parse user intent ("Cut a release")
Agent->>Disk: Read git-release/SKILL.md
Disk-->>Memory: Load workflow steps and constraints (1,000-2,000 tokens)
Note over Agent,Memory: Stage 3: Deep Execution
Memory->>Disk: Run scripts/preflight_check.sh and read stdout
Memory->>Disk: Read references/semver-rules.md on demand
Agent-->>Agent: Execute atomic tools to finish safely
- Discovery: The initial system prompt only carries each skill’s
nameand shortdescription. Even with 50 installed skills, the index stays under roughly 2,000 tokens. - Activation: Once the user’s request matches a skill, the agent reads that skill’s
SKILL.mdinto context using a normal file-read tool. - Deep execution: Anything that demands exact computation—SemVer math, regex validation, file parsing—gets delegated to deterministic scripts under
scripts/. Reference policies underreferences/are opened only if an edge case comes up.
Standard skill directory layout
Modern agent runtimes like Claude Code, Antigravity, and Semantic Kernel treat a skill as an isolated filesystem package rather than a loose text snippet.
1
2
3
4
5
6
7
8
9
10
11
skills/
└── git-release-manager/
├── SKILL.md # [Required] Frontmatter metadata and workflow steps
├── scripts/ # [Optional] Deterministic helper scripts
│ ├── bump_version.py # SemVer validation and next-tag calculation
│ └── preflight_check.sh # Clean working tree and CI status verification
├── references/ # [Optional] On-demand domain policy docs
│ ├── semver-rules.md # Team semantic versioning specification
│ └── rollback-guide.md # Emergency rollback steps for failed releases
└── examples/ # [Optional] Few-shot execution references
└── release-demo.md
Each folder has a narrow job:
SKILL.md: The entrypoint. YAML frontmatter tells the runtime when to trigger the skill, while the markdown body spells out ordered steps, verification gates, and explicit prohibitions.scripts/: Python, Bash, or Node.js helpers for work LLMs are bad at—exact string parsing, version arithmetic, schema checks, or bulk file transformations. The model invokes the script and reasons over stdout.references/: Longer policy docs, error tables, or API specs kept out ofSKILL.md. Pulling them in only on demand prevents routine runs from paying token overhead for rare edge cases.
A production SKILL.md specification
Here’s a concrete SKILL.md for automating a Git release with pre-flight checks, deterministic version bumping, and explicit rollback guardrails.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
name: git-release-manager
description: Analyzes repository commits to compute a SemVer tag, update CHANGELOG.md, and publish a GitHub release safely.
required_tools:
- run_command
- read_file
- write_to_file
tags: [git, release, semver, cicd]
---
# Git Release Manager Skill
## 1. Pre-flight checks
Run this skill only when the working tree is clean and the latest commit on `main` has passed CI.
Always execute the pre-flight script before making any changes:
```bash
bash scripts/preflight_check.sh
```
- If stdout isn't `PREFLIGHT_PASS`, stop immediately and report the exact failure reason to the user.
## 2. Standard release workflow
### Step 1: Determine the next version
1. Inspect the most recent Git tag:
```bash
git describe --tags --abbrev=0
```
2. Review commits since that tag:
```bash
git log $(git describe --tags --abbrev=0)..HEAD --oneline
```
3. Compute the next SemVer version from commit prefixes (`feat`, `fix`, `BREAKING CHANGE`):
```bash
python3 scripts/bump_version.py --target-type auto
```
### Step 2: Update the changelog
- Exclude `docs:` and `chore:` commits; summarize only user-facing changes (`feat:`, `fix:`) at the top of `CHANGELOG.md`.
- Group entries according to `references/semver-rules.md`.
### Step 3: Tag and push
1. Commit the changelog update:
```bash
git add CHANGELOG.md
git commit -m "docs: update changelog for vX.Y.Z"
```
2. Create an annotated tag:
```bash
git tag -a vX.Y.Z -m "Release vX.Y.Z"
```
3. Push the commit and tag together:
```bash
git push origin main --follow-tags
```
## 3. Error handling and rollback
- If pushing to the remote fails with a conflict, delete the local tag right away:
```bash
git tag -d vX.Y.Z
```
- Never run `git push --force`.
Writing explicit prohibitions and rollback commands (
git tag -d) directly insideSKILL.mdstops the agent from improvising destructive recovery commands like--forceorrm -rfwhen something fails mid-run.
When to package a skill—and when not to
Encapsulating a workflow as a skill pays off in three clear ways:
- Deterministic reliability: Offloading regex checks, SemVer math, and linting to scripts lets the LLM focus on state transitions and tool ordering instead of brittle token-level arithmetic.
- Context efficiency: Progressive disclosure keeps the base prompt small, so one agent can support dozens of domain workflows without burning tokens on every turn.
- Shareable team assets: Senior engineers’ release checklists and debugging procedures become versioned files in Git that anyone on the team can run and review.
That said, don’t wrap everything in a skill. Skip the skill layer when:
- It’s a one-off task: If you won’t run the procedure more than twice, a short direct prompt is faster to write and maintain.
- There’s no branching logic or LLM judgment: If the steps are 100% deterministic from start to finish, write a plain shell script, Makefile target, or GitHub Actions workflow instead of involving an LLM at all.
- The skill just wraps one tool call: A skill that only says “run
git status” adds indirection without adding value.
Takeaways and checklist
Better foundation models alone don’t turn an agent into a dependable engineering tool. How you structure the boundary between intent, procedure, and execution matters just as much.
Before you ship a new skill into a team repository, run through this short checklist:
- Keep the frontmatter
descriptionsharp and specific so the runtime triggers it only on matching requests. - Move exact calculations, parsing, and validation out of prose and into
scripts/. - Put large policy tables or rare edge cases in
references/so routine runs stay cheap. - Declare explicit stop conditions, forbidden commands, and rollback steps right inside
SKILL.md.
Once a team accumulates more than a handful of skills, copying SKILL.md folders by hand quickly breaks down. In my next post on distributing AI agent skills through a GitHub marketplace, I walk through versioning, dependency checks, and security auditing for shared skill packages.