# learn-rule

> Claude/Codex skill by [@rohitg00](https://omgskills.com/library/rohitg00/index.md) · 2.8k stars · Updated 2026-07-27

Capture a correction or lesson as a persistent learning rule with category, mistake, and correction. Stores, categorises, and retrieves rules for future sessions. Use after mistakes or when the user says "remember this", "don't forget", "note this", or "learn from this".

Tags: agent-orchestration, ai-agents, ai-coding, ai-workflow, claude, claude-code, claude-code-plugin, claude-code-skills, claude-skills, codex, context-engineering, cursor, developer-tools, gemini-cli, hooks, productivity, self-correction, workflow, worktrees

## Install

```sh
git clone https://github.com/rohitg00/pro-workflow /tmp/pro-workflow && ln -s /tmp/pro-workflow/skills/learn-rule ~/.claude/skills/learn-rule
```

## From README

Learn Rule Capture a lesson from the current session into permanent memory. Trigger Use when the user says "remember this", "add to rules", "don't do that again", or after a mistake is identified. Workflow Identify the lesson — what mistake was made? What should happen instead? Format the rule with full context. Propose the addition and wait for user approval. After approval, persist to LEARNED section or project memory. Format Wiki-scoped rules Append Wiki: to bind the rule to a single pro-workflow wiki. The rule loads only when that wiki is in scope, avoiding cross-project pollution: The capture hook auto-detects Wiki: and links the learning to that wiki via learningswiki.

## Links

- HTML page: https://omgskills.com/library/rohitg00/pro-workflow/skills/learn-rule/
- GitHub: https://github.com/rohitg00/pro-workflow
- Author: [@rohitg00](https://omgskills.com/library/rohitg00/index.md)

## More from this repo

- [context-engineering](https://omgskills.com/library/rohitg00/pro-workflow/skills/context-engineering/index.md) — Master the four operations of context engineering — Write, Select, Compress, Isolate.
   - [@rohitg00](https://omgskills.com/library/rohitg00/index.md) · 2.9k stars
- [auto-setup](https://omgskills.com/library/rohitg00/pro-workflow/skills/auto-setup/index.md) — Auto-configure quality gates, hooks, and settings for a new project.
   - [@rohitg00](https://omgskills.com/library/rohitg00/index.md) · 2.8k stars
- [batch-orchestration](https://omgskills.com/library/rohitg00/pro-workflow/skills/batch-orchestration/index.md) — Decompose large-scale changes into independent units and spawn parallel agents in isolated worktrees.
   - [@rohitg00](https://omgskills.com/library/rohitg00/index.md) · 2.8k stars
