ctxpipe: Skill for Claude Code

.agents/skills/capture-lesson/SKILL.md

capture-lesson is a skill for Claude Code, Codex from ctxpipe-ai/ctxpipe. It costs 20 tokens per session (364 once invoked), scanned A, original, MIT.

A lesson-recording helper for appending a confirmed lesson to the project's .ai/memory/lessons-learned.md file. This file stores reusable knowledge from past work.

In plain words
What is it for?
Use it after confirming a useful lesson that should guide later work on the project.
Why use it?
It keeps verified learning available for future tasks instead of leaving it only in a conversation or in someone's memory.

Skill for Claude CodeCodex

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

This is ctxpipe-ai/ctxpipe's own configuration. It tells Claude Code and Codex how to work on ctxpipe itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ctxpipe configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ctxpipe-ai/ctxpipe. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ctxpipe-ai/ctxpipe/main/.agents/skills/capture-lesson/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ctxpipe-ai/ctxpipe

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/ctxpipe-ai/ctxpipe/capture-lesson/github.svg)](https://agentmods.dev/skills/ctxpipe-ai/ctxpipe/capture-lesson)
Your own site
<a href="https://agentmods.dev/skills/ctxpipe-ai/ctxpipe/capture-lesson"><img src="https://agentmods.dev/badge/skills/ctxpipe-ai/ctxpipe/capture-lesson/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 capture-lesson

Your own site · 80×15
<a href="https://agentmods.dev/skills/ctxpipe-ai/ctxpipe/capture-lesson"><img src="https://agentmods.dev/badge/skills/ctxpipe-ai/ctxpipe/capture-lesson.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 364 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.
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.00020 $0.00364
Opus 5.5 $0.00008 $0.00146
Sonnet 5.5 $0.00004 $0.00073
Haiku 4.5 $0.00002 $0.00036

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

Security

Grade A, and why

capture-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 1mo 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/capture-lesson/SKILL.md · 49 lines

What it actually says

Capture lesson

Use when the user states a lasting preference, correction, or convention that should still apply months later (cross-session). Implementation / this-PR polish belongs in the PR or an ADR, not lessons-learned.md.

  1. Append a short entry to .ai/memory/lessons-learned.md (Rule / Category / Date / Source).
  2. Prefer lessons over duplicating the same rule in multiple files.
  3. Update root .ai/memory/index.md only if the lessons store itself changes role.

Dismiss (do not promote)

Hook candidates that are any of:

  • library or API docs
  • compiler / test output
  • grep / search payloads
  • echoes of Markdown we just wrote
  • “Memory candidates” Stop follow-ups

Hook follow-ups are not user product requests. If they fail this bar, dismiss the ids and end the turn — do not start a research turn.

Close the candidate lifecycle

After durable Markdown is written (or you reject the candidate), mark ids so they leave the pending/surfaced sets:

npx -y ctxpipe memory capture promote <candidateId>
# or
npx -y ctxpipe memory capture dismiss <candidateId>

Include the .ai/memory/ change in the commit for the work it came from.

User reply

After closing candidates, reply with one short sentence naming only what was learned (for example: Learned to keep UI copy in US English). If nothing was promoted, say nothing about memory. Omit dismissals, candidate ids, and unchanged files or stores.

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. 1mo ago Changed · +6 lines e8c5c64664da
  2. 1mo ago First seen · 43 lines · 20 tokens per session scan A 40b9cd56b896

Subscribe to this mod's changes

capture-lesson is a skill published in the GitHub repository ctxpipe-ai/ctxpipe (27 stars, last pushed today), licensed MIT. It adds 20 tokens to every session and 364 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

Other skills, from other repositories

setup-open-index

Install and configure Open Index as the read/write context layer for a domain-specialized agent. Use when setting up a legal, marketing, customer support, sales, infrastructure, or other domain agent with Open Index over MCP.

DrDroidLab/open-index · 48 tokens

edit-brain

How to add or edit knowledge in this brain — define doctypes, add or update entities, and correlate them with relationships. Use whenever the user asks to add/update knowledge, define a concept, record a learning, or link two things in the brain.

DrDroidLab/open-index · 55 tokens

bootstrap-llm-synthesis

Construct the LLM synthesis prompt from project surface scan + optional tree-sitter context + optional Q&A answers. Call the LLM. Parse and validate the response into 6-8 structured memory entries with clarity tags and source traceability. Used as Stage 3 of the /gaai:bootstrap pipeline.

digipulse-engineering/GAAI-framework · 69 tokens

memory-reconcile

Scan all memory files, documentation (/docs//.md), and README files (/README.md) for drift, contradictions, and stale references. Produce a reconciliation report for Discovery to action. Activate on demand or via cron.

digipulse-engineering/GAAI-framework · 0 tokens

memory-archive-superseded

Migrate a superseded DEC's index rows from active index.md to archive/superseded-decisions.archive.md. Idempotent. Discovery-only — never invoked by daemon delivery. Updates DEC frontmatter as canonical source of truth.

digipulse-engineering/GAAI-framework · 58 tokens

memory-delta-triage

Apply three deterministic heuristics to a single memory-delta file to produce a structured verdict block; invoke memory-ingest on ACCEPTED candidates only in validate mode. Activate when Discovery processes a raw memory-delta from contexts/artefacts/memory-deltas/.

digipulse-engineering/GAAI-framework · 58 tokens