[ /agents ]

Make your agent Codehabits-aware in one prompt.

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.

One-shot setup prompt
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.
works withCursorClaude CodeCodexWindsurfGemini CLICopilot

[ what your agent gains ]

Six tools your agent can call

The Codehabits MCP server exposes everything an agent needs to be team-aware. Tool names are stable; agents discover them via standard MCP introspection.

get_team_context

Read team intelligence

Pull the team's conventions, anti-patterns, domain knowledge, and reviewer expertise in one call. Use before writing or reviewing.

check_code

Validate a code snippet

Pass any snippet and get back violations against team conventions and anti-patterns, with suggestions for each.

get_knowledge

Look up domain knowledge

Query topic-specific knowledge captured from PR discussions: auth, billing, deployment, schema decisions, runbooks.

suggest_reviewers

Pick the right reviewers

Given a set of changed files, return the contributors with the deepest expertise scored by historical commits and reviews.

record_feedback

Capture disagreements

When the user (or you) overrides a convention, propose the change. Lands in .codehabits/proposals.json (gitignored) for review.

approve_proposal

Promote proposals

Merge an approved proposal into conventions.json and regenerate the Agent Skills markdown. Creates tracked git changes.

[ wire up the mcp server ]

One config. Every agent.

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.

Universal MCP config· json
{
  "mcpServers": {
    "codehabits": {
      "command": "npx",
      "args": ["-y", "@codehabits/mcp"]
    }
  }
}
C
Cursor
.cursor/mcp.json
npx @codehabits/cli mcp-install

Per-project. Add --global for ~/.cursor/mcp.json.

A
Claude Code
~/.claude/mcp.json
claude mcp add codehabits npx -y @codehabits/mcp

Built-in MCP CLI. Restart Claude Code to pick it up.

X
Codex CLI
~/.codex/mcp.json
Drop the universal config into ~/.codex/mcp.json

Codex reads MCP servers at startup; restart after editing.

W
Windsurf
~/.codeium/windsurf/mcp_config.json
Drop the universal config into ~/.codeium/windsurf/mcp_config.json

Reload Windsurf settings or restart to activate.

G
Gemini CLI
~/.gemini/settings.json
Drop the universal config into ~/.gemini/settings.json

Place under the mcpServers key alongside other servers.

H
GitHub Copilot
.github/copilot-instructions.md
Reads .codehabits/* via Agent Skills - no extra config

Codehabits writes a Copilot instructions stub during enable.

[ machine-readable resources ]

Built for agents to crawl

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.

First, give your agent a repo to learn from.

The bootstrap prompt above assumes a Codehabits-enabled repo. If this is your first time, run enable yourself once - then any agent can pick it up automatically.