Prorise-cool/Claude-Code-Multi-Agent
Claude-Code-Multi-Agent驱动的新一代AI编程助手生态系统,基于Claude Code构建的智能代理协调工作空间,实现从需求到交付的全流程自动化开发
Claude Code Multi‑Agent – A project‑aware development assistant for Claude Code
What it is – An open‑source framework that turns Anthropic’s Claude Code from a generic chat assistant into a “project‑aware” AI developer. It does this with a Hooks system that runs automatically at key moments in a Claude Code session (session start, user prompt, tool use, etc.). The hooks call a locally‑run Ollama model (e.g., gemma3:1b) to detect the type of the codebase, analyse user intent, and recommend or invoke one of the many built‑in Skills (expert agents such as backend‑specialist, testing‑specialist, security‑specialist, …). The framework also enforces automatic documentation (DEVELOPMENT.md, KNOWLEDGE.md, CHANGELOG.md) and integrates with Git workflows.
Core concepts
| Concept | Role |
|---|---|
| Hooks | Small Python scripts that run on specific events (SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, etc.). They talk to Ollama, manage docs, load Skills, and can block or allow actions via an exit_code. |
| Ollama | The local LLM engine that powers project‑type detection, intent analysis and skill recommendation. No external API calls are required. |
| Skills | Self‑contained “expert agents” defined by a SKILL.md file (YAML front‑matter + markdown). Each Skill represents a domain (backend, frontend, testing, security, …) and can be invoked with a slash command like /backend‑specialist …. |
| Commands | Pre‑defined multi‑step workflows (e.g., /kiro/spec, /agent‑workflow, /gh/commit) that automate spec creation, full‑agent execution, or git commit generation. |
| Auto‑doc system | Forces updates to three core markdown files so that project knowledge stays in sync with the code. |
What you get out of the box
- 300 + Skills covering backend, frontend, testing, security, architecture, DevOps, etc.
- Zero‑config start – clone the repo, drop your project folder inside, set a couple of env vars, and Claude Code will automatically load the appropriate Skills and create the documentation files.
- Local‑only LLM – Ollama runs on your machine; the framework never sends code to the cloud.
- Git workflow assistance – detects the repository, suggests a branching model (GitHub Flow, Git‑Flow) and can generate commit messages.
- Intent‑driven tool selection – the system decides whether a simple “Write” tool is enough or whether a more complex “Sequential Thinking” workflow is needed.
Quick‑start (≈5 min)
- Install prerequisites
# Ollama (Windows/macOS/Linux) winget install Ollama.Ollama # Windows brew install ollama # macOS curl -fsSL https://ollama.com/install.sh | sh # Linux # Pull a lightweight model ollama pull gemma3:1b # or a larger one like llama3.2:3b # Install uv (fast Python package manager) curl -LsSf https://astral.sh/uv/install.sh | sh # macOS/Linux powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" # Windows - Clone and set up
git clone https://github.com/Prorise-cool/Claude-Code-Multi-Agent.git cd Claude-Code-Multi-Agent cp .env.example .env # optional – defaults already work - Add your code – copy an existing project or create a tiny test project inside the repo (e.g.,
test-project/main.py). - Open Claude Code (desktop app or VS Code extension) and open the repository folder.
- Verify – type anything in Claude’s chat. You should see messages like:
项目类型: Python已加载 50 个 Skills已创建 DEVELOPMENT.md / KNOWLEDGE.md / CHANGELOG.md
If those appear, the framework is active.
Typical workflow examples
| Situation | How to use the framework |
|---|---|
| You need a RESTful API design | Type /backend-specialist 设计用户认证的 RESTful API. Claude will answer as a backend expert, showing resource naming, HTTP methods, status codes, etc. |
| You have a complex feature request | Write the request in natural language (e.g., “实现用户登录功能”). The UserPromptSubmit hook analyses intent, suggests tools (Sequential Thinking) and relevant Skills (backend‑specialist, security‑specialist), and returns a step‑by‑step plan. |
| You changed code | After editing a file, the PostToolUse hook forces an update prompt for DEVELOPMENT.md, KNOWLEDGE.md, and CHANGELOG.md, keeping documentation in sync. |
| You want a full spec | Run /kiro/spec 用户认证功能. The command walks you through requirements (EARS format), architecture, data model, and creates a spec folder under .kiro/specs/. |
| Commit with a good message | Run /gh/commit. The command analyses staged changes, asks Ollama to generate a concise commit message, and runs git commit. |
Extending the system
- Add a new Skill – create a folder under
.claude/skills/with aSKILL.mdfile (YAML front‑matter + markdown). The framework will auto‑discover it on the next session start. - Create a custom Hook – place a Python script in
.claude/hooks/handlers/and reference it in.claude/settings.jsonunder the appropriate event. - Edit prompts – all system prompts live in
.claude/hooks/prompts.json. You can tweak wording, add variables ({type},{framework}), and the changes take effect immediately.
Project layout (high‑level)
claude-code-multi-agent/
├─ .claude/
│ ├─ hooks/ # Hook core, handlers, config
│ ├─ commands/ # Multi‑step workflows
│ └─ skills/ # Expert agents (backend‑specialist, …)
├─ project_document/ # Auto‑maintained docs (DEVELOPMENT.md, …)
├─ .env.example # Sample env vars (OLLAMA_MODEL, TTS settings)
├─ pyproject.toml # uv dependency file
└─ README.md # (this file)
Who might use this?
- Individual developers who want Claude Code to “understand” their repository without writing long prompts.
- Small teams looking for a reproducible, version‑controlled AI‑assistant that stays on‑premise.
- Educators / trainers who want to showcase AI‑augmented development workflows with a self‑hosted LLM.
License & contribution
- License: MIT (see badge in README).
- Contributions: welcomed via pull requests. The repo includes a
CONTRIBUTINGstyle guide, a test command (uv run pytest), and a development entry point (uv run python -m claude_hooks.dev).
Bottom line
Claude Code Multi‑Agent is a real, runnable framework that adds project awareness, skill‑based expert agents, and enforced documentation to Claude Code, all powered by a local Ollama model and managed through a clean Python Hook architecture. It lets you start using an AI‑enhanced development environment with virtually no manual configuration.
Related
- Project
- Project
- Dispatch
- Project
- Project