---
title: Claude Code
description: Install GitKB workflows, project rules, hooks, and MCP configuration for Claude Code.
---

# GitKB with Claude Code

GitKB's Claude Code integration installs project guidance, reusable skills, session hooks, and a local MCP server entry.

## Scaffold the integration

After [initializing your KB](/docs/getting-started/quick-start/), preview the generated files:

```bash
git-kb init claude --dry-run
git-kb init claude
```

The scaffold installs these files at the KB root:

```text
.kb/
├── skills/                 # Canonical GitKB workflow skills
└── rules/                  # Canonical project rules
.claude/
├── skills/                 # Links to .kb/skills/<name>
├── rules/                  # Links to .kb/rules/<name>.md
└── settings.json           # SessionStart and PreToolUse hooks
.mcp.json                   # gitkb server: git-kb mcp
CLAUDE.md                   # GitKB section pointing to .kb/AGENTS.md
```

The MCP server lives in the root `.mcp.json`. `.claude/settings.json` contains hooks: a session hook starts the daemon if needed, and a tool hook supplies code-intelligence guidance for supported tool calls.

The installer merges the MCP configuration and `CLAUDE.md` section with existing content. Existing workflow templates are kept unless you request an update with `--force`. Review the dry run before replacing customized templates:

```bash
git-kb init claude --force --dry-run
```

## Workflows and rules

The generated rules cover code intelligence, refactoring safety, and knowledge management. Skills include `gitkb`, `code-intelligence`, `explore`, `understand`, `refactor-safety`, `remote-sync`, and task workflows such as `kb-start`, `kb-review`, and `kb-close`.

The canonical skills are under `.kb/skills/`; the Claude entries point to them. See [Agent Harnesses & Skills](/docs/reference/agent-harnesses/) for the full inventory.

## Use the integration

Start Claude Code in the project and enable the GitKB MCP server when prompted. Ask for a concrete read to check the connection:

> "Use GitKB to show the task board and read the project context."

For code work:

> "Find the callers of authenticate, then show the impact of changing src/auth.ts."

For a task:

> "Read tasks/auth-refactor, implement its acceptance criteria, and record the verification results in the task."

The instructions guide the workflow. Check the resulting source, command output, and task evidence before treating the work as complete.

## Next steps

- [MCP Setup](/docs/getting-started/mcp-setup/) — Manual server configuration and connection checks
- [Codex](/docs/getting-started/codex/) — Codex integration
- [Agent Workflows](/docs/guides/agent-workflows/) — Context, assignment, and committed evidence
- [CLI Reference](/docs/cli-reference/) — `init` options
