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:

OutputPurpose
.codehabits/*.jsonStructured conventions, anti-patterns, knowledge, reviewers, map
.claude/skills/codehabits-team-intel/SKILL.mdDefault Agent Skill (Claude Code; Cursor-compatible)
.agents/skills/codehabits-team-intel/SKILL.mdDefault Agent Skill (VS Code Copilot & cross-client)
AGENTS.mdFallback 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

Tools first load skill metadata (name + description), then pull full instructions only when relevant. This keeps context windows efficient while ensuring team conventions are available when needed.

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.

Terminal
git add .codehabits/ .claude/skills/ .agents/skills/ AGENTS.md
git commit -m "chore: add codehabits team intelligence"
git push

Check .gitignore

If your .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.