Help us improve
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
By getklaim
Automatically observes coding sessions to generate rules, suggestions, skills, and hooks that make Claude smarter about your codebase over time
npx claudepluginhub getklaim/claude-auto-context --plugin claude-auto-contextFocused refactoring executor for cac-apply suggestions. Reads suggestion's structured Changes, applies one step at a time, verifies syntax after each change, commits per logical group. Do NOT use for: architecture decisions, code review, planning, or any task beyond executing the provided suggestion changes.
Independent QA agent for cac-apply refactoring verification. Checks acceptance criteria with fresh evidence, runs tests, validates no regressions. Issues PASS/FAIL verdict. Do NOT use for: writing code, making changes, architecture decisions, or any task beyond verifying the executor's work.
Review and apply structural suggestions from Auto Context. USE WHEN user types /cac-apply or mentions applying suggestions.
Create SKILL.md files from auto-detected workflow prompts. USE WHEN user types /cac-create-skill or wants to generate a skill from detected patterns.
**CRITICAL**: You may only CREATE or MODIFY files in `.claude/rules/local/`.
Detect structural issues and create proposal files in .claude-auto-context/suggestions/. USE WHEN file splits, directory reorganization, or pattern unification is needed.
Extract conventions and implicit knowledge from session data into .claude/rules/local/ files. USE WHEN repeated patterns are found across sessions.
Executes bash commands
Hook triggers when Bash tool is used
Modifies files
Hook triggers on file write and edit operations
Share bugs, ideas, or general feedback.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Self-evolving Claude Code system that learns from corrections, manages context, and improves every session
Persistent context for AI coding assistants
Analyze Claude Code agent session transcripts to identify inefficiencies, anti-patterns, repeated mistakes, missing tooling opportunities, and user frustration signals for continuous improvement
MCP context & instinct engine — learned rules from sessions with confidence scoring. Provides tool-aware context injection and 6 MCP tools.
Self-improving Claude Code plugin — learns from corrections across sessions via reflexio
Commands for loading context and priming Claude for specific tasks
Uses power tools
Uses Bash, Write, or Edit tools
Uses power tools
Uses Bash, Write, or Edit tools
Share bugs, ideas, or general feedback.
Auto-Context is a Claude Code plugin that makes your project smarter over time. Instead of manually maintaining CLAUDE.md, it observes your coding sessions, extracts patterns, detects conventions, and progressively improves your project's context — so Claude gets better at navigating and understanding your codebase with every session.
Think of it as "organizational scar tissue" — but automated.
It starts the moment you open a Claude Code session. Tool calls (Edit, Write, Bash, NotebookEdit) and user prompts get silently captured and stored in a local SQLite database. Payloads are compressed at ingestion — only metadata (file paths, commands) is kept, not full file contents.
When enough events accumulate (100+), a background worker launches. It analyzes the events across sessions, delegates to specialized sub-agents via the Claude Agent SDK, and produces:
.claude/rules/local/*.md) are auto-generated from repeated conventions and user corrections. Claude loads them automatically when touching matching files..claude/skills/*/SKILL.md) are extracted from repeated multi-step workflows — reusable slash commands..claude/hooks/*.sh) are generated when repetitive manual actions are detected (lint, format, test).Nothing structural changes without your say-so. You run /cac-apply, review the evidence, and decide.
Add the marketplace:
/plugin marketplace add getklaim/claude-auto-context
Install the plugin:
/plugin install claude-auto-context@claude-auto-context-marketplace
Or open the interactive plugin manager with /plugin, navigate to the Marketplaces tab to add the marketplace, then switch to Discover to install.
/plugin marketplace add https://github.com/getklaim/claude-auto-context.git
Start a new Claude Code session. The setup hook will auto-install Bun (if missing) and create .claude/rules/local/. The background worker launches automatically when enough events accumulate — no manual setup needed.
/plugin update claude-auto-context@claude-auto-context-marketplace
Once installed, hooks fire automatically across six lifecycle events:
| Event | What happens |
|---|---|
| SessionStart | Outputs dashboard stats (rules count, pending suggestions, DB size) into session context |
| Setup | Installs Bun if missing, creates .claude/rules/local/, runs auto-cleanup |
| UserPromptSubmit | Captures user prompt → SQLite (uncompressed, to preserve intent), checks for pending suggestions |
| PreToolUse | Version sync on commit, blocks conflict markers and planning files from staging |
| PostToolUse | Captures Edit|Write|Bash|NotebookEdit events → SQLite (compressed), syntax checks on edited files |
| Stop | Launches background worker if 100+ pending events |
All hooks execute in under 100ms. You never notice them.
| Command | Purpose |
|---|---|
/cac-apply | Review and apply a specific structural suggestion |
/create-suggestion | Manually create a structural suggestion with evidence |
/extract-rules | Manually extract convention rules from current session |
/context-hygiene | Run a context quality audit (duplicates, contradictions, stale refs) |
/cac-create-skill | Create a SKILL.md from a detected workflow pattern |
/run-worker | Manually trigger the background worker |
Auto-generated (no approval needed):
.claude/rules/local/
error-handling.md ← "Use Result type, not try-catch" (globs: src/**/*.ts)
api-patterns.md ← "All endpoints return ApiResponse<T>" (globs: src/api/**)
Rules files are scoped by glob pattern via frontmatter. Claude loads them automatically when it touches matching files — no CLAUDE.md bloat. Rules auto-decay: revalidated after 30 days, force-deleted after 60 days of no validation.
Suggestions (requires your approval):
.claude-auto-context/suggestions/
001-split-utils.md ← "src/utils.ts has 4% signal ratio → split into date.ts, string.ts"
002-unify-route-patterns.md ← "routes/ uses 3 different patterns → standardize"
Each suggestion includes the problem, proposed fix, and evidence from specific sessions.