lessons

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

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.

agentmods
npx agentmods add skills/samplexbro/agentsmesh/lessons
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.

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,049 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00028 $0.01049
Opus 5 $0.00014 $0.00524
Sonnet 5 $0.00006 $0.00210
Haiku 4.5 $0.00003 $0.00105

Measured 2d ago against content hash 37d4a9861d63, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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 · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 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 · 71 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. 2d 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 (24 stars, last pushed 2d ago), licensed MIT. It adds 28 tokens to every session and 1,049 once invoked, about $0.0001 per session on Opus 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

Other skills, from other repositories

human-approval

Request human approval before performing a SAFETY-CRITICAL, IRREVERSIBLE, or SCOPE-EXPANDING action — submit a structured context (action, scope, risk, consequence) plus options, then STOP the current turn. The platform redispatches the agent after the human decides. NEVER use for routine deliverables (writing docs /…

Prismer-AI/PrismerCloud · 168 tokens

firebase-analytics

Use when logging analytics events, setting user properties, configuring default event parameters, building funnels, or adding screen-view tracking.

evanca/flutter-ai-rules · 28 tokens

firebase-remote-config

Use when implementing feature flags, running A/B tests, setting parameter defaults, fetching/activating config, or enabling real-time config updates.

evanca/flutter-ai-rules · 33 tokens

git-master

MUST USE whenever a task needs a commit or git-history investigation. Covers atomic commits, staging, commit-message style, rebase, squash, fixup/autosquash, blame, bisect, reflog, git log -S/-G, and questions like who wrote this or when was this added. Do not use for ordinary code edits unless the user asks for git…

code-yeongyu/oh-my-openagent · 81 tokens

setup

This skill should be used when user encounters "Azure MCP error", "Azure authentication failed", "az login required", "Azure CLI not found", or needs help configuring Azure MCP integration.

fcakyon/claude-codex-settings · 39 tokens

mongodb-natural-language-querying

Generate read-only MongoDB queries (find) or aggregation pipelines using natural language, with collection schema context and sample documents. Use this skill whenever the user asks to write, create, or generate MongoDB queries, wants to filter/query/aggregate data in MongoDB, asks "how do I query...", needs help with…

mongodb/agent-skills · 162 tokens