harmonist-agent-orchestration
```markdown
What this skill does
```markdown
---
name: harmonist-agent-orchestration
description: Skill for using Harmonist — portable AI agent orchestration with mechanical protocol enforcement, 186 curated specialists, and zero runtime dependencies.
triggers:
- set up harmonist in my project
- add multi-agent orchestration with harmonist
- how do I use harmonist agents
- configure harmonist for my codebase
- install harmonist agent framework
- harmonist protocol enforcement setup
- add AI agent specialists to my project
- orchestrate agents with harmonist
---
# Harmonist Agent Orchestration
> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
Harmonist is a portable multi-agent orchestration framework for AI coding assistants (Cursor, Claude Code, Copilot, Windsurf, Aider, and others). Its defining property: **protocol enforcement is a mechanical gate**, not a prompt suggestion. IDE-level hooks block a turn from completing if required reviewers didn't run, memory wasn't updated, or supply-chain checks failed. It ships 186 curated domain-specialist agents across 16 categories, uses pure Python stdlib with zero third-party dependencies, and runs on macOS, Linux, WSL, and native Windows.
---
## Installation
### Option 1 — Cursor Agent Mode (recommended)
```bash
cd your-project/
git clone https://github.com/GammaLabTechnologies/harmonist.git
# Open project in Cursor → Agent mode
# Paste contents of harmonist/integration-prompt.md
# Follow the AI walkthrough; start a NEW chat when done.
```
### Option 2 — CLI Integration
```bash
cd your-project/
git clone https://github.com/GammaLabTechnologies/harmonist.git
python3 harmonist/agents/scripts/integrate.py --pack harmonist --project .
```
### Option 3 — Manual
Follow `harmonist/GUIDE_EN.md` step by step.
**Requirements:**
- Python 3.9+ (no third-party packages)
- Bash 3.2+ (macOS/Linux/WSL) or pure-Python `hook_runner.py` (native Windows)
- Git
- An AI coding assistant that supports subagent dispatch
---
## What Happens During Integration
The AI assistant:
1. Reads `harmonist/agents/index.json` (186 agents, routing table).
2. Asks which roles are active: `engineering / design / product / marketing / sales / support / finance / testing / academic`.
3. Selects matching specialists and writes a project-specific `AGENTS.md`.
4. Bootstraps `.cursor/memory/` with session tracking scaffolding.
5. Installs enforcement hooks in `.cursor/hooks/`.
6. Records state in `.cursor/pack-version.json`.
---
## Project Structure
```
harmonist/
├── agents/
│ ├── index.json # 186-agent routing table (category × role × tags)
│ ├── scripts/
│ │ ├── integrate.py # CLI integration entry point
│ │ ├── upgrade.py # SHA-verified upgrade with supply-chain guard
│ │ ├── install_extras.py # On-demand specialist install (also SHA-verified)
│ │ └── memory.py # Schema-validated memory write path
│ └── <category>/
│ └── <agent-slug>.md # Individual agent definition files
├── .cursor/
│ ├── hooks/ # Mechanical enforcement hooks
│ │ ├── stop # Gate: checks reviewers, memory, supply chain
│ │ └── hook_runner.py # Pure-Python Windows fallback
│ └── memory/ # Structured session memory store
├── MANIFEST.sha256 # Supply-chain hashes for every shipped file
├── AGENTS.md # Orchestrator: protocol, invariants, routing
├── integration-prompt.md # Paste-to-integrate prompt for AI assistants
└── GUIDE_EN.md # Manual integration guide
```
---
## Key Scripts & CLI Commands
### `memory.py` — Schema-Validated Memory
The **only** supported write path for agent memory. Validates against `memory/SCHEMA.md`, rejects duplicates, scans for ~30 secret patterns.
```bash
# Append a memory entry (from inside a hook or agent script)
python3 harmonist/agents/scripts/memory.py append \
--type decision \
--session-id "$SESSION_ID" \
--task-seq 3 \
--body "Chose postgres over sqlite for concurrent write safety."
# Read the active correlation ID (LLM reads this; never writes it)
python3 harmonist/agents/scripts/memory.py get-correlation-id
# List recent entries
python3 harmonist/agents/scripts/memory.py list --last 10
```
Memory entry types: `state`, `decision`, `pattern`, `incident`.
Correlation IDs are generated by hooks as `<session_id>-<task_seq>` where `session_id = <unix-seconds><pid4>`. The LLM **reads** but never **writes** the ID.
### `upgrade.py` — Supply-Chain-Safe Upgrade
```bash
# Upgrade Harmonist files with SHA verification before any copy
python3 harmonist/agents/scripts/upgrade.py \
--pack harmonist \
--project .
# A tampered agent file (hash mismatch vs MANIFEST.sha256) is REFUSED
# and never written into the project.
```
### `install_extras.py` — On-Demand Specialist Install
```bash
# Install an additional specialist agent (SHA-verified)
python3 harmonist/agents/scripts/install_extras.py \
--agent blockchain-security-auditor \
--project .
```
### `integrate.py` — CLI Integration
```bash
python3 harmonist/agents/scripts/integrate.py \
--pack harmonist \
--project /path/to/your-project \
--roles engineering,testing,security
```
---
## Agent Catalogue — 186 Specialists
Agents are selected by `domains × roles × tags` from `agents/index.json`.
### Categories
| Category | Example Agents |
|---|---|
| Orchestration | `scout`, `repo-map` |
| Review | `qa-verifier`, `security-reviewer`, `strict-reviewer` |
| Engineering | `backend-engineer`, `frontend-engineer`, `devops-engineer` |
| Blockchain | `blockchain-security-auditor`, `zk-steward` |
| Mobile/XR | `visionos-spatial-engineer`, `ios-engineer`, `android-engineer` |
| China Market | `wechat-mini-program-developer`, `xiaohongshu-specialist` |
| PHP/Web | `laravel-livewire-specialist` |
| Game | `roblox-systems-scripter` |
| Marketing (30+) | `seo-specialist`, `douyin-specialist`, `content-strategist` |
| Finance | `finance-analyst`, `revenue-modeler` |
| Sales | `sales-engineer`, `crm-specialist` |
| Product | `product-manager`, `ux-researcher` |
| Support | `support-engineer`, `documentation-writer` |
| Academic | `research-analyst`, `paper-reviewer` |
### Querying `agents/index.json`
```python
import json
from pathlib import Path
index = json.loads(Path("harmonist/agents/index.json").read_text())
# Find all agents tagged 'security'
security_agents = [
a for a in index["agents"]
if "security" in a.get("tags", [])
]
# Find agents for a specific domain
blockchain_agents = [
a for a in index["agents"]
if a.get("category") == "blockchain"
]
# Get agent by slug
def get_agent(slug: str) -> dict:
return next((a for a in index["agents"] if a["slug"] == slug), None)
agent = get_agent("blockchain-security-auditor")
print(agent["description"])
```
---
## Mechanical Protocol Enforcement
### How the `stop` Hook Works
Located at `.cursor/hooks/stop`, this hook runs after every code-changing turn:
1. Parses subagent dispatch markers from the session transcript.
2. Checks whether `qa-verifier` was dispatched.
3. Checks whether all required reviewers ran.
4. Checks whether `session-handoff.md` was updated.
5. Verifies supply-chain hashes for any modified agent files.
If **any check fails**, it returns a `followup_message` and **blocks turn completion**. `loop_limit: 3` caps retries; on exhaustion, an incident is recorded in memory and surfaced next session.
### Windows — Pure-Python Fallback
```bash
# On native Windows, hook_runner.py replaces the .sh hooks
python3 harmonist/agents/scripts/hook_runner.py --event stop --session-id "$SESSION_ID"
```
Both paths are tested against identical scenarios in CI (430+ assertions).
---
## Memory System
### Schema
Every entry must satisfy `memory/SCHEMA.md`. Fields:
```yaml
correlation_id: "<session_id>-<task_seq>" # written by hook, never by LLM
type: state | decision | pattern | incident
timestampRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.