From Agents to Skills: A Layered Architecture for Agent Capabilities
The "one agent does everything" pattern works well for a proof of concept but breaks down in production through prompt bloat, tight coupling between domain knowledge and system access, missing asset boundaries for governance, and duplicated builds across teams. This article argues the fix is a re-layering of agent architecture that decouples the model and runtime from domain capabilities, so knowledge, procedures, and tool-usage rules become packageable, distributable assets. It compares three orthogonal capability supply paths (model context connection specifications, skills, and runtime/orchestration frameworks), defines what a skill is and is not, shows a minimal skill directory and metadata contract, explains progressive loading as the key lever of context engineering, and details four engineering benefits, the standards required to make skills governable, common mistakes, and a reference layered cloud architecture.
Introduction: The Bottleneck in Agent Engineering Is Moving Up the Stack
Early agent builds typically followed a “one system does everything” approach: domain knowledge went into the prompt, access to external systems was registered directly as tools, and orchestration, memory, dialogue, and review were all packed into a single runtime. This works extremely well in the PoC stage. Four problems surface quickly once the system enters production:
- Prompt bloat. Domain rules, operating procedures, and field definitions keep getting appended until the context window is filled with encyclopedia-style explanations. The density of effective information drops, and adherence to critical constraints actually gets worse.
- Tight coupling. Domain knowledge and system connectivity live in the same layer, so changing the authentication method for one data source can disturb business rules. Skills cannot be moved between agents.
- No governance path. With no clear asset boundaries, there is nothing to attach permissions, versioning, or change approval to. During an audit, nobody can say which version of which rule backed a given output.
- Duplicated work. Different teams implement similar query, validation, and reporting capabilities on their own, producing a large number of private scripts and hidden dependencies. Maintenance cost accumulates over time.
All four symptoms share one root cause: the agent has no layered architecture, so capabilities cannot be produced, delivered, and reused as independent assets. The move from agents to skills discussed here is not a replacement of one concept with another, but a re-layering — decoupling “model and runtime” from “domain capabilities” so that knowledge, procedures, and tool-usage rules become entities that can be packaged and distributed.
1. How We Got Here: Three Orthogonal Capability Supply Paths
Looking back at the evolution of open standards in the agent ecosystem over the past couple of years, three orthogonal capability supply paths can be separated. They answer different questions, and none of them should be a substitute for another:
| Supply path | Core question it answers | Key design orientation | Typical form |
|---|---|---|---|
| Model context connection specification | How does the model connect to external systems and data in a uniform way? | Standardize the connection and invocation protocol; hide heterogeneous backends | A unified host/client plus external server architecture |
| Skills (capability packages) specification | How is domain expertise and procedural knowledge loaded? | File-based, directory-based, progressive loading | Instruction file + reference material + executable scripts |
| Runtime and orchestration frameworks | How are scheduling, memory, review, and rollback handled? | Lifecycle management and controlled execution | Containerized runtimes, process engines |
The causal order on the timeline matters: the connection layer was standardized first, wiring in the agent’s “hands and eyes”; standardization of the capability loading layer came next, wiring in “professional training”; and finally, foundation-style neutral organizations took over governance, marking the transition from a single-vendor project to shared industry infrastructure. The practical takeaway for developers is that the connection layer and the skill layer should be designed and evolved separately — neither should be baked into the assumptions of the other.
2. The Essence: What a Skill Is, and What It Isn’t
Understanding this paradigm depends on defining “skills” precisely. The widely accepted definition is this: a skill is a set of domain knowledge, operating procedures, and optional resources organized as files, loaded by the agent on demand when needed. It is closer to “an operating manual plus a toolkit for the agent” than to a functional module compiled into a binary.
Where skills stop and adjacent concepts begin:
- A skill is not a tool function. A tool is an atomic, callable action (query, write, transform). A skill describes “under what conditions, in what steps, using which tools, subject to which constraints” a class of task gets completed. A skill can reference tools, but it is not a tool.
- A skill is not a fine-tuned model. Fine-tuning changes model parameters; delivery is slow, cost is high, and updates are hard. A skill changes context supply; it iterates in minutes and is decoupled from the model version.
- A skill is not a prompt fragment. Loose prompt fragments have no structure, versioning, or dependency management. A skill is a complete asset with metadata, a directory, and a version.
- A skill is not the agent itself. An agent is the execution subject that owns identity, permissions, and runtime lifecycle. A skill is a capability package it loads; one agent can load many skills, and one skill can be reused by many agents.
A minimally viable skill directory usually contains the following:
my-skill/├── SKILL.md # metadata + triggers + usage instructions (required)├── references/ # long-form specs, definitions, case material (loaded on demand)├── templates/ # output templates, report skeletons, checklists├── scripts/ # optional deterministic scripts (validation, format conversion, aggregation)└── examples/ # positive and negative examples that constrain output style
The metadata block should be declared explicitly rather than left to model guesswork:
name: refund-policy-checkversion: 1.3.0description: Determines whether a ticket meets acceptance criteria for refunds under the current refund policytriggers: # when to load- keywords: refund, return, disputed ticket- task_type: ticket compliance checkinputs: # external connection capabilities it depends on- order lookup- customer tier lookupoutputs:- conclusion (pass/reject/manual review)- cited policy clausesconstraints: # hard rules- must not cite retired clauses- amounts above the threshold must go to a human reviewer
3. Progressive Loading: The Key Lever in Context Engineering
The largest cost of a monolithic prompt is that all knowledge stays in context all the time. Skills introduce a layered loading strategy that turns context usage from “always resident” into “on demand”:
- Layer 1: metadata stays resident. Only the name and description are loaded (typically tens of tokens), so the agent knows which capabilities exist and when to use them.
- Layer 2: the instruction file is loaded. Once the task matches a trigger condition, the full operating instructions and constraints are read.
- Layer 3: reference material is retrieved on demand. Specification text, tables, and case sets are read only when the instruction file points to them.
- Layer 4: scripts execute. Deterministic logic runs in a script and its result is fed back into context, instead of explaining every algorithmic step to the model.
A sketch of the implementation:
class SkillRegistry:def __init__(self, index_path: str):self.index = load_index(index_path) # name/description/triggers onlydef select(self, task: str) -> list[str]:# lightweight matching: keyword or vector recall, keeping the index layer tinyreturn [s["name"] for s in self.index if matched(s, task)]def load(self, name: str, include_refs: bool = False) -> dict:spec = read_yaml(f"skills/{name}/SKILL.md")if include_refs and spec.get("refs"):spec["reference_text"] = read_refs(spec["refs"])return spec
The engineering value of this design is that the context budget becomes a computable resource. You can estimate concretely that “the metadata index costs X, the current skill instructions cost Y, and reference material costs Z,” and then reserve a stable quota for conversation history and tool return values. That noticeably reduces performance degradation and timeout risk in long sessions.
4. Four Core Engineering Benefits
1. Composable reuse. A skill is a standalone directory, so reusing it across agents and product lines requires no code duplication. A shared skill repository with namespaces and version numbers can become an enterprise capability marketplace, instead of every team rewriting a similar workflow.
2. Independent evolution. Skill releases are decoupled from agent releases. A business rule change means publishing a new skill version and noting a change summary in its metadata — no agent restart or retraining. Rollback works the same way: switch back to the previous stable version.
3. Fine-grained authorization. A skill package is a natural permission boundary. You can set a different availability scope and data access scope per skill, which gives you a least-privilege model where the same agent loads a different set of skills per scenario.
4. Auditability and evaluability. Each skill can carry its own evaluation set (input samples, expected conclusions, clause references) for regression checks before a change ships, and production logs can record which skills and which versions were loaded for a given answer, making outputs traceable.
5. Implementation Standards: Making Skills Governable
Treating skills as real assets requires four sets of standards.
Directory and naming conventions. Enforce a consistent hierarchy and naming prefix, and forbid hardcoded relative paths that cross skill boundaries. Name reference material structurally (for example, segmented by business domain and year) so it can be sliced and loaded on demand.
Interface contract. A skill declares the external connection capabilities it needs, its input fields, its output structure, and its exception branches. Contract-first design lets a skill degrade gracefully when a connection is missing rather than returning a guessed conclusion.
{"skill": "refund-policy-check","required_connections": ["order_query", "customer_tier"],"on_missing_connection": "degrade_to_manual_review","output_schema": {"conclusion": "enum[pass, reject, manual_review]","clause_refs": "array<string>"}}
Security boundaries. If a skill contains executable scripts, they must run in a restricted sandbox with limits on network egress, filesystem write scope, and execution time. Connection capabilities declared by a skill should be checked against an allowlist, so that an injected skill cannot lure the agent into touching unauthorized data. Load sources should be verified by signature or hash, and unregistered skill package versions should be rejected. Prompt injection deserves particular attention: external material and tool return values are untrusted input, and text inside them must never be allowed to alter a skill’s constraints or trigger new connection calls.
Evaluation and canary rollout. Maintain a small regression set for each skill covering typical, boundary, and adversarial samples. Release through a canary strategy: validate the conclusion distribution and the human-review rate on a small share of traffic first, then ramp up gradually.
6. Common Mistakes
- Writing skills as giant documents. Piling on more knowledge does not make the agent smarter. Use “thin instructions + rich reference material”: the instruction file covers only the procedure and the constraints, and details are left to on-demand retrieval.
- Copying business logic into skills. Deterministic logic belongs in scripts or backend APIs; the skill handles orchestration and judgment, so rules are not maintained in two places.
- Vague trigger conditions. Descriptions that are too broad cause a skill to be loaded constantly, wasting context; descriptions that are too narrow make the skill effectively nonexistent. Give both positive trigger terms and counter-example boundaries.
- No versioning strategy. Overwriting changes in place on a shared directory makes problems impossible to pin down. Enforce semantic versioning and a change log.
- Ignoring connection-layer consistency. If each connection a skill depends on implements its own authentication and rate limiting, the skill will need rework every time it moves. The connection layer should be governed centrally.
7. Reference Architecture on Cloud
A typical enterprise deployment ends up with the following layers:
- Access and orchestration layer. Handles session management, task decomposition, skill selection, and human-in-the-loop checkpoints.
- Capability loading layer. The skill repository and version service, supporting load policies per tenant or scenario and canary releases.
- Connection layer. Uniformly wraps access to systems and data, and centralizes authentication, rate limiting, data masking, and auditing.
- Data and knowledge layer. Object storage holds skill packages and reference material, a vector retrieval service handles sliced recall of that material, and a message queue carries asynchronous long-running tasks.
- Runtime and security layer. A container platform isolates the execution of skill scripts, while a log service plus monitoring and alerting provide call-chain tracing, cost accounting, and anomaly alerts.
Under this architecture, general-purpose capabilities offered by Baidu AI Cloud in categories such as object storage, container platforms, log services, and monitoring and alerting can help teams stand up a reusable skill repository and an observable agent runtime relatively quickly. The key is to hold the line on layered decoupling and avoid writing domain knowledge back into the prompt or the runtime.
Conclusion: From Building Agents to Operating Capability Assets
The move from agents to skills fundamentally changes how agents are built — from a one-off integration effort to continuous operations: standardized connections solve “can we plug it in,” standardized skills solve “do we do it professionally,” and neutral governance solves “can we keep it under control.” For developers, there are three practical next steps:
- Audit existing prompts and scripts, split them into metadata, instructions, reference material, and scripts, and produce the first batch of skill assets.
- Define skill contracts and security boundaries alongside them, and consolidate connection access into a unified capability layer.
- Build an evaluation set and a versioning strategy for every skill, so each change becomes a verifiable, rollbackable engineering action.
Once skills become reusable, evaluable, and governable assets, the pace of agent iteration no longer depends on the cost of refactoring — it depends on how fast business knowledge accumulates. That is the most far-reaching value of this paradigm shift.
