Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Lessons

ASecurity

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

24 stars
0 votes
0 copies
0 views
Added 9/25/2026
ai-agentsshellgit

Works with

climcp

Security Analysis

A100/100

Scanned 9/25/2026

$npx -y skills add sampleXbro/agentsmesh --skill lessons --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Lessons?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Lessons
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/samplexbro-lessons-38b25c03/badge)](https://www.skillsdirectory.com/skills/samplexbro-lessons-38b25c03)

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

Download with Pro
Files
SKILL.md
---
name: lessons
description: Use when about to edit a file or run a state-changing command, or after any failure, correction, or surprising result.
---

> **In this plugin, reach lessons through the MCP tools** — `lessons_query`,
> `lessons_add`, `lessons_topics`, `lessons_show`, `lessons_deprecate` — which
> this plugin ships and which work in any repository. The `agentsmesh` CLI
> commands named below are the equivalent shell form; use them only if the CLI
> is installed. Everything else on this page applies unchanged.

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

Attribution

sampleXbrosampleXbro
View sourceSee grades on GitHubMore from sampleXbro →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

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 (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →