---
name: agenthero-ai
description: AgentHero AI - Hierarchical multi-agent orchestration system with PM coordination, file-based state management, and interactive menu interface. Use when managing complex multi-agent workflows, coordinating parallel sub-agents, or organizing large project tasks with multiple specialists. All created agents use aghero- prefix.
version: 2.0.0
---
# AgentHero AI Skill (V2.0)
Comprehensive orchestration utilities for managing hierarchical multi-agent systems with PM coordination, state management, and topic-based organization.
## Overview
This skill provides Python-based utilities for:
- **State Management**: Create, read, update state files for orchestration (V2.0)
- **Topic Lifecycle**: Initialize, resume, archive project topics
- **Task Coordination**: Manage sub-agent tasks and dependencies
- **Token Tracking**: Monitor and report token usage across agents
- **SessionStart Hook**: Display active topics on Claude Code startup
## When Claude Should Use This Skill
Auto-activate when:
- PM orchestrator needs to manage state files
- Creating or updating topic metadata
- Initializing sub-agent task states
- Archiving completed topics
- Reading orchestration state for resume
## Directory Structure (V2.0)
```
.claude/
├── agents/
│ ├── agenthero-ai/ # PM agent
│ │ ├── agent.md
│ │ └── orchestrated-sub-agent-template.md
│ └── state/ # Runtime state
│ └── agenthero-ai/ # V2.0 namespace
│ ├── topics.json # ✅ Single source of truth
│ ├── topics/ # Topic directories
│ │ └── {topic-slug}/
│ │ ├── task-{id}-{name}.json
│ │ └── messages.json
│ └── archive/ # Completed topics
│
└── skills/
└── agenthero-ai/
├── skill.md # This file
├── scripts/ # Python utilities (V2.0)
│ ├── topic_manager.py # Topic lifecycle
│ ├── state_manager.py # State CRUD operations
│ ├── utils.py # Shared utilities
│ ├── setup_project_structure.py # Directory setup
│ ├── finalize_topic.py # Topic completion
│ ├── check_topics_file.py # Validation
│ └── get_topics_quiet.sh # SessionStart hook
└── templates/
└── state-templates.json # State file schemas
```
## Python Utilities (V2.0)
### 1. Topic Manager (`scripts/topic_manager.py`)
**Purpose**: Manage topic lifecycle (V2.0 - uses topics.json)
**Commands**:
- `create_topic
` - Initialize new topic in topics.json
- `list_active_topics` - List non-completed topics
- `list_completed_topics` - List completed topics
- `get_topic_status ` - Get topic progress and metrics
- `touch_topic ` - Update last active time
- `update_topic_progress ` - Recalculate progress from tasks
- `archive_topic ` - Move topic to archive directory
- `resume_topic ` - Update last active and return status
- `get_active_topics_summary` - Get summary for SessionStart hook
- `complete_topic ` - Mark as completed and archive
- `delete_topic ` - Delete topic (use with caution)
**Usage Examples**:
```bash
# Create new topic (V2.0)
python .claude/skills/agenthero-ai/scripts/topic_manager.py \
create_topic \
"Add JWT authentication" \
--description "Implement JWT-based auth with tokens and middleware"
# List active topics
python .claude/skills/agenthero-ai/scripts/topic_manager.py \
list_active_topics
# Get topic status (reads from topics.json)
python .claude/skills/agenthero-ai/scripts/topic_manager.py \
get_topic_status \
"auth-system-jwt"
# Archive completed topic
python .claude/skills/agenthero-ai/scripts/topic_manager.py \
archive_topic \
"auth-system-jwt"
# Get active topics summary (SessionStart hook)
python .claude/skills/agenthero-ai/scripts/topic_manager.py \
get_active_topics_summary
```
### 2. State Manager (`scripts/state_manager.py`)
**Purpose**: CRUD operations for state files (V2.0)
**Commands**:
- `create_state_file ` - Initialize state file from template
- `read_state ` - Read specific field from state
- `update_state ` - Update state field
- `append_log ` - Append log entry
- `set_task_status ` - Update task status
- `track_file_change ` - Track file change
- `update_progress