artifacts/bundle/skills/engineering/agenthub/SKILL.md
# AgentHub — Multi-Agent Collaboration Spawn N parallel AI agents that compete on the same task. Each agent works in an isolated git worktree. The coordinator evaluates results and merges the winner. ## Slash Commands | Command | Description | | ------------- | --------------------------------------------------------------------- | | `/hub:init` | Create a new collaboration session — task, agent count, eval criteria | | `/hub:s
npx skillsauth add neekware/ehayeskills artifacts/bundle/skills/engineering/agenthubInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Spawn N parallel AI agents that compete on the same task. Each agent works in an isolated git worktree. The coordinator evaluates results and merges the winner.
| Command | Description |
| ------------- | --------------------------------------------------------------------- |
| /hub:init | Create a new collaboration session — task, agent count, eval criteria |
| /hub:spawn | Launch N parallel subagents in isolated worktrees |
| /hub:status | Show DAG state, agent progress, branch status |
| /hub:eval | Rank agent results by metric or LLM judge |
| /hub:merge | Merge winning branch, archive losers |
| /hub:board | Read/write the agent message board |
| /hub:run | One-shot lifecycle: init → baseline → spawn → eval → merge |
When spawning with --template, agents follow a predefined iteration pattern:
| Template | Pattern | Use Case |
| ------------- | ---------------------------------------- | -------------------------- |
| optimizer | Edit → eval → keep/discard → repeat x10 | Performance, latency, size |
| refactorer | Restructure → test → iterate until green | Code quality, tech debt |
| test-writer | Write tests → measure coverage → repeat | Test coverage gaps |
| bug-fixer | Reproduce → diagnose → fix → verify | Bug fix approaches |
Templates are defined in references/agent-templates.md.
Trigger phrases:
The main Claude Code session is the coordinator. It follows this lifecycle:
INIT → DISPATCH → MONITOR → EVALUATE → MERGE
Run /hub:init to create a session. This generates:
.agenthub/sessions/{session-id}/config.yaml — task config.agenthub/sessions/{session-id}/state.json — state machine.agenthub/board/ — message board channelsRun /hub:spawn to launch agents. For each agent 1..N:
.agenthub/board/dispatch/isolation: "worktree"Run /hub:status to check progress:
dag_analyzer.py --status --session {id} shows branch stateprogress/ channel has agent updatesRun /hub:eval to rank results:
Run /hub:merge to finalize:
git merge --no-ff winner into base branchgit tag hub/archive/{session}/agent-{i}Each subagent receives this prompt pattern:
You are agent-{i} in hub session {session-id}.
Your task: {task description}
Instructions:
1. Read your assignment at .agenthub/board/dispatch/{seq}-agent-{i}.md
2. Work in your worktree — make changes, run tests, iterate
3. Commit all changes with descriptive messages
4. Write your result summary to .agenthub/board/results/agent-{i}-result.md
5. Exit when done
Agents do NOT see each other's work. They do NOT communicate with each other. They only write to the board for the coordinator to read.
hub/{session-id}/agent-{N}/attempt-{M}
YYYYMMDD-HHMMSS)Frontier = branch tips with no child branches. Equivalent to AgentHub's "leaves" query.
python scripts/dag_analyzer.py --frontier --session {id}
The DAG is append-only:
Location: .agenthub/board/
| Channel | Writer | Reader | Purpose |
| ----------- | -------------------- | ----------- | ----------------------------- |
| dispatch/ | Coordinator | Agents | Task assignments |
| progress/ | Agents | Coordinator | Status updates |
| results/ | Agents + Coordinator | All | Final results + merge summary |
---
author: agent-1
timestamp: 2026-03-17T14:30:22Z
channel: results
parent: null
---
## Result Summary
- **Approach**: Replaced O(n²) sort with hash map
- **Files changed**: 3
- **Metric**: 142ms (baseline: 180ms, delta: -38ms)
- **Confidence**: High — all tests pass
{seq:03d}-{author}-{timestamp}.mdBest for: benchmarks, test pass rates, file sizes, response times.
python scripts/result_ranker.py --session {id} \
--eval-cmd "pytest bench.py --json" \
--metric p50_ms --direction lower
The ranker runs the eval command in each agent's worktree directory and parses the metric from stdout.
Best for: code quality, readability, architecture decisions.
The coordinator reads each agent's diff (git diff base...agent-branch) and ranks by:
Run metric first. If top agents are within 10% of each other, use LLM judge to break ties.
init → running → evaluating → merged
→ archived (if no winner)
State transitions managed by session_manager.py:
| From | To | Trigger |
| ------------ | ------------ | ---------------------- |
| init | running | /hub:spawn completes |
| running | evaluating | All agents return |
| evaluating | merged | /hub:merge completes |
| evaluating | archived | No winner / all failed |
The coordinator should act when:
| Signal | Action |
| ---------------------------- | -------------------------------------------------------------- |
| All agents crashed | Post failure summary, suggest retry with different constraints |
| No improvement over baseline | Archive session, suggest different approaches |
| Orphan worktrees detected | Run session_manager.py --cleanup {id} |
| Session stuck in running | Check board for progress, consider timeout |
# Copy to your Claude Code skills directory
cp -r engineering/agenthub ~/.claude/skills/agenthub
# Or install via ClawHub
clawhub install agenthub
| Script | Purpose |
| -------------------- | --------------------------------------------- |
| hub_init.py | Initialize .agenthub/ structure and session |
| dag_analyzer.py | Frontier detection, DAG graph, branch status |
| board_manager.py | Message board CRUD (channels, posts, threads) |
| result_ranker.py | Rank agents by metric or diff quality |
| session_manager.py | Session state machine and cleanup |
Creator: Alireza Rezvani License: MIT Source Repo:
neekware/ehaye-skillsSource Bucket:engineeringOriginal Path:engineering/agenthub
tools
# ehAye Multimedia Use this skill for **video, audio, images, media conversion, previews, transcription, thumbnails, frame extraction, Spotter visual search, or FFmpeg-backed processing**. Core rule: use ehAye native media tools first. Do not reach first for shell `ffmpeg`, `ffprobe`, Python, or `mediainfo` when a native media tool can do the job. Native tools use bundled engines, show proper tool UI, respect cancellation/timeouts, integrate with Preview/Spotter, and avoid cross-platform shell
development
Test-driven development skill for writing unit tests, generating test fixtures and mocks, analyzing coverage gaps, and guiding red-green-refactor workflows across Jest, Pytest, JUnit, Vitest, and Mocha. Use when the user asks to write tests, improve test coverage, practice TDD, generate mocks or stubs, or mentions testing frameworks like Jest, pytest, or JUnit. Handles test generation from source code, coverage report parsing (LCOV/JSON/XML), quality scoring, and framework conversion for TypeScript, JavaScript, Python, and Java projects.
tools
Help a user set up Telegram for ehAye Dojo. Default to Personal private bots (recommended). Group setup is advanced for teams/observers/demos.
development
# Writing Skills ## Overview **Writing skills IS Test-Driven Development applied to process documentation.** **Personal skills live in agent-specific directories (`~/.claude/skills` for Claude Code, `~/.agents/skills/` for Codex)** You write test cases (pressure scenarios with subagents), watch them fail (baseline behavior), write the skill (documentation), watch tests pass (agents comply), and refactor (close loopholes). **Core principle:** If you didn't watch an agent fail without the ski