[ /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.
3. Run `npx @codehabits/cli mcp-install` to wire the Codehabits MCP server into this project (`.cursor/mcp.json`).
4. Read every file under the `.codehabits/` directory at the repo root - those are the team's authoritative conventions, anti-patterns, domain knowledge, and reviewer expertise. Treat them as ground truth.
5. From now on:
- When you write code, follow `.codehabits/conventions.json` and avoid `.codehabits/anti-patterns.json`.
- 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 you should avoid 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 PR discussions: auth, billing, deployment, schema decisions, runbooks.
Given a set of changed files, return the contributors with the deepest expertise scored by historical commits and reviews.
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 .codehabits/* via Agent Skills - no extra configCodehabits writes a Copilot instructions stub during enable.
[ 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 PR history and writes .codehabits/.
The MCP server. 6 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.