learn

Diagnose and fix agent behavioral surfaces when the user corrects a mistake — connects to Claude native memory.

272 stars

Best use case

learn is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Diagnose and fix agent behavioral surfaces when the user corrects a mistake — connects to Claude native memory.

Teams using learn should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/learn/SKILL.md --create-dirs "https://raw.githubusercontent.com/automagik-dev/genie/main/skills/learn/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/learn/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How learn Compares

Feature / AgentlearnStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Diagnose and fix agent behavioral surfaces when the user corrects a mistake — connects to Claude native memory.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# /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

1. **Analyze the mistake:** What went wrong? Read the conversation context, recent changes, and relevant code to understand the error.
2. **Determine root cause:** Why did the agent behave this way? Missing rule? Stale convention? Wrong default?
3. **Diagnose the surface:** Which behavioral surface needs to change? (See Writable Surfaces below.)
4. **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.
5. **Apply with approval:** User must approve before any write. Apply the change. Confirm what was learned.
6. **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:

1. 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>
   ```
2. Update `.claude/memory/MEMORY.md` index with a pointer to the new file.

This ensures the learning persists across conversations via Claude's native memory system.

## 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/` and `plugins/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.

Related Skills

work

272
from automagik-dev/genie

Execute an approved wish plan — orchestrate subagents per task group with fix loops, validation, and review handoff.

wish

272
from automagik-dev/genie

Convert an idea into a structured wish plan with scope, acceptance criteria, and execution groups for /work.

trace

272
from automagik-dev/genie

Dispatch trace subagent to investigate unknown issues — reproduces, traces, and reports root cause for /fix handoff.

review

272
from automagik-dev/genie

Validate plans, execution, or PRs against wish criteria — returns SHIP / FIX-FIRST / BLOCKED with severity-tagged gaps.

report

272
from automagik-dev/genie

Investigate bugs comprehensively — cascade through /trace, capture browser evidence, extract observability data, and auto-create a GitHub issue with all findings.

refine

272
from automagik-dev/genie

Transform a brief or prompt into a structured, production-ready prompt via prompt-optimizer. File or text mode.

genie

272
from automagik-dev/genie

Transform any Claude Code session into an Automagik Genie orchestrator — guide users through brainstorm, wish, team, and PR lifecycle.

fix

272
from automagik-dev/genie

Dispatch fix subagent for FIX-FIRST gaps from /review, re-review, and escalate after 2 failed loops.

dream

272
from automagik-dev/genie

Batch-execute SHIP-ready wishes overnight — pick wishes, orchestrate workers, review PRs, wake up to results.

docs

272
from automagik-dev/genie

Dispatch docs subagent to audit, generate, and validate documentation against the codebase.

council

272
from automagik-dev/genie

Brainstorm and critique with 10 specialist viewpoints. Use for architecture, plan reviews, or tradeoffs.

brainstorm

272
from automagik-dev/genie

Explore ambiguous or early-stage ideas interactively — tracks wish-readiness and crystallizes into a design for /wish.