Automatically analyzes your codebase to learn conventions, then guides AI-generated code to follow team idioms, architectural patterns, and best practices — keeping auto-generated code in sync with evolving standards.
README
"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.
/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