lessons

lessons is a skill for Claude Code, Codex from sampleXbro/agentsmesh. It costs 28 tokens per session (1,074 once invoked), scanned A, original, MIT.

An operating guide for recalling relevant lessons before changing files or running commands that alter project state, and for recording lessons after problems or surprises.

In plain words
What is it for?
Use it before edits or state-changing commands, after failures or corrections, and when deciding whether a new lesson should be captured.
Why use it?
It helps avoid repeating known mistakes and preserves useful corrections for future work.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it before edits or state-changing commands, after failures or corrections, and when deciding whether a new lesson should be captured.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/samplexbro/agentsmesh/lessons
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sampleXbro/agentsmesh --skill lessons
Clone the repo
git clone --depth 1 https://github.com/sampleXbro/agentsmesh

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lessons

README.md
[![agentmods](https://agentmods.dev/badge/skills/samplexbro/agentsmesh/lessons/github.svg)](https://agentmods.dev/skills/samplexbro/agentsmesh/lessons)
Your own site
<a href="https://agentmods.dev/skills/samplexbro/agentsmesh/lessons"><img src="https://agentmods.dev/badge/skills/samplexbro/agentsmesh/lessons/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for lessons

Your own site · 80×15
<a href="https://agentmods.dev/skills/samplexbro/agentsmesh/lessons"><img src="https://agentmods.dev/badge/skills/samplexbro/agentsmesh/lessons.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,074 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00028 $0.01074
Opus 5.5 $0.00011 $0.00430
Sonnet 5.5 $0.00006 $0.00215
Haiku 4.5 $0.00003 $0.00107

Measured 2mo ago against content hash d12648729a27, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

lessons scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/lessons/SKILL.md · 72 lines

How it starts

The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Read the full file on GitHub · 72 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed · +1 lines d12648729a27
  2. 3mo ago First seen · 71 lines · 28 tokens per session scan A 37d4a9861d63

Subscribe to this mod's changes

lessons is a skill published in the GitHub repository sampleXbro/agentsmesh (31 stars, last pushed 2d ago), licensed MIT. It adds 28 tokens to every session and 1,074 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

lessons compared with skills from other repositories

lessons next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
lessonssampleXbro/agentsmeshSkill312d agoMITA28Claude Code, Codex
user-research-cookiycookiy-ai/user-research-skillSkill1.6k18d agoMITA154Claude Code, Codex
best-practicesMoizIbnYousaf/Ai-Agent-SkillsSkill1.2k2mo agoMITA35Claude Code, Codex
code-documentationMoizIbnYousaf/Ai-Agent-SkillsSkill1.2k2mo agoMITA35Claude Code, Codex
audit-library-healthMoizIbnYousaf/Ai-Agent-SkillsSkill1.2k2mo agoMITA33Claude Code, Codex
share-a-libraryMoizIbnYousaf/Ai-Agent-SkillsSkill1.2k2mo agoMITA41Claude Code, Codex
update-installed-skillsMoizIbnYousaf/Ai-Agent-SkillsSkill1.2k2mo agoMITA31Claude Code, Codex