Your AI team,
ready to work
HIVE is a Claude Code harness that gives your agents persistent memory, squad structure, and reusable skills — so every session starts with context instead of a blank slate.
HIVE is a folder structure and conventions layer that makes Claude Code behave like a team of specialists. No framework lock-in — just markdown files, Python scripts, and git.
Each squad has its own Claude persona, persistent memory (STATE.md), foundation docs, skills, and workers. When you open a squad folder, the right specialist loads automatically.
- 11 pre-built squads (Commercial, Dev, Marketing, CS, Infra, Finance, Product, Operations, Quality, Intelligence, Orchestrator)
- Persistent memory — L1/L2/L3 state per squad, survives sessions
- 5 automation hooks — session branches, knowledge lookup, state sync
- 50+ reusable skills — from issue management to multi-model AI reviews
- Deterministic workers — cron scripts that update squad state without LLM calls
- Multi-model via OpenRouter — second opinion, consensus, cost comparison
- Zero cloud dependency — runs fully local, git is the only sync layer
- Fork and adapt — rename personas, add squads, customize per company
Installation
Three steps. No package manager required.
-
1
Clone the repo
Replace
my-companywith your company name. Fork if you want to track upstream changes.macOS / LinuxWindowsgit clone https://github.com/felipeluissalgueiro/hive.git my-company cd my-company
git clone https://github.com/felipeluissalgueiro/hive.git my-company cd my-company
-
2
Open in Claude Code
Open the
my-company/folder in Claude Code (CLI, desktop, or IDE extension). Claude Code readsCLAUDE.mdand loads the Stamper orchestrator automatically.macOS / LinuxWindows# CLI claude # Or open my-company/ in Claude Code desktop app
# CLI claude # Or open my-company/ in Claude Code desktop app
-
3
Run setup
The setup skill (~5–10 min) asks about your company and configures each squad with relevant context.
/hive-setup # What it does: # · Asks company name, industry, stage # · Asks your working style and preferences # · Lets you pick which squads to activate # · Fills foundation docs with your context # · Writes everything to the right files
Quick Start
Open a squad and start working.
# Open a squad (loads persona + STATE + foundation) /open-squad commercial # Work with Victor (Head of Sales)... # Close the squad (updates STATE, propagates L1 to orchestrator) /close-squad commercial # See what's happening across all squads /status # Search past incidents before a sensitive operation python _core/lookup.py "deploy vercel"
Core workflow
| Command | What it does |
|---|---|
| /hive-setup | First-time company onboarding guided session |
| /open-squad <name> | Load squad context + STATE + foundation docs |
| /close-squad <name> | Update STATE + propagate L1 to orchestrator |
| /status | Aggregate L1 from all active squads |
| /log-incident | Record incident to hub + Obsidian |
| /log-session | Close session with structured notes |
Squads
11 pre-built specialist agents. Each squad has a persona, scope, memory, and skills.
When you open a squad folder, Claude Code loads both the root CLAUDE.md (Stamper) and the squad's CLAUDE.md (specialist). You get two personas in one session.
squads/<name>/CLAUDE.md to match your company culture. The persona name is only referenced inside the CLAUDE.md.
Memory System
Three-layer STATE.md — survives sessions, searchable, aggregatable.
Every squad maintains a memory/STATE.md with three layers. L1 is designed to be machine-readable for aggregation by /status.
# squads/commercial/memory/STATE.md
[L1]
Victor (Commercial) — 3 hot leads, 1 proposal pending review, pipeline $42k.
Last updated: 2026-06-02 14:30
[L2]
In progress:
- Proposal for Acme Corp — send by EOW
- Follow-up call with TechStartup scheduled Friday
- Updating ICP profile with Q2 learnings
[L3]
Backlog:
- Cold email sequence for segment B
- Competitor analysis for enterprise tier
Memory files per squad
| File | Purpose |
|---|---|
| STATE.md | Live operational state — L1 (now), L2 (in progress), L3 (backlog) |
| decisions.md | Architectural and operational decisions log, append-only |
| gotchas.md | Known pitfalls, lessons learned, non-obvious edge cases |
| MEMORY.md | Index of all saved memory files with one-line hooks |
Knowledge lookup
Before sensitive operations (deploy, DNS change, integration), search past incidents and sessions:
# Search across incidents + sessions + memory python _core/lookup.py "deploy vercel" # Filter by source python _core/lookup.py "ghl webhook" --source incidents python _core/lookup.py "auth" --source sessions --since 2026-01-01 # JSON output for scripts python _core/lookup.py "supabase" --json --top 5
Hooks
5 automation hooks handle session management, state sync, and safety checks.
| Hook | Trigger | What it does |
|---|---|---|
| PreToolUse — session branch | First file write in session | Creates session/YYYY-MM-DD-HHMM branch — no direct main commits |
| PostToolUse — state flag | After squad file modified | Marks STATE.md dirty — used by stop hook to decide what to commit |
| Stop — session merge | Session ends | Auto-commits on session branch, merges to main, cleans branch |
| UserPromptSubmit — routing | Every user message | Detects squad keywords, loads context if not already loaded |
| UserPromptSubmit — knowledge | Sensitive operation keywords | Runs lookup.py — surfaces past incidents before action |
| UserPromptSubmit — recovery | Session start | Detects unfinished previous session, recovers context |
.claude/hooks/. They are opt-in — disable any hook by removing its entry from .claude/settings.json. Never force-push to main; the stop hook depends on clean branch history.
Workers
Deterministic cron scripts that update squad state without AI in the loop.
Workers live in workers/ and run on a schedule via _core/harness.sh. They are pure Python — no LLM calls. They read data sources and write to STATE.md.
Design rules
- Deterministic — same input, same output. No side effects.
- Write only to STATE.md — never CLAUDE.md, skills, or foundation docs.
- Idempotent — safe to run multiple times.
- Fail loudly — log errors, don't swallow exceptions silently.
# _core/harness.sh — add workers here run_worker "workers/daily-revenue.py" "09:00" run_worker "workers/health-scores.py" "every:1h" run_worker "workers/competitor-scan.py" "every:24h"
Example workers
| Worker | Squad | Updates |
|---|---|---|
| daily-revenue.py | Finance | L1 with current MRR and variance vs. last month |
| health-scores.py | CS | L1 with churned, at-risk, healthy counts |
| competitor-scan.py | Intelligence | L2 with new competitor mentions and price changes |
| pipeline-summary.py | Commercial | L1 with pipeline value and hot lead count |
Global Skills
50+ reusable commands available to all squads. Invoke with /skill-name.
Foundation
| Skill | What it does |
|---|---|
| /hive-setup | Guided company onboarding — fills all squad context files |
| /open-squad | Load squad persona + STATE + foundation docs |
| /close-squad | Update STATE + propagate L1 to orchestrator memory |
| /status | Aggregate L1 from all active squads |
| /log-session | Structured session notes — decisions, gotchas, next steps |
| /log-incident | Record incident to hub with root cause and fix |
Dev workflow
| Skill | What it does |
|---|---|
| /create-issue | Create Linear issue with full description and acceptance criteria |
| /plan-issue | Break issue into technical plan before executing |
| /start-issue | Checkout branch + mark In Progress in Linear |
| /close-issue | Merge + mark Done in Linear + deploy validation |
| /codex-review | P1/P2/P3 code review via OpenAI Codex CLI |
| /debug | Structured debugging with Pólya problem-solving method |
OpenRouter Skills
Multi-model AI skills via OpenRouter — second opinion, consensus, cost comparison, ICP simulation.
HIVE ships 7 skills that query multiple AI models via OpenRouter. Useful for reducing model bias, validating decisions, and finding the cheapest model for recurring tasks.
Setup
- Get an API key at openrouter.ai
- Set
OPENROUTER_API_KEY=sk-or-...in your environment - Run the install script:
bash _core/mcp/install.sh
# macOS / Linux export OPENROUTER_API_KEY=sk-or-your-key-here bash _core/mcp/install.sh # Windows (PowerShell) $env:OPENROUTER_API_KEY = "sk-or-your-key-here" bash _core/mcp/install.sh
Available skills
| Skill | What it does | Use when |
|---|---|---|
| /second-opinion | Query 1 model, get raw response | Quick second take from Kimi, GPT-5.5, Grok |
| /consensus | N models in parallel, overlap/divergence synthesis | Avoid single-model bias on important decisions |
| /cost-compare | Same task across 3–6 models, real cost matrix | Before embedding a model in a recurring worker |
| /icp-check | 2–3 models simulate your ICP reading an asset | Validate copy, emails, landing pages before publishing |
| /anti-bubble | Neutral model reads asset with NO company context | Detect jargon and assumptions insiders can't see |
| /dod-check | Cheap model validates diff vs. acceptance criteria | Routine PR validation before human review |
| /code-review-model | P1/P2/P3 code review via any model | Second opinion on code reviews, security scan |
Supported models (aliases)
| Alias | Model | Best for |
|---|---|---|
| kimi | Kimi K2.6 | Coding, top open-weight |
| gpt5.5 | GPT-5.5 | Reasoning, flagship |
| grok | Grok 4.20 | 2M context, low cost |
| gemini-pro | Gemini (latest) | Multimodal, long context |
| dsflash | DeepSeek Flash | Near-free, 1M context |
| qwenflash | Qwen Flash | Fast, cheap, 1M context |
Customization
HIVE is designed to be forked. Rename personas, add squads, extend skills.