self-improvement

self-improvement is a skill for Claude Code, Codex from monkilabs/opencastle. It costs 70 tokens per session (545 once invoked), scanned A, original, MIT.

A process for recording lessons from failed or successful work in a LESSONS-LEARNED.md file and checking past lessons for similar problems.

In plain words
What is it for?
Use it after failures, retries, or retrospectives to search previous lessons, add a new entry, and identify gaps in existing skills or instructions.
Why use it?
It helps a team avoid repeating known mistakes and preserve useful fixes after a retry succeeds.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it after failures, retries, or retrospectives to search previous lessons, add a new entry, and identify gaps in existing skills or instructions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/monkilabs/opencastle/self-improvement
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 monkilabs/opencastle --skill self-improvement
Clone the repo
git clone --depth 1 https://github.com/monkilabs/opencastle

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 self-improvement

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/monkilabs/opencastle/self-improvement"><img src="https://agentmods.dev/badge/skills/monkilabs/opencastle/self-improvement.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 545 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.00070 $0.00545
Opus 5 $0.00035 $0.00272
Sonnet 5 $0.00014 $0.00109
Haiku 4.5 $0.00007 $0.00055

Measured 5d ago against content hash 27fa4a242665, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

self-improvement 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.

src/orchestrator/skills/self-improvement/SKILL.md · 58 lines

What it actually says

Self-Improvement Protocol

Core Rule

Retry with different approach and it works → document lesson immediately. File: .opencastle/LESSONS-LEARNED.md

Writing a Lesson

⛔ HARD GATE — Use the CLI. Do NOT edit LESSONS-LEARNED.md directly.

opencastle lesson --title "Short descriptive title" --category general --severity high \
  --problem "What was observed" --wrong "Failing approach" --correct "Working solution" \
  --why "Root cause"

Required: --title, --category, --severity, --problem · Optional: --wrong, --correct, --why

After writing: if lesson reveals gap in skill/instruction file, update that file too (prevents pitfall at source).

Workflow

  1. Search LESSONS-LEARNED.md for matching entries or similar errors.
  2. Attempt task with conservative flags/options informed by lessons.
  3. On failure: retry with modified approach (up to threshold); capture error details, context.
  4. On success: run opencastle lesson to record working approach.
  5. Verify: tail -1 .opencastle/LESSONS-LEARNED.md — confirm entry has title, category, severity. If malformed → re-run with corrected flags.
  6. If lesson indicates needed skill/instruction update: draft change; propose a PR.

Quick search example:

rg "missing CRON_SECRET" .opencastle/LESSONS-LEARNED.md || true

Categories & Severity

Valid --category and --severity values, tagging format: LESSON-CATEGORIES.md.

Quality Rules

  • Include exact error messages, commands, tool parameters
  • Always fill both --wrong and --correct — the contrast is what makes the lesson usable
  • One lesson per entry; code blocks mandatory for commands

Anti-Patterns

Never duplicate an existing lesson · Never defer logging to end of session

Agent Memory

For expertise tracking, cross-session knowledge graphs, load agent-memory skill.

Files

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.

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. 5d ago First seen · 58 lines · 70 tokens per session scan A 27fa4a242665

Subscribe to this mod's changes

self-improvement is a skill published in the GitHub repository monkilabs/opencastle (61 stars, last pushed 11d ago), licensed MIT. It adds 70 tokens to every session and 545 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories

product-architect

Complete product development system with 80 agents and 36 frameworks. Use when the user wants to build a product, write a PRD, plan an MVP or roadmap, design an app, research a market or check whether a feature already exists or is novel, do competitive analysis, run a security audit, build a financial model, plan…

ankitjha67/product-architect · 253 tokens

workspace-brief

Build a concise, evidence-backed briefing from workspace status and recent commits.

autohandai/code-cli · 18 tokens

agentic-delegation

Delegate exploration sweeps to Haiku subagents and bulk writing to Sonnet subagents while the orchestrator keeps architecture, security-sensitive edits, and commits; use at the start of any multi-step task in this repo to minimize token spend by delegating to cheaper models.

VincentChuWaiChow/vanguard-frontier-agentic · 60 tokens

skillify

Auto-create new skills from repetitive workflows. When you notice yourself doing the same multi-step process repeatedly, extract it into a reusable SKILL.md that any agent can use.

DDS-Solutions/AI-TadPole-OS · 37 tokens

aws-non-destructive-task-automation-advisor

Design AWS non-destructive task automation using EventBridge, Step Functions, Lambda, Systems Manager Automation, SNS, SQS, approvals, notifications, reporting, and evidence gathering. Use only for read-only or coordination-safe automation; do not use for destructive remediation or mutation-heavy runbooks.

VincentChuWaiChow/vanguard-frontier-agentic · 68 tokens

handoff

Compacts current session state into a clean handoff document for a fresh agent session.

DDS-Solutions/AI-TadPole-OS · 20 tokens