Agent Skills
How Codehabits generates Agent Skills from your codebase and PR history and how compatible AI tools auto-discover team intelligence in your repository.
Agent Skills are an open standard (agentskills.io) for packaging team-specific instructions. Codehabits generates a codehabits-team-intel skill from your codebase and PR history (day-1 baseline works with zero PRs) so Cursor, Copilot, Claude Code, and other compatible tools auto-discover your conventions without manual rule-writing.
What gets generated
When you run codehabits enable, Codehabits writes intelligence to your repo in two layers:
| Output | Purpose |
|---|---|
| .codehabits/*.json | Structured conventions, anti-patterns, knowledge, reviewers, map |
| .claude/skills/codehabits-team-intel/SKILL.md | Default Agent Skill (Claude Code; Cursor-compatible) |
| .agents/skills/codehabits-team-intel/SKILL.md | Default Agent Skill (VS Code Copilot & cross-client) |
| AGENTS.md | Fallback instructions for agents that read AGENTS.md |
| .cursor/skills/… (optional) | Legacy Cursor-only path — enable via emit_targets |
How tools discover skills
Compatible tools scan skill directories at startup. By default Codehabits writes to .claude/skills/ and .agents/skills/. Cursor also understands those paths (and optional .cursor/skills/). When a task matches the skill description, the agent loads the full instructions into context.
ℹProgressive disclosure
Skills vs MCP
Agent Skills provide passive context: conventions loaded when the agent decides they apply. The MCP server adds active tools like check_code, get_repo_map, and get_knowledge that agents call on demand. Most teams start with skills alone; add MCP when you want real-time validation or structural navigation.
Committing skills to git
Skills and .codehabits/ files are designed to be committed. Teammates clone the repo and their AI tools pick up the same intelligence automatically.
git add .codehabits/ .claude/skills/ .agents/skills/ AGENTS.md
git commit -m "chore: add codehabits team intelligence"
git push⚠Check .gitignore
.gitignore excludes .claude/, .agents/, or .codehabits/, remove those entries (or force-add the skill paths). These files contain no secrets — only extracted patterns.Updating skills after new PRs
Run npx @codehabits/cli sync manually or set up CI auto-sync so merged PRs refresh conventions and regenerate the skill.