Tony teach-agent
Self-teaching loop for agents to autonomously acquire new skills. Use this skill when encountering unknown technologies, APIs, or integrations; when creating new skills from scratch; when research is needed before implementation; or when expanding agent capabilities. Triggers on "teach yourself", "learn how to", "unknown tool", "new integration", "create skill", "research API".
git clone https://github.com/jaydeland/Tony
T=$(mktemp -d) && git clone --depth=1 https://github.com/jaydeland/Tony "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/skills/teach-agent" ~/.claude/skills/jaydeland-tony-teach-agent && rm -rf "$T"
.claude/skills/teach-agent/SKILL.mdTeach-Agent Skill
Synopsis
Empowers agents to autonomously acquire new skills by following a structured self-teaching loop. When faced with an unfamiliar technology, protocol, or capability, an agent should be able to teach itself what it needs to complete the work.
Trigger
- Agent encounters a task requiring unknown tools, APIs, or integrations
- Agent needs to connect to a service (e.g., Discord, Slack, external API)
- Agent lacks required knowledge for a task
- Explicit request to "teach yourself" or "learn how to"
Self-Teaching Loop
┌─────────────────────────────────────────────────────────────┐ │ 1. RESEARCH → 2. UNDERSTAND → 3. IMPLEMENT │ │ ↑ │ │ │ └──────── 5. VALIDATE ←────────────┘ │ │ ↓ │ │ 4. DOCUMENT │ └─────────────────────────────────────────────────────────────┘
Step 1: Research
Use these tools to gather information:
-
: Find documentation, tutorials, official resourcesWebSearch- Query: "[technology name] documentation", "[API name] getting started", "[protocol] tutorial"
- Example:
query for Discord → "Discord API documentation bot development"WebSearch
-
: Read official docs directlyWebFetch- Fetch the official documentation page for the technology
- Extract key concepts, authentication patterns, API structure
-
: Search GitHub repos for code examplesmcp__zread__search_doc- Search: "discord.js bot example", "discord API python wrapper"
- Find real code patterns used by the community
Step 2: Understand
After research, the agent should be able to explain:
- What is it? - A one-paragraph description
- How does authentication work? - API keys, OAuth, tokens, etc.
- What are the core concepts? - Objects, events, methods
- What's the typical implementation pattern? - Initialization → configuration → usage
- What tools/MCPs are available? - Any existing MCP servers for this service?
Step 3: Implement
Create the solution:
- If a Skill is needed: Create a new
.claude/skills/[skill-name]/SKILL.md - If code is needed: Write the implementation following patterns found in research
- Follow existing conventions: Use the codebase's established patterns
Step 4: Document
Save the learned knowledge:
.claude/skills/[skill-name]/ ├── SKILL.md # What the skill does, trigger, usage ├── README.md # How-to guide with examples └── [implementation] # Any supporting files
Step 5: Validate
- If it's a skill: Use the skill to verify it triggers correctly
- If it's code: Verify the implementation makes sense structurally
- Check that the skill/code follows project conventions
Example: Teaching Yourself Discord
Research Phase
User: "Connect this agent to Discord so it can send messages to a channel" Agent: 1. WebSearch("Discord API bot development documentation") 2. WebSearch("Discord bot Python discord.py library") 3. WebFetch("https://discord.com/developers/docs/introduction") 4. mcp__zread__search_doc("discord.py bot example", repo_name="Rapptz/discord.py")
Understanding Phase
After research, the agent understands:
- Discord bots use Bot tokens via HTTP Bearer auth or WS gateway
- Bot must be added to server with specific permissions
- Messages sent via HTTP POST to channel webhooks or bot API
- Python libraries:
(async),discord.py
,nextcordpy-cord
Implementation Phase
The agent would create a skill like:
--- name: discord-notify description: This skill should be used when the user asks to "send a message to Discord", "notify Discord channel", "Discord webhook", or "Discord bot message". Sends notifications to Discord channels via webhooks or bot API. version: 1.0.0 tags: [discord, webhook, notifications, bot] authors: [agent] inputs: message: "Message content to send" channel_id: "Target Discord channel ID" outputs: result: "Success/failure status of the notification" --- # Discord-Notify Skill ## Synopsis Sends notifications to Discord channels via webhooks or bot API. ## Trigger - Task requires sending messages to Discord - "Send a message to Discord", "Notify Discord channel" ## Implementation [Created based on research]
Validation Phase
- Verify the skill file is valid markdown
- Verify the skill has YAML frontmatter with
,name
, anddescriptionversion - Verify the description uses third person ("This skill should be used when...")
- Verify the skill has required sections (synopsis, trigger, implementation)
- Verify the implementation follows the codebase patterns
Key Principles
- Start with WebSearch - Official docs and tutorials are the fastest path
- Look for patterns - Find existing similar skills/code in the codebase
- Create skills for reusable knowledge - If you'll need it again, make it a skill
- Follow conventions - Match the style and structure of existing skills
- Validate before finishing - Ensure the skill actually works
Skill File Template
--- name: [skill-name] description: This skill should be used when the user asks to "[trigger phrase 1]", "[trigger phrase 2]", "[trigger phrase 3]". [What this skill enables - one clear sentence]. version: 1.0.0 tags: [tag1, tag2, tag3] authors: [author-name] inputs: input_name: "Description of expected input" outputs: output_name: "Description of expected output" --- # [Skill-Name] ## Synopsis [What this skill enables - one clear sentence] ## Trigger - [When this skill should be invoked] - [Alternative trigger phrases] ## Implementation [How the skill works - code, steps, or references] ## Examples [Usage examples showing input/output]
Frontmatter Requirements:
(required): The skill identifier, kebab-case (e.g.,name
)discord-bot
(required): Third-person description with specific trigger phrases. Use "This skill should be used when the user asks to..."description
(required): Semantic version (e.g.,version
)1.0.0
(optional): Keywords for categorizationtags
(optional): List of authorsauthors
/inputs
(optional): Define expected inputs and outputsoutputs
Related Skills
- For creating skills properlyplugin-dev:skill-development
- For understanding skill directory structureplugin-dev:plugin-structure