[ /agents ]
Codehabits ships an MCP server, Agent Skills, and a machine-readable docs bundle so every coding agent - Cursor, Claude Code, Codex, Windsurf, Gemini CLI, GitHub Copilot - can pick up your team's conventions in seconds. Paste this prompt into your agent and it sets itself up.
You are setting up Codehabits for this repository.
1. Read https://codehabits.dev/llms.txt to learn what Codehabits is.
2. Run `npx @codehabits/cli enable` in this repo. It will open a browser for GitHub OAuth. Works with zero PR history (day-1 baseline from codebase, docs, stack, and git).
3. Run `npx @codehabits/cli mcp-install` to wire the Codehabits MCP server into this project (`.cursor/mcp.json`).
4. Read files under `.codehabits/` (including `map.json` if present) - those are the team's authoritative conventions, anti-patterns, domain knowledge, reviewer expertise, and heuristic repo map. Treat them as ground truth.
5. From now on:
- When you write code, follow `.codehabits/conventions.json` and avoid `.codehabits/anti-patterns.json`.
- Before exploring broadly, query `get_repo_map` or `get_change_routes` instead of dumping the whole tree into context.
- When you need domain context, query the `get_knowledge` MCP tool first.
- When you disagree with a convention, use the `record_feedback` MCP tool instead of silently ignoring it.
- When suggesting reviewers for a change, use `suggest_reviewers`.
Report back: which files exist under `.codehabits/`, the top 5 conventions you found, and 1 anti-pattern (or baseline note) you should respect in this repo.[ what your agent gains ]
The Codehabits MCP server exposes everything an agent needs to be team-aware. Tool names are stable; agents discover them via standard MCP introspection.
Pull the team's conventions, anti-patterns, domain knowledge, and reviewer expertise in one call. Use before writing or reviewing.
Pass any snippet and get back violations against team conventions and anti-patterns, with suggestions for each.
Query topic-specific knowledge captured from docs and PR discussions: auth, billing, deployment, schema decisions, runbooks.
Given a set of changed files, return the contributors with the deepest expertise scored by history and reviews.
Query the heuristic map (packages, entrypoints, subsystems, hot files) instead of exploring the whole tree into context.
Given a path or prefix, return directories and files that often change together from git co-change heuristics.
When the user (or you) overrides a convention, propose the change. Lands in .codehabits/proposals.json (gitignored) for review.
Merge an approved proposal into conventions.json and regenerate the Agent Skills markdown. Creates tracked git changes.
[ wire up the mcp server ]
The Codehabits MCP server speaks standard MCP. The same JSON works in every agent that supports the protocol. Drop it into the right file and restart.
{
"mcpServers": {
"codehabits": {
"command": "npx",
"args": ["-y", "@codehabits/mcp"]
}
}
}npx @codehabits/cli mcp-installPer-project. Add --global for ~/.cursor/mcp.json.
claude mcp add codehabits npx -y @codehabits/mcpBuilt-in MCP CLI. Restart Claude Code to pick it up.
Drop the universal config into ~/.codex/mcp.jsonCodex reads MCP servers at startup; restart after editing.
Drop the universal config into ~/.codeium/windsurf/mcp_config.jsonReload Windsurf settings or restart to activate.
Drop the universal config into ~/.gemini/settings.jsonPlace under the mcpServers key alongside other servers.
Reads .agents/skills/ and AGENTS.md - no extra configDiscovers team intelligence via .agents/skills/ (default) and AGENTS.md. Optional MCP for active checks.
[ machine-readable resources ]
Codehabits ships an llms.txt index and a bundled full-docs file so any agent can ingest the entire product surface area without HTML parsing.
Short, machine-readable index for any LLM to discover Codehabits.
Full bundled docs - CLI, MCP, file schema, agent setup - in one markdown file.
The CLI that extracts intelligence from your codebase and PR history and writes .codehabits/.
Official MCP Registry: io.github.codehabits-dev/codehabits-mcp. Eight tools, zero config beyond pointing your agent at it.
Open source monorepo. CLI, MCP server, web app, schemas.
The open standard Codehabits builds on. Agent-tool agnostic.