Skills are reusable capabilities that agents can advertise and execute. They enable intelligent task routing, capability discovery, and agent orchestration.
sequenceDiagram
participant Developer
participant SkillYAML
participant SkillLoader
participant AgentManifest
participant AgentCard
participant Orchestrator
participant Negotiation
Note over Developer,SkillYAML: 1. Skill Creation
Developer->>SkillYAML: Create skill.yaml<br/>(metadata, capabilities, tags)
SkillYAML->>SkillYAML: Define:<br/>- name, description<br/>- capabilities, tags<br/>- input/output formats<br/>- assessment metadata
Note over Developer,AgentManifest: 2. Agent Startup (bindufy)
Developer->>SkillLoader: config = {skills: ["skills/my-skill"]}
SkillLoader->>SkillYAML: Load skill.yaml
SkillYAML-->>SkillLoader: Skill metadata
SkillLoader->>SkillLoader: Parse YAML<br/>Extract capabilities<br/>Load documentation
SkillLoader-->>AgentManifest: List[Skill]
AgentManifest->>AgentManifest: Build manifest with skills
Note over AgentCard,Orchestrator: 3. Skill Advertisement
Orchestrator->>AgentCard: GET /.well-known/agent.json
AgentCard-->>Orchestrator: {<br/> name, description,<br/> skills: [{<br/> id, name, tags,<br/> capabilities_detail,<br/> input_modes, output_modes<br/> }]<br/>}
rect rgb(240, 248, 255)
Note over Orchestrator: 4. Skill Discovery
Orchestrator->>Orchestrator: Parse agent cards<br/>Index skills by:<br/>- tags<br/>- capabilities<br/>- keywords
Orchestrator->>Orchestrator: Build skill registry
end
rect rgb(255, 248, 240)
Note over Orchestrator,Negotiation: 5. Task Routing (Negotiation)
Orchestrator->>Orchestrator: Task: "Extract tables from PDF"
Orchestrator->>Negotiation: POST /agent/negotiation<br/>{task_summary}
Negotiation->>Negotiation: Match against skills:<br/>- Keywords: pdf, extract, tables<br/>- Tags: pdf, document<br/>- Capabilities: table_extraction<br/>- Assessment metadata
Negotiation->>Negotiation: Calculate scores:<br/>- Skill match: 0.92<br/>- Specialization boost: +0.3<br/>- Anti-pattern check: pass
Negotiation-->>Orchestrator: {<br/> accepted: true,<br/> score: 0.89,<br/> skill_matches: [{<br/> skill_id: "pdf-processing-v1",<br/> score: 0.92<br/> }]<br/>}
end
rect rgb(240, 255, 240)
Note over Orchestrator,AgentManifest: 6. Task Execution
Orchestrator->>AgentManifest: POST / (message/send)<br/>{content: "Extract tables..."}
AgentManifest->>AgentManifest: Route to handler<br/>Execute skill logic
AgentManifest-->>Orchestrator: {result: tables_data}
end
Note over SkillLoader,Negotiation: Key Components
Note over SkillLoader: - YAML parsing<br/>- Documentation loading<br/>- Capability extraction
Note over Negotiation: - Semantic matching<br/>- Keyword scoring<br/>- Specialization boost<br/>- Anti-pattern filtering
Skills are defined in YAML files with comprehensive metadata:
skill_id: "pdf-processing-v1"
name: "PDF Processing"
version: "1.0.0"
description: "Extract text, tables, and forms from PDF documents"
capabilities:
- text_extraction
- table_extraction
- form_filling
- ocr_support
tags:
- pdf
- document
- extraction
input_structure: |
{
"file": "base64_encoded_pdf_or_url",
"operation": "extract_text|fill_form|extract_tables",
"options": {
"ocr": true,
"language": "eng"
}
}
output_format: |
{
"success": true,
"pages": [{"page_number": 1, "text": "...", "confidence": 0.98}],
"metadata": {"total_pages": 10, "processing_time_ms": 1500}
}
# Assessment metadata for negotiation
assessment:
keywords:
- pdf
- extract
- document
specializations:
- domain: invoice_processing
confidence_boost: 0.3
anti_patterns:
- "pdf editing"
- "pdf creation"GET /agent/skillsResponse:
{
"skills": [
{
"skill_id": "pdf-processing-v1",
"name": "PDF Processing",
"version": "1.0.0",
"capabilities": ["text_extraction", "table_extraction"]
}
]
}GET /agent/skills/{skill_id}Response:
{
"skill_id": "pdf-processing-v1",
"name": "PDF Processing",
"description": "Extract text, tables, and forms from PDF documents",
"input_structure": {...},
"output_format": {...},
"examples": [...]
}GET /agent/skills/{skill_id}/documentationReturns human-readable documentation in Markdown format.
Create a YAML file in skills/ directory:
# skills/my-skill/skill.yaml
skill_id: "my-skill-v1"
name: "My Skill"
version: "1.0.0"
description: "What this skill does"
capabilities:
- capability1
- capability2
tags:
- tag1
- tag2
documentation: |
# My Skill
Detailed documentation here...
input_structure: |
{
"field1": "value",
"field2": 123
}
output_format: |
{
"result": "output"
}
examples:
- title: "Example 1"
input:
field1: "test"
output:
result: "success"
assessment:
keywords:
- keyword1
- keyword2config = {
"name": "my_agent",
"skills": ["skills/my-skill"], # Path to skill directory
}Skills are executed through your agent's handler function. The skill metadata is used for discovery and routing, while actual execution happens in your code.
skill_id- Unique identifier (e.g., "pdf-processing-v1")name- Human-readable nameversion- Semantic version (e.g., "1.0.0")description- Brief description of capability
capabilities- List of specific capabilitiestags- Keywords for discoverydocumentation- Detailed markdown documentationinput_structure- JSON schema or exampleoutput_format- Expected output structureexamples- Usage examples with input/outputerror_handling- How errors are handledbest_practices- Guidelines for usersconstraints- Limitations and requirementsassessment- Metadata for negotiation
Used by the negotiation system for intelligent agent selection:
assessment:
# Keywords for semantic matching
keywords:
- pdf
- extract
- document
# Domain specializations with confidence boost
specializations:
- domain: invoice_processing
confidence_boost: 0.3
- domain: form_filling
confidence_boost: 0.2
# Patterns this skill should NOT match
anti_patterns:
- "pdf editing"
- "pdf creation"
# Complexity indicators for performance estimation
complexity_indicators:
simple:
- "single page"
- "extract text"
medium:
- "multiple pages"
- "fill form"
complex:
- "scanned document"
- "ocr"- Single responsibility - One skill, one capability
- Clear naming - Descriptive skill_id and name
- Versioning - Use semantic versioning
- Documentation - Provide examples and error handling
- Structured formats - Use JSON schemas
- Validation - Document required fields
- Error handling - Define error response format
- Examples - Include realistic use cases
- Accurate keywords - Match actual capabilities
- Honest specializations - Don't over-claim
- Clear anti-patterns - Prevent false matches
- Complexity indicators - Help with performance estimation
See examples/skills/ directory for complete examples:
skills/question-answering/- Q&A capabilityskills/pdf-processing/- PDF document handlingskills/cbt-*/- Therapy protocol skills