Skip to main content

A Reusable Skill Capability System: Contracts, Layering, and Execution Standards

· 5 min read
Jack Ning
Maintainer of Bytedesk

The same "change delivery time" action gets one set of validation logic from the pre-sales agent and another from the complaints agent—with mismatched permission scopes and success criteria. This is the wall every team hits as multi-agent operations expand: every new scenario rewrites the tool calls, prompts pile up, and nobody dares touch the old ones. The root cause is that capabilities were never abstracted into reusable skill units with explicit contracts—they live on as scattered snippets of prompting.

This post is part of the "AI Customer Service Product and Engineering Practices" experience-sharing series, drawn from a practice review of an AI customer service product at a leading logistics company. In this post I want to share how to abstract basic skills such as logistics queries, order modification, exception tickets, and after-sales handling into a reusable Skill capability system for a logistics AI Agent, and how to design skill composition, parameter validation, and execution standards. This design decides whether agent capabilities are an asset or a liability.

Define the contract → Validate input and authorization → Execute and verify → Compose and regress

Five Key Design Points in the Skill Capability System​

  • Capability abstraction: abstracting business actions into single-responsibility, reusable skill units.
  • Interface and contract design: unified inputs and outputs, preconditions, error codes, idempotency, and audit fields.
  • Parameter validation: the format, business, and permission validation layers must be complete.
  • Execution standards: clear success criteria, timeout retry, outcome verification, and audit trails.
  • Governance: skill registration, version management, composition orchestration, and regression evaluation.

The Overall Design​

In this effort, I would first define what a Skill is: a Skill is a reusable business action, not a piece of prompt. The overall approach in one sentence: define skills with a unified contract, abstract in three layers—atomic, composite, scenario—validate in three layers—format, business, permission—define success by receipt plus verification, and govern with registration and staged rollout.

Step 1: Define every skill with a unified contract​

Query tracking, modify address, create exception ticket, submit shipping-fee compensation—each skill maps to one reusable business action, all wrapped to the same standard: input/output schemas, preconditions, required permissions, idempotency key, timeout, error codes, and audit fields. With a unified contract, different business lines reuse skills directly instead of writing their own.

Step 2: Three-layer abstraction—atomic, composite, scenario​

  • Atomic skills: wrap a single business interface, one skill per action, such as tracking queries.
  • Composite skills: the full closed loop of validation + execution + verification—"rescheduling" equals checking the current node allows changes, calling the reschedule API, then querying again to confirm it took effect.
  • Scenario flows: the Agent orchestrates multiple skills to complete a fully managed task, such as an exception-handling flow chaining query, ticket creation, and compensation.

Step 3: Three validation layers—format, business, permission​

  • Format validation: schema checks on dates, enums, and required fields.
  • Business validation: order state and timing—a reschedule must first confirm the node allows it.
  • Permission validation: roles and limits; beyond-authority requests are rejected outright.

Only when all three layers pass can the skill execute; prompts may hint at rules but never replace server-side enforcement.

Step 4: Define success with execution standards​

Success must be judged by business system receipt + outcome verification—an HTTP 200 is not success; failures split into retryable and non-retryable; every call leaves a full audit trail.

Step 5: Governance—registration, versioning, regression​

Register all skills in a registry with version management and staged rollout; changing one skill requires running single-skill regression plus composition scenario evaluation, so one change never breaks multiple business lines; breaking changes ship as new versions, keeping backward compatibility where possible. Only then do Skills truly get reused instead of being rewritten per scenario.

Practice in Bytedesk​

The open-source Bytedesk customer service system (GitHub, website https://www.weiyuai.cn ) provides the infrastructure for this approach: tool management provides tool definitions, invocation logs, and approval logs; configured tools can be referenced by robots or agents, serving as the unified entry point for external business capabilities and a natural carrier for atomic skills; robot and agent configuration plays the orchestration role of scenario flows. The skill schemas, business preconditions, idempotency, and composition regression evaluation must be implemented on the business side within tool services and the testing system—registering a tool does not complete its contract; the three validation layers and execution standards must live on the server side.

Key Takeaways​

  • A Skill is a reusable business action, not a piece of prompt; its reuse value comes from a stable contract and trusted execution boundary.
  • The unified contract covers input/output schemas, preconditions, permissions, idempotency keys, timeouts, error codes, and audit fields.
  • Atomic skills wrap single interfaces, composite skills close the validate+execute+verify loop, and scenario flows are orchestrated by the Agent.
  • Format, business, and permission—all three validation layers must pass before execution; prompts never replace server-side enforcement.
  • Success means business receipt plus outcome verification; register, version, and stage skills, and run regression on every change—so capabilities stay assets, not liabilities.