SKILL.md in a single command.
SKILL.md they can reuse later.
Quick Start
1
Learn from a repo
2
Learn from multiple sources
3
Learn from the current chat
How It Works
The agent follows three rules when authoring a skill:Three Surfaces
- Python SDK
- CLI
- Bot Chat
Async
alearn_skill is the async equivalent of learn_skill. Use it inside async functions or notebooks.Approval Gate
Skills authored by
learn_skill go through the same human approval gate as any other agent-created skill. By default the tool returns {"status": "pending", "id": "skl-…"} and disk is not touched until a human approves. See Skill Manage.Common Patterns
From a single repo
Multi-source (repo + PDFs + URL)
The agent picks the right tool per source — file read, PDF read, or fetch — automatically.From the current chat
Phrases like"what we just figured out" or "this conversation" route the agent to use the chat as the source.
CLI with model override
Best Practices
Name sources explicitly
Name sources explicitly
Saying “read
./my-repo and ./docs/*.pdf” beats “learn about deploys” because the agent only reads what you name. Explicit paths give better, more grounded skills.Pick a kebab-case skill name in the request
Pick a kebab-case skill name in the request
Include a quoted name like
"… make a 'deploy-flow' skill". If you omit it, the agent derives one from the content — which may be less predictable.Prefer learn_skill over learn in new code
Prefer learn_skill over learn in new code
learn / alearn are kept as backward-compat aliases. The canonical names are learn_skill / alearn_skill to avoid confusion with the memory learn= constructor param on Agent.Don't pre-wire skill_manage yourself
Don't pre-wire skill_manage yourself
learn_skill automatically adds skill_manage, read_skill_file, and list_skill_scripts to agent.tools if they are missing. The call is idempotent — running it multiple times does not double-register tools.Backward-compat Aliases
learn and alearn are aliases for learn_skill and alearn_skill:
learn_skill / alearn_skill in new code.
Related
Skill Manage
The approval gate the authored skill flows through
Agent Skills
Invoking and discovering skills
Self-Improving Agents
Auto-curate skills from conversation (different mechanism)
Bot Chat Commands
/learn slash command in Telegram, Discord, and Slack

