By crisnahine
Code that blends in. Auto-derives codebase conventions and injects archetype-aware guidance for AI-generated code.
Use when the user explicitly invokes /chameleon-auto-idiom to auto-derive high-quality team idioms from repo evidence, or accepts the offer after /chameleon-init or /chameleon-refresh when idioms.md has no active idioms
Use when the user explicitly invokes /chameleon-disable to suppress chameleon's advisory injections for the rest of the current session
Use when the user explicitly invokes /chameleon-doctor to get a triage report on their chameleon installation health
Use when the user explicitly invokes /chameleon-explain to drill down on one enforcement rule (its calibration, would-block frequency, inline-override rate) OR to replay what chameleon knew and did the last time a file was edited (post-incident gap analysis)
Use when the user explicitly invokes /chameleon-init to bootstrap a chameleon profile for the current repository (TypeScript or Ruby on Rails)
Admin access level
Server config contains admin-level keywords
Executes bash commands
Hook triggers when Bash tool is used
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Modifies files
Hook triggers on file write and edit operations
Modifies files
Hook triggers on file write and edit operations
"Code that blends in."
chameleon learns your repo's actual conventions and injects archetype-aware guidance per-edit, so AI-generated code matches your existing style on the first try. Supports TypeScript and Ruby on Rails.
Before you start, you need uv and Node.js 20+ on your PATH. Ruby 3.0+ is also needed if you edit Rails repos. On a fresh machine, docs/install.md has copy-paste setup for macOS, Linux, and Windows, plus a check for each tool. Skip ahead if you already have them.
1. Install the plugin. In any Claude Code session:
/plugin marketplace add crisnahine/chameleon
/plugin install chameleon@chameleon
Restart Claude Code. Confirm it loaded by asking "What chameleon tools do you have?"
2. Profile a repo. Open a TypeScript or Ruby on Rails repo, then:
/chameleon-init # build a profile (3-10s for repos under 5k files)
/chameleon-trust # approve it for your user
After that, every Edit/Write in that repo gets archetype-aware context automatically.
AI-generated code in established codebases routinely violates local conventions: wrong file location, off-pattern naming, missed team idioms, divergent error handling. Reviewer time gets spent on style and shape instead of logic and security.
chameleon clusters your actual code patterns (AST + statistical analysis), captures team-specific idioms (/chameleon-teach), and injects archetype-keyed guidance per-edit so the model writes code that fits.
Bootstrap. /chameleon-init locks the repo's production branch (auto-detected from the origin default branch; you're asked only when the signal is ambiguous), materializes that branch's tree from local git objects, runs an AST scan over it, clusters files into archetypes by a 7-tuple signature, picks a canonical example per archetype, and writes .chameleon/profile.json — committed to git, team-shared. The profile reflects the production line no matter which feature branch you happen to have checked out.
Trust. /chameleon-trust is a per-user, per-repo approval gate. Same mental model as git config --get user.signingkey: the profile lives in the repo, the trust grant lives on your machine.
Per-edit context. Before every Edit/Write/NotebookEdit, the PreToolUse hook calls the chameleon MCP server, which returns the matched archetype's canonical excerpt, rules, and idioms. The hook injects <chameleon-context> into the model's context.
Teach. /chameleon-teach captures idioms an AST can't infer — banned imports, mandatory wrappers, custom HTTP clients, internal conventions. Persisted to .chameleon/idioms.md and surfaced through the trust gate so reviewers see them before granting trust.
Drift detection. Per-edit confidence is tracked in ~/.local/share/chameleon/<repo_id>/drift.db. When the profile no longer matches reality — or the locked production branch's tip moves past the commit the profile was derived from — /chameleon-status escalates and recommends /chameleon-refresh.
Because the skills trigger automatically, you don't need to do anything special after install. Edits in a trusted, profiled repo just blend in.
The Quickstart above has the two commands for Claude Code. For the full guide - per-OS prerequisite setup (macOS, Linux, Windows), verification, updating, uninstall, and troubleshooting - see docs/install.md.
/chameleon-init — bootstrap a profile. Runs the AST scan, clusters files into archetypes, selects canonical examples, writes .chameleon/profile.json. Commit the result.
/chameleon-trust — review and approve the committed profile for your user. Asks you to type the repo's basename to confirm. Trust state lives at ~/.local/share/chameleon/<repo_id>/.trust.
Edit normally. The PreToolUse hook looks up the target file's archetype, fetches the canonical excerpt + rules + active idioms, and injects them as <chameleon-context> before the edit lands. The model references the canonical example and writes code that fits.
/chameleon-teach — capture missed patterns as team idioms. Persists to .chameleon/idioms.md and survives /chameleon-refresh.
/chameleon-status — check profile state, drift score, and plugin health. High drift recommends /chameleon-refresh to re-cluster against the current code.
npx claudepluginhub crisnahine/chameleon --plugin chameleonMemory compression system for Claude Code - persist context across sessions
Ultra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Standalone image generation plugin using Nano Banana MCP server. Generates and edits images, icons, diagrams, patterns, and visual assets via Gemini image models. No Gemini CLI dependency required.
Multi-model consensus engine integrating OpenAI Codex CLI, Gemini CLI, and Claude CLI for collaborative code review and problem-solving.
Streamline people operations — recruiting, onboarding, performance reviews, compensation analysis, and policy guidance. Maintain compliance and keep your team running smoothly.
Write feature specs, plan roadmaps, and synthesize user research faster. Keep stakeholders updated and stay ahead of the competitive landscape.