promote-lesson

promote-lesson is a command for Claude Code from gosha70/code-copilot-team. It costs 0 tokens per session (538 once invoked), scanned A, original, MIT.

A command that moves a useful lesson from the current coding session into the project's shared wiki.

In plain words
What is it for?
Use it when knowledge should remain after the session, such as a solution to a recurring problem or the reason for choosing an approach.
Why use it?
It preserves decisions, recipes, and incident lessons so future sessions and contributors can find them.

Command for Claude Code

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 commands/gosha70/code-copilot-team/promote-lesson
Clone the repo
git clone --depth 1 https://github.com/gosha70/code-copilot-team

Made for: Claude Code.

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 promote-lesson

README.md
[![agentmods](https://agentmods.dev/badge/commands/gosha70/code-copilot-team/promote-lesson.svg)](https://agentmods.dev/commands/gosha70/code-copilot-team/promote-lesson)
Your own site
<a href="https://agentmods.dev/commands/gosha70/code-copilot-team/promote-lesson"><img src="https://agentmods.dev/badge/commands/gosha70/code-copilot-team/promote-lesson.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 538 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.00000 $0.00538
Opus 5 $0.00000 $0.00269
Sonnet 5 $0.00000 $0.00108
Haiku 4.5 $0.00000 $0.00054

Measured 4d ago against content hash 7947f07fca90, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

promote-lesson 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 4d 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.

adapters/claude-code/.claude/commands/promote-lesson.md · 44 lines

How it starts

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

Promote a session-level lesson into the project wiki at knowledge/wiki/. Follows the canonical curator procedure; never edits the wiki without it.

When to use this

The user has identified a lesson, decision, or recipe that should outlive the current session and wants it captured in the durable knowledge layer. Examples:

  • "Document this incident — we should not repeat it."
  • "This recipe for X should be a playbook."
  • "Capture the rationale for choosing Y over Z."

If the user is asking you to remember something for this session only, use session memory instead. The wiki is for content that survives across sessions and contributors.

Argument

$ARGUMENTS — a brief description of the lesson to promote. Free-form prose. If empty, ask the user for a description before proceeding.

Procedure

  1. Read the curator persona. Open and follow knowledge/wiki/schema/WIKI_MAINTAINER.md in full. Do not skip this even if you have run this command before — the schema can change.

  2. Apply the four-question gate from knowledge/wiki/schema/ingest-rules.md. If the lesson does not qualify, tell the user why it does not qualify and stop. Do not promote a borderline lesson "to be safe".

  3. Walk the canonical loop from knowledge/wiki/workflows/promote-lesson-to-wiki.md end-to-end:

    • Pick the page type (knowledge/wiki/schema/page-types.md).
    • Pick or reuse the slug.
    • Gather sources per knowledge/wiki/schema/citation-rules.md (no source → no page).
    • Write or update the page using the type's template.
    • Link from knowledge/wiki/index.md.
    • Append a one-line entry to knowledge/wiki/log.md.
  4. Run the linter:

    bash knowledge/wiki/scripts/lint-wiki.sh
    

    If it fails, fix the violation. Never commit lint violations and never silence the linter.

  5. Stop. Do not "improve" adjacent pages in the same turn. Drive-by edits make review hard. If the user wants more lessons promoted, run this command again per lesson.

Read the full file on GitHub · 44 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. 4d ago First seen · 44 lines · 0 tokens per session scan A 7947f07fca90

Subscribe to this mod's changes

promote-lesson is a command published in the GitHub repository gosha70/code-copilot-team (6 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 538 tokens. 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-31.