| id | skill-template-example |
| name | Skill Template Example |
| version | 0.1.0 |
| domain | other |
| description | This is a template for creating new AFI skills. Copy this file to the appropriate domain folder, rename it, and fill in all sections. |
| inputs | [object Object], [object Object] |
| outputs | [object Object], [object Object] |
| allowed_tools | none |
| risk_level | low |
| determinism_required | true |
| evals | [object Object] |
| owners | afi-skills-maintainers |
| last_updated | Fri Nov 21 2025 00:00:00 GMT+0000 (Coordinated Universal Time) |
| tags | template, example, documentation |
| intent | Demonstrate skill template structure and best practices |
| markets | all |
| timeframes | 1h, 4h, 1d |
| risk_notes | - This is a template skill with no actual risk - Real skills should document specific risk considerations |
| confidence_notes | - Template skill has no confidence metrics - Real skills should document accuracy, limitations, and uncertainty sources |
Skill Template Example
Purpose
Explain what problem this skill solves and why it exists. Be specific about the use case within the AFI Protocol context.
Example: "This skill validates futures contract specifications to ensure agents correctly interpret margin requirements, settlement times, and funding rate calculations."
When to Use
Describe the triggering conditions or scenarios where an agent should invoke this skill.
Example:
- When processing a new futures contract listing
- Before executing a trade that requires margin calculation
- When validating historical contract data for replay
Workflow
Provide a step-by-step execution flow. Be clear and concise.
- Validate inputs: Check that all required parameters are present and well-formed
- Load context: Retrieve any necessary reference data (e.g., from TSSD)
- Execute core logic: Perform the main computation or analysis
- Validate outputs: Ensure results meet expected properties
- Return results: Package outputs with metadata
Failure Modes / Edge Cases
Document known failure scenarios and how the skill should handle them.
- Missing input: Return error with clear message, do not proceed
- Invalid data format: Attempt parsing with fallback, log warning
- Determinism violation: If
determinism_required: true, fail loudly on any randomness - Tool unavailable: Gracefully degrade or return partial results with warning
Example I/O
Provide concrete examples to help agents understand usage.
Example 1: Basic Usage
Input:
{
"example_input": "sample-value",
"config": {
"mode": "strict"
}
}
Output:
{
"result": {
"status": "success",
"value": 42
},
"metadata": {
"timestamp": "2025-01-15T12:00:00Z",
"execution_time_ms": 15
}
}
Example 2: Error Case
Input:
{
"example_input": null
}
Output:
{
"result": {
"status": "error",
"error": "example_input is required"
},
"metadata": {
"timestamp": "2025-01-15T12:00:00Z"
}
}
Notes for Validators
(Optional section for skills used in validation workflows)
- Ensure determinism by seeding any RNG with input-derived values
- Log all intermediate steps for audit trail
- Use cryptographic hashes for data integrity checks
- Report confidence intervals for probabilistic outputs
Implementation Notes
(Optional section for developers)
- This skill is implemented in
afi-core/src/skills/other/skill-template-example.ts - Dependencies: None (pure logic)
- Performance: O(n) where n is input size
- TODO: Add support for batch processing in v0.2.0