drift: Skill for Claude Code

.github/skills/self-improving-agent/SKILL.md

self-improving-agent is a skill for Claude Code from mick-gsk/drift. It costs 85 tokens per session (2,337 once invoked), scanned A, original, MIT.

A learning log for coding agents that records mistakes, corrections, knowledge gaps, useful findings, and requested improvements in Markdown files.

In plain words
What is it for?
Use it to record command failures, corrections, newly discovered knowledge, better approaches, and feature requests. It can also organize lessons into project memory.
Why use it?
It prevents important lessons from disappearing after a failed command or user correction. Later work can use the recorded information to improve the project or agent behavior.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

This is mick-gsk/drift's own configuration. It tells Claude Code how to work on drift 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 drift configures →

Part of the drift plugin — 31 skills, 17 agents shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to mick-gsk/drift. 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/mick-gsk/drift/main/.github/skills/self-improving-agent/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/mick-gsk/drift

Made for: Claude Code.

Or install drift, the plugin that ships this one along with the rest of its 31 skills, 17 agents.

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-improving-agent

README.md
[![agentmods](https://agentmods.dev/badge/skills/mick-gsk/drift/self-improving-agent.svg)](https://agentmods.dev/skills/mick-gsk/drift/self-improving-agent)
Your own site
<a href="https://agentmods.dev/skills/mick-gsk/drift/self-improving-agent"><img src="https://agentmods.dev/badge/skills/mick-gsk/drift/self-improving-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,337 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.1 $0.00085 $0.02337
Opus 5 $0.00043 $0.01169
Sonnet 5 $0.00017 $0.00467
Haiku 4.5 $0.00009 $0.00234

Measured 6d ago against content hash 379c19017c27, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

self-improving-agent 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 6d 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.

.github/skills/self-improving-agent/SKILL.md · 296 lines

How it starts

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

Self-Improvement Skill

Log learnings and errors to markdown files for continuous improvement. Coding agents can later process these into fixes, and important learnings get promoted to project memory.

Source: https://clawhub.ai/pskoett/self-improving-agent (v3.0.16, MIT-0)

First-Use Initialisation

Before logging anything, ensure the .learnings/ directory and files exist in the project or workspace root. If any are missing, create them:

mkdir -p .learnings
[ -f .learnings/LEARNINGS.md ] || printf "# Learnings\n\nCorrections, insights, and knowledge gaps captured during development.\n\n**Categories**: correction | insight | knowledge_gap | best_practice\n\n---\n" > .learnings/LEARNINGS.md
[ -f .learnings/ERRORS.md ] || printf "# Errors\n\nCommand failures and integration errors.\n\n---\n" > .learnings/ERRORS.md
[ -f .learnings/FEATURE_REQUESTS.md ] || printf "# Feature Requests\n\nCapabilities requested by the user.\n\n---\n" > .learnings/FEATURE_REQUESTS.md

Never overwrite existing files. This is a no-op if .learnings/ is already initialised.

Do not log secrets, tokens, private keys, environment variables, or full source/config files unless the user explicitly asks for that level of detail. Prefer short summaries or redacted excerpts over raw command output or full transcripts.

Quick Reference

Situation Action
Command/operation fails Log to .learnings/ERRORS.md
User corrects you Log to .learnings/LEARNINGS.md with category correction
User wants missing feature Log to .learnings/FEATURE_REQUESTS.md
API/external tool fails Log to .learnings/ERRORS.md with integration details
Knowledge was outdated Log to .learnings/LEARNINGS.md with category knowledge_gap
Found better approach Log to .learnings/LEARNINGS.md with category best_practice
Simplify/Harden recurring patterns Log/update .learnings/LEARNINGS.md with Source: simplify-and-harden and a stable Pattern-Key
Similar to existing entry Link with See Also, consider priority bump
Broadly applicable learning Promote to CLAUDE.md, AGENTS.md, and/or .github/copilot-instructions.md

Read the full file on GitHub · 296 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. 6d ago First seen · 296 lines · 85 tokens per session scan A 379c19017c27

Subscribe to this mod's changes

self-improving-agent is a skill published in the GitHub repository mick-gsk/drift (15 stars, last pushed 1mo ago), licensed MIT. It adds 85 tokens to every session and 2,337 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-30.