[ integrations / cursor ]
Team intelligence inside Cursor
Cursor rules drift. Codehabits extracts how your team actually ships from GitHub PR history and delivers it to Cursor through Agent Skills and MCP — so every agent session starts with the same ground truth.
How it works
- 01
Learn from the repo
Run codehabits enable. It builds a day-1 baseline from code, docs, and git — then deepens with PR review history when available.
- 02
Deliver as Skills + AGENTS.md
Generated skills land under .cursor/skills (and shared .agents/.claude paths). AGENTS.md gets a bounded Team Intelligence section Cursor already reads.
- 03
Query live via MCP
Install @codehabits/mcp into .cursor/mcp.json. Agents call get_team_context, check_code, get_repo_map, and more instead of guessing.
Setup
Step 1
Enable Codehabits in the repo
Authenticates with GitHub and writes .codehabits/ plus skills.
npx @codehabits/cli enableStep 2
Install the MCP server for Cursor
Writes .cursor/mcp.json (add --global for ~/.cursor/mcp.json).
npx @codehabits/cli mcp-installStep 3
Restart Cursor / reload MCP
Confirm the codehabits server is connected, then ask the agent to follow team conventions from .codehabits/.
What you get
- .codehabits/ conventions, anti-patterns, knowledge, reviewers, map
- Agent Skills under .cursor/skills and shared skill trees
- AGENTS.md Team Intelligence section
- MCP tools for live convention checks and repo map queries
Docs & guides
FAQ
- Does Codehabits replace .cursor/rules?
- It complements them. Hand-written rules still work for local preferences; Codehabits adds evidence-backed team conventions from PRs and keeps them in sync across the team.
- Do I need PR history on day one?
- No. Enable works with zero PRs using a codebase baseline. PR history deepens conventions, anti-patterns, and reviewer expertise over time.
- Is MCP required?
- No. Skills and AGENTS.md work without MCP. MCP adds live tools (check_code, get_repo_map, record_feedback) that agents can call mid-session.