When to use skills vs tools
Creating a skill
A skill is a directory with aSKILL.md file:
SKILL.md format
SKILL.md
name, description) helps the agent decide which skill is relevant. The markdown body is the knowledge content.
Installing repository skills
This repository includes two skills for agentic development:afk-coderfor building applications with AFK.afk-maintainerfor reviewing or changing AFK itself.
Registering skills on an agent
skills_dir and registers each subdirectory as an available skill. The agent can discover and read skills using built-in tools.
Built-in skill tools
When an agent has skills, AFK automatically provides these tools:How the agent uses skills
The agent autonomously decides which skills to read based on the user’s question. You don’t need to explicitly tell it which skill to use.Security controls
File access restrictions
File access restrictions
By default,
read_skill_file only allows reading files within the skill directory. Path traversal (../) is blocked.Command execution policies
Command execution policies
run_skill_command is gated by policy. You can allowlist specific commands:Read-only mode
Read-only mode
To disable command execution entirely, only register the read-only skill tools:
Design guidelines
- One skill per topic. Keep skills focused (e.g.,
deployment,monitoring,database) rather than creating one giant knowledge base. - Write SKILL.md for the agent, not a human. The agent reads this file, so be explicit about what to do in each scenario.
- Include examples. Show the agent what good output looks like.
- Version your skills. Store skills in git alongside your agent code.
- Gate commands. Always use policy rules for
run_skill_command.
Next steps
Tools
Define typed functions for taking actions.
Security Model
Policy gates for tools and skill commands.