Agent skill
learn
Diagnose and fix agent behavioral surfaces when the user corrects a mistake — connects to Claude native memory.
Install this agent skill to your Project
npx add-skill https://github.com/automagik-dev/genie/tree/main/skills/learn
SKILL.md
/learn — Behavioral Correction
When a user corrects a mistake, /learn diagnoses which behavioral surface caused it and applies a minimal, targeted fix.
When to Use
- User corrects agent behavior ("no, don't do that", "you should always...", "stop doing X")
- Agent made a mistake that should never recur
- User explicitly invokes
/learn - A pattern of repeated errors suggests a missing behavioral rule
How It Works
This is an interactive skill. The user invokes /learn directly, and the agent runs in the foreground, conversing with the user throughout.
Flow
- Analyze the mistake: What went wrong? Read the conversation context, recent changes, and relevant code to understand the error.
- Determine root cause: Why did the agent behave this way? Missing rule? Stale convention? Wrong default?
- Diagnose the surface: Which behavioral surface needs to change? (See Writable Surfaces below.)
- Propose minimal fix: Enter native plan mode. Show exactly which file will change, what content will be added/modified, and why. One change per learning — never batch.
- Apply with approval: User must approve before any write. Apply the change. Confirm what was learned.
- Save to memory: Write the learning as a feedback memory in
.claude/memory/so Claude native memory retains it across sessions.
Writable Surfaces
The learn agent diagnoses which surface needs the fix:
| Surface | Path | What It Controls |
|---|---|---|
| Project conventions | CLAUDE.md |
Commands, gotchas, project rules, coding style |
| Agent identity | AGENTS.md |
Agent role, preferences, team behavior |
| Agent personality | SOUL.md / IDENTITY.md |
Tone, communication style |
| Global rules | ~/.claude/rules/*.md |
Cross-project behavioral rules |
| Claude native memory | .claude/memory/ |
Feedback, user prefs, project context |
| Project memory | memory/ |
Project-scoped knowledge files |
| Hooks | .claude/settings.json |
Event-driven automation, permission gates |
| Any config file | varies | Any file that shapes agent behavior |
Never-Touch Surfaces
plugins/genie/skills/— framework skills (maintained by framework developers)plugins/genie/agents/— framework agents (maintained by framework developers)- Other projects' files — scope is the current project only
- Source code — learn updates behavior configuration, not implementation
Claude Native Memory Connection
When a learning is applied, also save it as a feedback memory:
- Write a memory file to
.claude/memory/with frontmatter:markdown--- name: <concise-name> description: <one-line description for relevance matching> type: feedback --- <The rule itself> **Why:** <reason the user gave or the incident that caused it> **How to apply:** <when/where this guidance kicks in> - Update
.claude/memory/MEMORY.mdindex with a pointer to the new file.
This ensures the learning persists across conversations via Claude's native memory system.
Example
User corrects the agent: "Stop using pip install — this system only has uv."
The agent runs /learn:
- Analyze: Agent used
pip install python-dotenvwhich failed because pip isn't installed. - Root cause: No rule in
~/.claude/rules/about Python tooling. - Surface: Global rules (
~/.claude/rules/python-tooling.md) — applies to all projects. - Propose fix (plan mode):
Create ~/.claude/rules/python-tooling.md: - NEVER use pip or pip3 — not installed - Use uv tool install for persistent CLI tools - Use uv pip install inside venvs - User approves. File written.
- Save to memory:
markdown
# ~/.claude/memory/feedback_python_tooling.md --- name: use-uv-not-pip description: System uses uv for Python package management, pip is not installed type: feedback --- Use uv instead of pip for all Python operations. **Why:** pip is not installed on this system; uv is the only package manager. **How to apply:** Any time a Python package needs installing, use uv tool install or uv pip install.
Rules
- Plan mode is mandatory — never write without user approval via native plan mode.
- One learning at a time — diagnose one surface, propose one fix.
- Never assume — verify with the user before recording any learning.
- Never modify framework files —
plugins/genie/skills/andplugins/genie/agents/are off limits. - Never write source code — behavioral configuration only.
- Minimal changes — add the smallest rule that prevents the mistake from recurring.
- Always save to memory — every learning gets a feedback memory for cross-session persistence.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
genie
Single entry point for all genie operations — auto-routes natural language to the right skill, detects existing lifecycle state, and handles operational commands. Use when planning features, reporting bugs, managing teams, or asking about the system.
refine
Transform a brief or prompt into a structured, production-ready prompt via prompt-optimizer. File or text mode.
work
Execute an approved wish plan — orchestrate subagents per task group with fix loops, validation, and review handoff.
review
Validate plans, execution, or PRs against wish criteria — returns SHIP / FIX-FIRST / BLOCKED with severity-tagged gaps.
wish
Convert an idea into a structured wish plan with scope, acceptance criteria, and execution groups for /work.
dream
Batch-execute SHIP-ready wishes overnight — pick wishes, orchestrate workers, review PRs, wake up to results.
Didn't find tool you were looking for?