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.
npx agentmods add skills/rolandbrecht/agent-skills/self-reflectionnpx skills add rolandbrecht/agent-skills --skill self-reflectiongit clone --depth 1 https://github.com/rolandbrecht/agent-skillsWrote 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.
[](https://agentmods.dev/skills/rolandbrecht/agent-skills/self-reflection)<a href="https://agentmods.dev/skills/rolandbrecht/agent-skills/self-reflection"><img src="https://agentmods.dev/badge/skills/rolandbrecht/agent-skills/self-reflection.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00085 | $0.00977 |
| Opus 5 | $0.00043 | $0.00489 |
| Sonnet 5 | $0.00017 | $0.00195 |
| Haiku 4.5 | $0.00009 | $0.00098 |
Grade A, and why
self-reflection 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Self-Reflection (Continuous Improvement Protocol)
Overview
AI coding agents are naturally "stateless." You might spend 2 hours debugging a complex Webpack configuration, a subtle race condition, or a confusing project directory layout, eventually fix it, and then completely "forget" the lesson when a new conversation starts.
The core goal of this skill is to turn you from a "temporary worker" into a "systematic documenter."
Core Principle: Hard-won knowledge must be persisted. If a task was difficult because of an undocumented project quirk or architectural gotcha, you MUST write a rule so the next agent (or yourself in the future) doesn't repeat your mistakes.
When to Use
You must trigger this protocol automatically before declaring a task "done" and notifying the user in the following scenarios:
- After successfully fixing a complex or confusing bug (especially if it took multiple attempts, required new context, or reading multiple files).
- After struggling with a framework configuration.
- After discovering a codebase-specific convention ("In this project, we always use
Xinstead ofY"). - After creating a complex workflow or tool sequence that could be reused.
The Protocol: How to Reflect
Before concluding your task, pause and answer these three questions internally:
- "Did I struggle with anything because I didn't know a project convention?"
- "Did I encounter an architectural 'gotcha' that another agent will likely trip over tomorrow?"
- "Did I write a custom CLI tool,
ast-greppattern, or bash script to solve this that I could reuse?"
If the answer to any of the above is "Yes", you MUST NOT just mention it to the user in chat. You must persist it to the codebase.
Action: Codifying the Lesson
Based on your internal reflection, choose the appropriate output format below and write the rule. Try to generalize the lesson.
1. Project-Specific Rules (AI Instruction Files)
Use this when you learned a specific convention for the current repository.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 5d ago First seen · 78 lines · 85 tokens per session scan A f05d5b37fc90
self-reflection is a skill published in the GitHub repository rolandbrecht/agent-skills (4 stars, last pushed 23d ago), licensed MIT. It adds 85 tokens to every session and 977 once invoked, about $0.0004 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-31.
Other skills, from other repositories
cocotrace
Build and query the SHA-256 requirements-to-implementation traceability graph across lifecycle artifacts.
cocoplus-config
CocoPlus configuration SSOT — $cocoplus sync propagates cocoplus.toml into downstream artifacts; $cocoplus migrate-config converts legacy safety-config.json. Invoked via $cocoplus sync and $cocoplus migrate-config.
bloom-crystallize
CocoBloom crystallization — converts a successful ship execution trace into a reusable skill file. Requires recent successful $ship. Invoked via $bloom crystallize.
context-add
Guided wizard to capture or update organizational Snowflake/Cortex standards into .cocoplus/context/ .md. Presents a menu of 6 standard types, collects answers via multi-turn dialogue, and commits the file.
discuss-red-team
CocoDiscuss Red-Team Mode — adversarial devil's advocate session that challenges spec assumptions before $plan. Invoked via $discuss --red-team.
lean-review
CocoLean diff-scoped over-engineering audit — scans uncommitted git diff and applies five classification tags (delete/stdlib/native/yagni/shrink) to identify unnecessary surface area before commit.