self-improve
Installation
SKILL.md
Self-Improve
Review the current conversation, or the project's past sessions when asked, to extract durable lessons and route each one to the right knowledge layer.
Step 1: Detect Context
Available destinations:
- Project AGENTS.md — the instruction file in the project root, plus any nested ones in subdirectories. At each level use
AGENTS.override.mdwhen one is present, otherwiseAGENTS.md: an override replaces that directory'sAGENTS.mdrather than adding to it, so a lesson written to a shadowed file never loads. A nested file scopes its guidance to that subtree, so a lesson scoped to one subtree belongs in the nearest enclosing file, with the root reserved for project-wide rules. - Auto memory — one writable memory target resolved for the canonical project root. Prefer a synced Claude Code project-memory source, then a memory-update target explicitly named by the active harness. If neither resolves, skip this destination.
- Skills — Project skills at
.agents/skills/(walked from project root down to cwd) and user-installed skills at~/.agents/skills/(resolve symlinks)
Resolve the canonical project root as the Git top-level containing the working directory, or the physical working directory outside a repository. Resolve Auto memory in this order:
- Synced Claude Code source memory — Read
~/.turbo/config.json. Whencodex.sharedClaudeAutoMemoryis exactlytrue, treat shared-memory setup as complete for every project and use this branch. ResolveautoMemoryDirectoryfrom Claude Code's managed settings, then project-local.claude/settings.local.json, then the user<Claude config home>/settings.json; exclude checked-in.claude/settings.json, where Claude Code ignores this security-sensitive field. Use the expanded override when set. Otherwise locate the resource directory under~/.codex/memories/extensions/external_agent_import/resources/whosescope.jsonmatches the canonical project root, take its directory name as the exact Claude project key, and useprojects/<project key>/memory/underCLAUDE_CONFIG_DIRwhen set or~/.claude/. Treatfalse, a missing or invalid key, and an unreadable~/.turbo/config.jsonas not opted in and continue to the harness target. - Harness memory update target — Otherwise use a project-specific memory file or additive note intake that the active harness instructions explicitly name for memory updates.
- No target — Otherwise skip Auto memory and route lessons through the remaining destinations.
Treat imported extension resources and the harness's consolidated memory files as read-only. For the resolved target, list the directory when applicable and read its index before routing lessons.