self-improve

self-improve is a command for Claude Code from nitinjain999/platform-skills. It costs 137 tokens per session (5,167 once invoked), scanned B, original, Apache-2.0.

A workspace setup for an AI coding agent that records mistakes, lessons, and repeated patterns in project files.

In plain words
What is it for?
Use it to create learning and memory folders, log errors and lessons, find repeated issues, and promote stable notes into files such as AGENTS.md or CLAUDE.md.
Why use it?
It prevents useful fixes and discoveries from being forgotten between sessions. It also makes recurring problems easier to spot and turn into lasting project guidance.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is Source removed: ./.learnings/, ./memory/.

Part of the platform-skills plugin — 1 skill, 43 commands shipped together

Good fit Use it to create learning and memory folders, log errors and lessons, find repeated issues, and promote stable notes into files such as AGENTS.md or CLAUDE.md.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/nitinjain999/platform-skills
agentmods
npx agentmods add commands/nitinjain999/platform-skills/self-improve

Made for: Claude Code.

Or install platform-skills, the plugin that ships this one along with the rest of its 1 skill, 43 commands.

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-improve

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/nitinjain999/platform-skills/self-improve"><img src="https://agentmods.dev/badge/commands/nitinjain999/platform-skills/self-improve.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 137 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,167 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00137 $0.05167
Opus 5 $0.00068 $0.02583
Sonnet 5 $0.00027 $0.01033
Haiku 4.5 $0.00014 $0.00517

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

Security

Grade B, and why

self-improve scanned grade B with 1 finding 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 9d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

5. Detect the user's platform and offer to wire all three hooks in `~/.claude/settings.json`:
commands/self-improve.md · 435 lines

How it starts

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

Bootstrap and operate a self-improving, proactive agent workspace.

Path Resolution (applies to all modes)

Before executing any mode, resolve LEARNINGS_BASE:

  1. If mode is init global → use ~/.claude/
  2. Else if mode is init local → use . (current working directory)
  3. Else if ~/.claude/.learnings/ exists → use ~/.claude/ as base (global setup)
  4. Else if .learnings/ exists in the current working directory → use . as base (project setup)
  5. Else if mode is init (no argument) → ask the user to choose (see init mode below)
  6. Else → default to ~/.claude/, create the directories, and inform the user that global setup was auto-created

~/.claude/ resolves consistently across all platforms (macOS, Linux, Windows) because Claude Code uses os.homedir() for ~. On Windows this maps to C:\Users\<you>\.claude\ — no manual path adjustment needed.

All path references in every mode below use LEARNINGS_BASE as the root:

Logical path Resolved path (global) Resolved path (project)
.learnings/LEARNINGS.md ~/.claude/.learnings/LEARNINGS.md .learnings/LEARNINGS.md
.learnings/ERRORS.md ~/.claude/.learnings/ERRORS.md .learnings/ERRORS.md
.learnings/FEATURE_REQUESTS.md ~/.claude/.learnings/FEATURE_REQUESTS.md .learnings/FEATURE_REQUESTS.md
memory/working-buffer.md ~/.claude/memory/working-buffer.md memory/working-buffer.md
memory/SESSION-STATE.md ~/.claude/memory/SESSION-STATE.md memory/SESSION-STATE.md
memory/YYYY-MM-DD.md ~/.claude/memory/YYYY-MM-DD.md memory/YYYY-MM-DD.md
.learnings/.pending-errors.log ~/.claude/.learnings/.pending-errors.log .learnings/.pending-errors.log

Promotion targets (CLAUDE.md, AGENTS.md, .github/copilot-instructions.md) always remain project-local regardless of scope — only the capture files follow LEARNINGS_BASE.

Reference: references/agent-self-improve.md → Global vs project scope

Mode: init global

Read the full file on GitHub · 435 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. 9d ago First seen · 435 lines · 137 tokens per session scan B d263f3b10233

Subscribe to this mod's changes

self-improve is a command published in the GitHub repository nitinjain999/platform-skills (41 stars, last pushed yesterday), licensed Apache-2.0. It adds 137 tokens to every session and 5,167 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.