Skip to content
Back to skills

Learn

ASecurity

Turn logged corrections into hook proposals, but only once a tag hits three strikes. Explicit invoke only: /learn.

  • 13 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 16, 2026
ai-agentspython

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 16, 2026

npx -y skills add ao92265/claude-code-playbook --skill learn --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Learn?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Learn
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ao92265-learn/badge)](https://www.skillsdirectory.com/skills/ao92265-learn)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: learn
description: >-
  Turn logged corrections into hook proposals, but only once a tag hits three strikes. Explicit invoke only: /learn.
---

# /learn

Corrections are already captured. Nothing counts them, so a one-off gripe and a real
pattern look identical, and the rule files only ever grow. This skill is the gate: a tag
has to come up three times before it earns a rule, and anything that never repeats gets
cleared instead of hardening.

## Run the tally first

```
python3 ~/.claude/skills/learn/scripts/tally.py
```

Add `--json` for machine-readable output, `--threshold N` to change the bar. The script
reads `~/.claude/feedback.jsonl` and writes nothing.

It splits tags four ways:

- **PROMOTE** at or above three strikes. These earn a rule.
- **WATCH** under three and still recent. Leave alone. Say nothing about them.
- **PRUNE** under three and untouched for over 30 days. Propose deleting these lines.
- **NEAR-DUPLICATE** tags close enough to be one pattern. Merge before counting, since a
  split tag defeats the threshold.

## The rules of promotion

1. **Three strikes, no fewer.** Two is a coincidence. Do not promote on a hunch that the
   third is coming.
2. **Propose a hook, not prose.** A rule added to CLAUDE.md or an @-imported file stops
   firing once context gets long. Only a hook survives. If the behaviour cannot be caught
   by a hook, say so plainly rather than falling back to prose.
3. **Catch-all tags need a question first.** `wholesale rejection`, `direct contradiction`
   and `told to stop doing something` are what the detector assigns when it cannot
   classify. A high count there measures how often the user pushed back, not one behaviour.
   Before proposing anything, read the sessions behind those entries and find the actual
   repeated behaviour, or ask him which one he means. Never promote the bucket itself.
4. **One rule per run, at most two.** The point is to stop rule sprawl, not to add four
   hooks in an afternoon.
5. **Check it is not already covered.** Grep the existing hooks first. `register-gate.py`,
   `answer-shape-nudge.sh` and `prose-guard.sh` between them already cover register,
   answer shape and prose tells.

## What to hand back

For each promoted tag:

- The tag, its count, and the dates it spans.
- One line on the behaviour, in plain English, quoting one real example from the log.
- The proposed hook: which event it binds to, what it checks, and what it says when it
  fires. Ten lines of pseudocode at most.
- Whether an existing hook should be extended instead of adding a new one. Extending is
  almost always the right answer.

Then the prune list, as a plain list of lines to delete, and nothing else.

## Boundaries

This skill proposes. It does not edit `~/.claude/hooks/**`, `settings.json`, or any rule
file, and it does not rewrite `feedback.jsonl`. the user approves each change, then the edit
happens as normal work with `hooks-smoke-test.sh` run afterwards.

Files in this skill

  • SKILL.md2.9 KB
  • scripts/tally.py5.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.