跪拜 Guibai
← All articles
Kotlin · VibeCoding · Android

Agent Skills Turn Reusable AI Workflows into a File, Not a Repeated Prompt

By RockByte ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Agent Skills shift AI-assisted development from ad-hoc prompting to repeatable, testable workflows that can be version-controlled in a project's `.agents/skills/` directory. Teams get consistent code reviews, generated docs, and automated pipelines without every engineer needing to craft the same long prompt from scratch.

Summary

Agent Skills, an open standard from Anthropic now supported by Claude Code, OpenAI Codex, and tools like Trae and CodeBuddy, solve the core instability of AI coding: the same prompt rarely produces the same result twice. A Skill is a directory containing a SKILL.md file with metadata and instructions, plus optional scripts and reference documents. Agents discover Skills through a progressive disclosure mechanism, loading only names and descriptions until a task matches, which keeps context windows lean even with dozens of Skills installed. The format is portable across compatible agents and composable, so a code-review Skill and a release-notes Skill can chain together in one session. A minimal code-review Skill defines a step-by-step checklist, points to a style guide, and can call a performance analysis script, all triggered by natural language like "review this PR."

Takeaways
A Skill is a directory with a SKILL.md file, optional scripts, and reference documents that tells an agent how to handle a specific task class.
Progressive disclosure means agents first read only a Skill's name and description; full instructions load only when the task matches, preserving context.
Skills are portable across Claude Code, OpenAI Codex, Trae, CodeBuddy, and other compatible agents, though platform-specific tools may need adaptation.
Composability lets an agent chain multiple Skills in one session, such as running a code review followed by automated release-note generation.
A Skill is not a replacement for prompts or tools; it organizes them into a repeatable workflow, while MCP handles external service connections.
Project-level Skills live in `.agents/skills/`; user-level Skills in `~/.agents/skills/` are available across all projects.
Never install Skills from untrusted sources: they can contain scripts and access files or external services.
Create a Skill when a task involves repeated instructions, multiple fixed steps, or a need for stable, predictable output.
Conclusions

Progressive disclosure is the architectural decision that makes Skills viable at scale; without it, a large Skill library would choke the context window before any work began.

The distinction between MCP (connection), Tool (capability), and Skill (workflow) clarifies why earlier agent frameworks felt incomplete: they provided tools but no standard way to encode the judgment of when and how to use them.

Placing Skills in a project's `.agents/` directory turns tribal knowledge into version-controlled artifacts, which means onboarding a new developer can include handing them the team's actual AI workflows, not just documentation.

Security is the unspoken trade-off: a Skill directory that can execute arbitrary scripts and access files is functionally a package manager for agent behavior, with all the supply-chain risks that implies.

Concepts & terms
Agent Skill
A reusable, directory-based workflow for AI coding agents, defined by a SKILL.md file with metadata and instructions, plus optional scripts and reference documents. It tells an agent what steps to follow for a specific task class.
Progressive Disclosure
A loading strategy where an agent first reads only a Skill's name and description, then loads the full SKILL.md and associated resources only when the current task matches that Skill, conserving the context window.
MCP (Model Context Protocol)
An open protocol for connecting AI applications to external data sources, tools, and services. It handles the connection layer, while a Skill can sit on top to define the correct usage sequence and domain logic.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗