Skills are pluggable capability modules that teach the agent how to perform specific tasks or use particular tools. They are implemented as markdown files with frontmatter metadata.
The skills system is implemented in nanobot/agent/skills.py through the SkillsLoader class:
class SkillsLoader: """ Loader for agent skills. Skills are markdown files (SKILL.md) that teach the agent how to use specific tools or perform certain tasks. """
---title: Web Researchdescription: Search and extract information from the webmetadata: | { "nanobot": { "always": false, "requires": { "env": ["BRAVE_API_KEY"] } } }---# Web Research SkillThis skill teaches you how to perform effective web research using the `web_search` and `web_fetch` tools.## When to UseUse this skill when you need to:- Find current information not in your training data- Research specific topics or questions- Verify facts or claims- Gather data from multiple sources## Tools### web_searchSearches the web and returns titles, URLs, and snippets.**Parameters:**- `query` (string, required): The search query- `count` (integer, optional): Number of results (1-10, default: 5)### web_fetchFetches a URL and extracts readable content.**Parameters:**- `url` (string, required): The URL to fetch- `extractMode` (string, optional): "markdown" or "text" (default: "markdown")- `maxChars` (integer, optional): Maximum characters to return## Workflow1. Use `web_search` to find relevant sources2. Review the search results and identify the most promising URLs3. Use `web_fetch` to extract content from selected URLs4. Synthesize information from multiple sources5. Cite your sources when providing information## Example```json// Search for information{"tool": "web_search", "query": "latest developments in quantum computing"}// Fetch specific article{"tool": "web_fetch", "url": "https://example.com/quantum-news"}
The skills summary is included in the agent’s system prompt:
summary = loader.build_skills_summary()
Generated XML:
<skills> <skill available="true"> <name>web-research</name> <description>Search and extract information from the web</description> <location>/workspace/skills/web-research/SKILL.md</location> </skill> <skill available="false"> <name>docker-ops</name> <description>Manage Docker containers and images</description> <location>/nanobot/skills/docker-ops/SKILL.md</location> <requires>CLI: docker</requires> </skill></skills>
The agent can use the read_file tool to load full skill content when needed (progressive loading).
To keep context size manageable, nanobot uses progressive skill loading:
1
System Prompt Includes Summary
The system prompt contains a lightweight XML summary of all available skills with names, descriptions, and locations.
2
Agent Decides What to Load
The agent reads the summary and decides which skills are relevant to the current task.
3
Agent Loads Full Skill
The agent uses read_file to load the complete SKILL.md content when needed.
Context Builder Integration:
skills_summary = self.skills.build_skills_summary()if skills_summary: parts.append(f"""# SkillsThe following skills extend your capabilities. To use a skill, read its SKILL.md file using the read_file tool.Skills with available="false" need dependencies installed first - you can try installing them with apt/brew.{skills_summary}""")
See nanobot/agent/context.py:44-52 for implementation.
def _check_requirements(self, skill_meta: dict) -> bool: """Check if skill requirements are met (bins, env vars).""" requires = skill_meta.get("requires", {}) for b in requires.get("bins", []): if not shutil.which(b): return False for env in requires.get("env", []): if not os.environ.get(env): return False return True
See nanobot/agent/skills.py:177-186.
Skills with unmet requirements are still listed but marked as available="false" in the summary.
cat > ~/workspace/skills/my-skill/SKILL.md << 'EOF'---title: My Custom Skilldescription: Does something awesomemetadata: | { "nanobot": { "always": false } }---# My Custom SkillThis skill helps you do X, Y, and Z.## When to UseUse this when...## Instructions1. First, do this...2. Then, do that...3. Finally, verify...EOF
3
Test the Skill
The skill is immediately available to the agent. Ask:
Nanobot integrates with ClawHub for discovering and installing community skills:
# Search for skillsnanobot skill search "web scraping"# Install a skillnanobot skill install username/skill-name# List installed skillsnanobot skill list
ClawHub skills are installed to your workspace skills/ directory.