Agent Skills

How Codehabits generates Agent Skills from 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 PR history 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
.cursor/skills/codehabits-team-intel/SKILL.mdAgent Skill consumed by Cursor and compatible tools
AGENTS.mdFallback instructions for agents that read AGENTS.md

How tools discover skills

Compatible tools scan skill directories at startup. Cursor reads .cursor/skills/, .agents/skills/, and related paths. 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 and get_knowledge that agents call on demand. Most teams start with skills alone; add MCP when you want real-time validation.

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/ .cursor/skills/ AGENTS.md
git commit -m "chore: add codehabits team intelligence"
git push

Check .gitignore

If your .gitignore excludes .cursor/ or .codehabits/, remove those entries. 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.