Skip to content
Back to skills

Lesson

ASecurity

Add, promote, or prune a lesson in the tracker. A lesson is one rule the agents learned from a correction or a solved problem. Use for /lesson add, /lesson promote, /lesson prune, or when the person corrects how agents work, or a hard problem is solved and worth keeping.

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
ai-agentspythongobashsqldatabase

Security analysis

A100/100

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

Scanned November 7, 2026

npx -y skills add foxrun-ai/foxrun --skill lesson --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Lesson?

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

Security grade badge for Lesson
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/foxrun-ai-lesson/badge)](https://www.skillsdirectory.com/skills/foxrun-ai-lesson)

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
---
type: note
workspace: system
timestamp: 2026-10-26T14:20:00-04:00
name: lesson
description: "Add, promote, or prune a lesson in the tracker. A lesson is one rule the agents learned from a correction or a solved problem. Use for /lesson add, /lesson promote, /lesson prune, or when the person corrects how agents work, or a hard problem is solved and worth keeping."
kind: knowledge
argument-hint: "add | promote | prune | show [lesson id or words]"
---

# lesson

One skill for the lesson object. A lesson is one rule, in one line, that every agent reads at start.
Lessons live in the tracker so the start page shows them. Read the open ones from the `active_lessons` view.
A lesson is a waypoint, not a home. When a skill, contract line, or check can enforce it, promote it there.
When a lesson and a skill disagree, the skill wins, and the lesson becomes a fix to that skill.

## Find the tracker

Set `<ws>` to the workspace that owns the work. Do not route by the current folder alone.
Set `<tracker>` to `workspace_settings.<ws>.database` in `~/.foxrun/config/person.json`. If it is absent, use `~/.foxrun/data.db`.
In the commands below, `<work>` stands for this exact prefix:

```bash
python3 ~/.foxrun/work/work.py --workspace <ws> --db <tracker> --receipt-root ~/foxrun/<ws> --by <you>
```

Write `<you>` as your own agent name, never the runtime name.

## Steps

1. **Add.** When the person corrects how agents work, add the lesson in the same turn. When a hard problem is solved, add the one rule that would have saved the time.
   `<work> lesson-add --rule "<one line>" --source "<task id, comment:<id>, session, handoff, or file>" [--person-words "<their exact words>"] [--lesson-workspace <ws>|all] [--applies-to <seat>|all]`.
   Done when the command prints `ok lesson-add <id>`. A line that ends in `duplicate` names the lesson that already holds the rule; use it.
2. **Promote.** Find the skill, contract line, or check that should enforce the rule. Change it through its own owner: a skill through `skillify`, a contract through the person's yes. Then retire the lesson and point at the new home:
   `<work> lesson-update <lesson id> --status replaced --source "<path of the line that now enforces it>"`.
   Done when the enforcing line exists and the lesson row shows `replaced`.
3. **Prune.** Read the open lessons:
   `sqlite3 -readonly <tracker> "SELECT id,text,workspace,applies_to,created_on FROM active_lessons ORDER BY created_on"`.
   For each one, keep it, merge it, or retire it. Merge two lessons with `lesson-add --rule "<merged line>" --replaces <old id>`. Retire a stale one with `lesson-update <id> --status replaced --source "<why>"`. Done when each lesson you read has one of the three calls, and you listed them.
4. **Read it back.** Run `sqlite3 -readonly <tracker> "SELECT id,text,status,source FROM lessons WHERE id='<lesson id>'"`. Done when the row shows what you wrote.

## Gotchas

- Keep the rule to one line. Detail goes in the source the lesson points to.
- `--person-words` holds the exact words. Do not tidy them.
- Pruning only retires rows. It never deletes one.
- A lesson that keeps coming back is a sign the skill is wrong. Promote it.

Files in this skill

  • SKILL.md3.1 KB
  • replays/promote-retires-row.json232 B

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.

Comments

Loading comments…

Newsletter

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