AI Agent Skills: Declarations, Permissions, and Composition
This article explains why agent skills are governed action contracts rather than more functions or longer prompts. It covers what a skill declaration should contain, the three hard constraints of least privilege, runtime control, and composition, the four mechanisms a declarative catalog needs in order to be enforced, and the pitfalls teams hit when they treat retrieval snippets or prompt-level tool lists as access control.
What a skill has to solve is not “can the model talk.” It is “under which conditions, as which identity, against which resources, and what class of action is the model permitted to take.” Retrieval-augmented generation supplies knowledge; function calling supplies action entry points. Both are necessary, and neither answers the three questions of permission, timing, and composition. If you only stuff an interface list into the prompt, the model ends up either locked into a few hard-coded branches or handed a master key that is close to production-grade. The first is hard to extend; the second can modify data, pull sensitive logs, or trigger irreversible operations the moment it misjudges.
A skill is not an alias for a function
A function describes what can be called: name, parameters, return value. A skill describes under what preconditions it may be used and how: applicable scenarios, trigger conditions, required permissions, input/output contract, side effects, degradation behavior on failure, and whether it can chain with other skills. Conflating the two pushes security policy into conditional branches in business code — see certain keywords, call a certain function. That path is fast in a demo and in production loses two things at once: the model cannot handle variations in phrasing, and engineering cannot uniformly audit who did what, when, and with which permissions.
A more reasonable abstraction is to treat a skill as a capability unit with a contract. Providers submit a structured description instead of scattering invocation logic across prompts. The description should contain at least: a stable identifier, a human-readable summary, trigger cues (task type rather than brittle keywords), a permission declaration, resource scope, whether it is read-only, idempotency, timeout and retry guidance, and dependencies on other skills. The runtime decides whether to expose a skill based on the current task, identity, and policy, rather than making everything visible by default.
A sample declaration can be plain. What matters is that the fields express constraints, not the file extension:
id: query_service_logssummary: Query application log summaries by service and time windowwhen: troubleshooting with an identified service name and time rangepermissions: [logs:read]scope: { env: non-prod, services: declared }side_effect: read_onlycomposes_with: [trace_lookup]
This kind of declaration is only a filing, not enforcement. Without runtime validation, the model can still ignore the description, and callers can forge declarations.
Three hard constraints
Safety. Deny by default and grant least privilege. Read-only queries must be declared separately from writes, deletes, and outbound sends. Resource scope must resolve to environment, tenant, table, or object prefix — not “can access the database.” High-risk actions should require human confirmation or a two-person policy, and the confirmation itself must be recorded. Model-generated queries must not execute under a high-privilege account; they should pass through parameterization, a read-only account, a statement-type allowlist, and row limits. Production and non-production credentials stay isolated, and a skill cannot obtain keys beyond what it declared.
Controllability. The model needs to know which skills are currently available, but it should not ask the user for permission on every turn. The available set is trimmed at runtime by policy: identity, environment, task type, and data classification decide together. Trigger conditions live in metadata, but the final decision to invoke still belongs to the orchestrator based on current context, which avoids “keyword equals execution.” For uncertain tasks, start with read-only exploration and then decide whether to enter a skill with side effects, instead of jumping straight to the end state.
Composability. Checking status, correlating logs, and filing a change request should chain along contracts rather than requiring a fresh set of branches for every scenario. Composition presupposes stable inputs and outputs, observable failures, and explicit side effects. Read-only skills can chain automatically; write skills should be explicit nodes in the graph, with compensation or a human gate. Implicit “a skill may call any other skill at will” is forbidden, because permissions get amplified through composition.
What declarative specifications can and cannot do
The value of a unified catalog is discovery and governance: skills are searchable, versionable, and can be retired, and permissions can be reviewed. It solves how capabilities are described and registered, not how behavior is enforced. With documentation but no validation, the declaration becomes part of the prompt: the model may disregard it, and the call chain can bypass the catalog and connect straight to the backend.
So beyond the catalog, at least four mechanisms are needed. First, discovery and binding: the orchestrator pulls candidate skills per task and gives the model a trimmed contract, not the full tool set. Second, authentication and scope validation: each call exchanges a real identity for short-lived credentials and checks whether the declared permissions cover the current parameters; out-of-scope parameters are rejected outright. Third, execution isolation: read-only traffic goes through a read-only channel, writes through a separate one, with limits on timeout, concurrency, response size, and reachable network. Fourth, audit and quotas: record the skill identifier, a parameter digest, the decision rationale, and the result status; rate-limit high-risk skills and support circuit breaking.
Miss any one of these and the specification is just text. With them in place, the model still handles planning and parameter filling, but whether something can be done is decided by the policy engine, not by the model’s own account of itself.
From a single call to an evolvable system
Versioning. Skill contract changes must be backward compatible or explicitly upgraded; old tasks should not silently change semantics. When retiring a skill, keep the historical definition needed for audit.
Evaluation. Beyond functional correctness, check the out-of-scope rejection rate, the false trigger rate, whether permissions still satisfy least privilege after composition, and whether failures write sensitive information back into the context.
Human boundary. Exploration, summarization, and drafting change proposals suit automation; writing to the database, sending notifications, and changing configuration default to human confirmation. The confirmation dialog should show the skill about to run, its scope, and its irreversibility, rather than only asking “continue?”
Organizational split. Skill providers own the contract and implementation; the platform owns the catalog, authentication, sandbox, and audit; the business side owns which identities are available in which environments. Keeping the three separate is what prevents a return to per-application conditional branches.
Pitfalls
- Treating a retrieval snippet as a skill. Retrieval has no side-effect boundary and no invocation audit, so it cannot replace controlled access to systems.
- Treating a tool list in the prompt as a permission. The list only affects what the model sees; it cannot stop direct calls that bypass the model.
- Re-expanding credentials during composition. Upstream is read-only while downstream executes with an admin account, which makes the declaration void.
- Hard-coding triggers on keywords. It breaks as soon as phrasing changes and makes it hard to audit why a call happened at that moment.
- Missing a read-only-first path. Granting write capability immediately makes the cost of a misplanned action too high.
Conclusion
The essence of a skill is a governed action contract — not more functions, and not a longer prompt. Declarative metadata makes capabilities discoverable and reviewable; permission trimming, isolated execution, and audit make the contract enforceable; stable inputs and outputs with explicit side effects make skills composable. With all three in place, an agent can get work done while keeping misoperations and privilege escalation inside policy, instead of hoping the model “knows its limits.”
