Skip to main content

claude-self-improve

Scaffold a .claude/ governance framework that makes AI coding agents self-improving.

What it does

claude-self-improve init creates a .claude/ directory in your git repo containing:

  • 4 hook scripts that enforce governance automatically (session tracking, anti-pattern reminders, edit tracking, reflection gates)
  • 7 meta-skill commands that teach the agent to learn from mistakes, stay in scope, and improve its own skills
  • Memory files for persistent learning across sessions (anti-patterns, skill registry, session logs)
  • CLAUDE.md template with governance rules pre-configured

How it works

Hooks fire automatically         Meta-skills guide agent cognition
────────────────────────         ─────────────────────────────────
SessionStart → remind agent      /meta-anti-patterns → avoid past mistakes
PreToolUse   → check compliance  /meta-scope-guard   → stay within request
PostToolUse  → track edits       /meta-learn         → reflect after work
Stop         → enforce learning  /meta-commit        → learn + commit atomically

                    Memory persists across sessions
                    ───────────────────────────────
                    MEMORY.md      → skill registry, insights
                    ANTI_PATTERN.md → documented mistakes
                    session logs    → longitudinal patterns

The agent improves itself: /meta-learn captures lessons, /meta-self-audit discovers patterns across sessions, and /meta-evolve proposes governance improvements — all with human approval.

Install

pip install claude-self-improve

Quick start

cd your-project
claude-self-improve init
git add .claude/
git commit -m "feat: add AI agent governance framework"

# One-time setup per developer machine:
claude-self-improve link

What gets created

.claude/
├── CLAUDE.md                  # Agent conventions (customize for your project)
├── settings.json              # Hook configuration
├── hooks/                     # 4 governance enforcement scripts
│   ├── session-init.sh        # SessionStart: init tracker + reminder
│   ├── pre-edit-governance.sh # PreToolUse: anti-pattern reminder
│   ├── post-edit-tracker.sh   # PostToolUse: track edited files
│   └── stop-reflection-gate.sh# Stop: block if no learning reflection
├── commands/                  # 7 meta-skill slash commands
│   ├── meta-anti-patterns.md  # Review documented mistakes before edits
│   ├── meta-scope-guard.md    # Define and hold scope boundaries
│   ├── meta-learn.md          # Post-task reflection loop
│   ├── meta-commit.md         # Reflect + commit atomically
│   ├── meta-propose-skill.md  # Create/improve reusable skills
│   ├── meta-self-audit.md     # Discover patterns across sessions
│   └── meta-evolve.md         # Propose governance improvements
└── memory/                    # Persistent learning across sessions
    ├── MEMORY.md              # Skill registry + project insights
    ├── ANTI_PATTERN.md        # Documented error patterns
    ├── skill-candidates.md    # Patterns awaiting promotion
    ├── topic-index.md         # Index of detailed memory files
    └── sessions/              # Per-user session logs

Customization

After init, customize these files for your project:

  • .claude/CLAUDE.md — Add your project overview, directory structure, and conventions
  • .claude/memory/MEMORY.md — Will auto-populate as the agent learns your project
  • .claude/commands/ — Add domain-specific skills alongside the meta-skills (e.g., debug-build.md, deploy.md)

CLI reference

claude-self-improve init [--target DIR] [--force]
    Scaffold .claude/ governance framework.
    --target DIR   Target directory (default: current directory)
    --force        Overwrite existing .claude/ directory

claude-self-improve link [--target DIR]
    Create memory symlink for Claude Code's native memory system.
    --target DIR   Project directory containing .claude/ (default: current directory)

Requirements

  • Python >= 3.9
  • A git repository (recommended, not required)
  • Claude Code or compatible AI coding agent

License

MIT

Metadata

Release files for claude-self-improve 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for claude-self-improve 0.1.0
File Size Uploaded Provenance
claude_self_improve-0.1.0.tar.gz 24.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for claude-self-improve 0.1.0
File Interpreter ABI Platform
claude_self_improve-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 57.1 kB

Release files / claude_self_improve-0.1.0.tar.gz

Download URL claude_self_improve-0.1.0.tar.gz
Size 24.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8f82a3d11ba3a80c0fb0d539660c6ed8c8ae8f358d6eb21daef2a069f9dbaf71
BLAKE2b-256 checksum
How to use checksums
3ef2962ac886d4d202ed1db16467e2868bba647b50d50fffceb33490d37739ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 25, 2026.

Transparency log

Release files / claude_self_improve-0.1.0-py3-none-any.whl

Download URL claude_self_improve-0.1.0-py3-none-any.whl
Size 32.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55e8badc3dc3f718427710a82ca761403b5a50e648368da15a182a799c6eea27
BLAKE2b-256 checksum
How to use checksums
7c88e588f40a935139152101eb7b859b9b1d104e3be3e2fe8f984d639b3f5c97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 25, 2026.

Transparency log

Security for claude-self-improve 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for claude_self_improve-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page