Skip to content
Skills Library
AI & agents · Analysis

lessons

/lessons

Use when about to edit a file or run a state-changing command, or after any failure, correction, or surprising result.

Repository
agentsmesh ↗
Licence
MIT
Last repository change
24.09.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 24.09.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when about to edit a file or run a state-changing command, or after any failure, correction, or surprising result.

Original author description

Use when about to edit a file or run a state-changing command, or after any failure, correction, or surprising result.

How it works

  1. The Iron Law
  2. Recall — before each edit/command, and at task start
  3. Capture — Gate Function (before any completion claim)
  4. Lesson gate — before final response
Original SKILL.md headings · 69 lines, 636 words
SKILL.md preview
---
name: lessons
description: Use when about to edit a file or run a state-changing command, or after any failure, correction, or surprising result.
---

# Lessons — operating manual (Iron Law)

## The Iron Law

**NO MUTATION WITHOUT RECALL. NO COMPLETION WITHOUT A CAPTURE DECISION.**

Violating the letter is violating the spirit. Edited a file or ran a state-changing
command without recall? Process violation. Did the turn hit a failure / correction /
regression / wrong assumption / surprise and you have not captured (nor stated
`Lesson: none`)? The task is INCOMPLETE — and the user will check. The graph
`.agentsmesh/lessons/lessons.json` is canonical — never hand-edit.

## Recall — before each edit/command, and at task start

`agentsmesh lessons query --file <path> --cmd <command> --session auto`, then apply every
rule. Pure-read commands (read-only) and the query itself are exempt. **keyword-only recall
for a specific edit is the anti-pattern** — anchor those to `--file`/`--cmd`. But at the
START of a task (or when planning), run `agentsmesh lessons query --keyword "<the task's
key terms>" --always --session auto`: that surfaces the conceptual rules no file/command
names PLUS the universal always-on lessons — the manual equivalent of the automatic prompt
recall on hook-capable tools. **Always pass `--session auto`**: it suppresses rules already
shown this session so repeat recalls stay quiet (without it every recall re-delivers the
whole matched set); `--no-dedup` re-shows everything after a context reset. Author a
`keyword` trigger beside a `file_glob` on conceptual lessons so they are reachable both
ways. No shell → MCP `lessons_query` (`file`/`command`/`keyword`/`always`; session dedup
is on by default there — `no_dedup:true` to re-show).

## Capture — Gate Function (before any completion claim)

1. **SELF-CRITIQUE**: any failure, correction, regression, wrong assumption,
   useful surprise, repeated friction, or non-obvious fix? Failing
   tests/lint/typecheck and user/review corrections — yours or anyone's — all count.
   PROCESS/TOOLING surprises count too (a sandbox command that silently no-op'd, a port
   already in use, a library's argument shape) — trigger those with `--trigger-cmd`. So
   does a review finding you REVIEWED then deliberately REJECTED: capture it as a "do NOT
   refactor" guard so the reasoning survives the session.
2. **CAPTURE** a reusable imperative rule with an effective trigger (else say so):
   `agentsmesh lessons add "<rule>" --topic <id> --trigger-file <glob>`. Trigger on the
   file-CLASS where it will RECUR (e.g. `**/lib/use*Form*.ts`), NOT the single file you
   discovered it in — and NOT a broad `src/**`. If the rule is a UNIVERSAL standard that
   applies to EVERY task (a comment/test/style convention no file or command names),
   capture it with `--scope always` instead — it needs no trigger and is delivered on
   every task.
3. **RECEIPT**: emit `Lesson: captured <id>` or `Lesson: none`.

At least one _effective_ trigger is required (or `--scope always` for a universal rule) or
the capture is rejected (`UNRECALLABLE_LESSON`); prefer `--trigger-file`. No shell → MCP `lessons_query`,
`lessons_add`, `lessons_topics`, `lessons_show`, `lessons_deprecate`. Run
`agentsmesh lessons --help` for every subcommand and flag: query, add, topics, show,
deprecate, merge, untrigger, strip-markers, prune, journal, validate, resolve, stats, import-md.
A git merge conflict in `lessons.json` → run `agentsmesh lessons resolve`; never hand-edit it.

### Rationalization Prevention — these excuses mean STOP

| Excuse | Reality |
| --- | --- |
| "Small edit / I already know this / later" | Query first — skipping recall is a process violation |
| "Nothing reusable here" | You hit a failure/surprise — name it or capture it |
| "My own TDD red, not a real failure" | A red you did not predict IS a lesson |
| "I fixed one site; the twin is obvious" | Capture it — the unfixed twin is what gets missed |
| "Different words, so the rule doesn't apply" | Spirit over letter |

## Lesson gate — before final response

The final response MUST carry the receipt: `Lesson: captured <id>` or `Lesson: none`.
No receipt = task incomplete. Do not capture one-off facts, task summaries, or project
context — only reusable imperative rules with an effective trigger.

Versions

RepositoryScoreLicence
This page · samplexbro/agentsmesh90MIT
optimiziramsi/skills100MIT
HidekiAI/llm-lessons100MIT
mo-cmyk/mazarbul100Apache-2.0
samplexbro/agentsmesh90MIT
samplexbro/agentsmesh90MIT
samplexbro/agentsmesh90MIT

Database snapshot: 13.11.2026 · package version 672c4ed5e8cb (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100rc-memory
    Project memory under .rc/memory/ — facts, lessons, golden paths. Use before working and after a correction. Do not use to edit source.
  • 100never-twice
    Use before any task that changes something (writing or editing code or config, installing packages, running tests, builds, migrations, commits or deploys) to check lessons from past mistakes, and whenever the user corrects you or a command fails, to record the lesson so it is never repeated.
  • 100learning-loop
    Stops an agent from repeating a mistake. After a correction or a non-obvious trap it records a lesson (rule, Why, How to apply, links) in the project's durable memory, checks lessons before acting, promotes a recurring lesson into a test, lint rule, hook or CI gate, and fixes or…
  • 100maestro-improve
    Turn filed lessons into the smallest doctrine edit. Use when a Lead assigns improvement work for one target: group pending lessons, make one evidence-linked commit per target, return it for independent challenge, and process each accepted or rejected lesson without deleting history.
  • 100area-lessons
    Use this skill when the operator wants to see the active lessons learned by earlier headless runs for the directory they are working in, pulled on demand from the local swarmery daemon. Read-only. Don't use it to accept, edit or promote lessons (that is the daemon's Lessons…
  • 100import
    Import lessons from past Claude Code or Codex sessions on this machine into FixMyPrompt as auto-saved drafts for the person to look over. Use when the person asks to import past sessions or lessons.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.