xiaohongshu
xiaohongshu
agenthero-ai
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 creat...
Full skill instructions
Comprehensive orchestration utilities for managing hierarchical multi-agent systems with PM coordination, state management, and topic-based organization.
This skill provides Python-based utilities for:
Auto-activate when:
.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
scripts/topic_manager.py)Purpose: Manage topic lifecycle (V2.0 - uses topics.json)
Commands:
create_topic <title> - Initialize new topic in topics.jsonlist_active_topics - List non-completed topicslist_completed_topics - List completed topicsget_topic_status <slug> - Get topic progress and metricstouch_topic <slug> - Update last active timeupdate_topic_progress <slug> - Recalculate progress from tasksarchive_topic <slug> - Move topic to archive directoryresume_topic <slug> - Update last active and return statusget_active_topics_summary - Get summary for SessionStart hookcomplete_topic <slug> - Mark as completed and archivedelete_topic <slug> - Delete topic (use with caution)Usage Examples:
# 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
scripts/state_manager.py)Purpose: CRUD operations for state files (V2.0)
Commands:
create_state_file <path> <template> - Initialize state file from templateread_state <path> <field> - Read specific field from stateupdate_state <path> <field> <value> - Update state fieldappend_log <path> <level> <message> - Append log entryset_task_status <path> <status> - Update task statustrack_file_change <path> <file> <change_type> - Track file changeupdate_progress <path> <progress> - Update progress (0-100)validate_state <path> - Validate JSON structureset_blocking_question <path> <question> - Set blocking questionanswer_question <path> <answer> - Answer blocking questionset_task_result <path> <result> - Set task completion resultUsage Examples:
# Create new task state
python .claude/skills/agenthero-ai/scripts/state_manager.py \
create_state_file \
".claude/agents/state/agenthero-ai/topics/auth-system/task-001-backend.json" \
"task-state"
# Append log entry
python .claude/skills/agenthero-ai/scripts/state_manager.py \
append_log \
".claude/agents/state/agenthero-ai/topics/auth-system/task-001-backend.json" \
"info" \
"Starting database schema design"
# Read current status
python .claude/skills/agenthero-ai/scripts/state_manager.py \
read_state \
".claude/agents/state/agenthero-ai/topics/auth-system/task-001-backend.json" \
"status"
# Update progress
python .claude/skills/agenthero-ai/scripts/state_manager.py \
update_progress \
".claude/agents/state/agenthero-ai/topics/auth-system/task-001-backend.json" \
50
scripts/utils.py)Purpose: Shared helper functions
Functions:
find_project_root() - Find project root by locating .claude directoryslugify(text) - Convert text to URL-safe sluggenerate_task_id(topic_slug) - Generate unique task IDtimestamp_iso() - Get ISO 8601 timestamp with timezoneatomic_write(path, content) - Atomic file write (supports dict/list/str)ensure_directory(path) - Create directory if neededread_json_file(path) - Read and parse JSON fileread_json_field(path, field) - Read specific JSON fieldupdate_json_field(path, field, value) - Update JSON fieldappend_json_array(path, field, value) - Append to JSON arrayvalidate_json(path) - Validate JSON structureUsage (imported by other scripts):
from utils import (
find_project_root, slugify, timestamp_iso,
atomic_write, read_json_file
)
# Generate slug
slug = slugify("Add JWT Authentication")
# Returns: "add-jwt-authentication"
# Atomic write (prevents corruption)
atomic_write("state.json", {"status": "completed"})
# Find project root
project_root = find_project_root()
# Returns: Path to directory containing .claude/
scripts/setup_project_structure.py)Purpose: Create initial directory structure for topics
Usage:
# Create Project-tasks/{slug}/ structure
python .claude/skills/agenthero-ai/scripts/setup_project_structure.py \
"landing-page-builder"
# Creates:
# - Project-tasks/landing-page-builder/
# - Project-tasks/landing-page-builder/spec/
# - Project-tasks/landing-page-builder/deliverables/
scripts/finalize_topic.py)Purpose: Mark topic as completed and archive
Usage:
# Finalize topic (V2.0)
python .claude/skills/agenthero-ai/scripts/finalize_topic.py \
"landing-page-builder"
# Actions:
# 1. Marks status as "completed" in topics.json
# 2. Sets completedAt timestamp
# 3. Archives topic directory
scripts/check_topics_file.py)Purpose: Validate topics.json structure
Usage:
# Validate topics registry (V2.0)
python .claude/skills/agenthero-ai/scripts/check_topics_file.py --summary
# Returns summary of topics.json health
scripts/get_topics_quiet.sh)Purpose: Display active topics on Claude Code startup
Usage (configured in .claude/settings.local.json):
bash .claude/skills/agenthero-ai/scripts/get_topics_quiet.sh
# Output (if topics exist):
# Found 2 active topic(s):
# • Landing Page Builder (45% complete, 3/5 tasks)
# • API Integration (20% complete, 1/4 tasks)
# Output (if no topics):
# No pending topics - ready for new work!
Templates are stored in templates/state-templates.json:
{
"taskId": "",
"focusArea": "",
"agentName": "",
"status": "pending",
"assignedAt": "",
"startedAt": null,
"completedAt": null,
"progress": 0,
"currentOperation": null,
"logs": [],
"filesCreated": [],
"filesModified": [],
"blockingQuestion": null,
"result": null,
"error": null,
"tokenUsage": {
"total": 0,
"operations": []
}
}
The PM agent (agenthero-ai) uses these utilities for:
# PM creates new topic (V2.0)
python .claude/skills/agenthero-ai/scripts/topic_manager.py \
create_topic "User login feature" \
--description "Create login with validation"
# Returns: user-login-feature (slug)
# PM creates Project-tasks structure
python .claude/skills/agenthero-ai/scripts/setup_project_structure.py \
"user-login-feature"
# PM initializes sub-agent task
python .claude/skills/agenthero-ai/scripts/state_manager.py \
create_state_file \
".claude/agents/state/agenthero-ai/topics/login-feature/task-001-frontend.json" \
"task-state"
# PM reads task status
python .claude/skills/agenthero-ai/scripts/state_manager.py \
read_state \
".claude/agents/state/agenthero-ai/topics/login-feature/task-001-frontend.json" \
"status"
# PM finalizes topic (V2.0)
python .claude/skills/agenthero-ai/scripts/finalize_topic.py \
"login-feature"
Sub-agents use state_manager for logging and updates:
# Sub-agent logs progress
python .claude/skills/agenthero-ai/scripts/state_manager.py \
append_log \
"$STATE_FILE" \
"info" \
"Creating LoginForm component"
# Sub-agent updates progress
python .claude/skills/agenthero-ai/scripts/state_manager.py \
update_progress \
"$STATE_FILE" \
40
# Sub-agent tracks file changes
python .claude/skills/agenthero-ai/scripts/state_manager.py \
track_file_change \
"$STATE_FILE" \
"src/components/LoginForm.tsx" \
"created"
All scripts include error handling:
State operations are optimized:
State files may contain sensitive data:
.claude/agents/state/)Invalid JSON error:
# Validate state file
python .claude/skills/agenthero-ai/scripts/state_manager.py \
validate_state \
".claude/agents/state/agenthero-ai/topics/my-topic/task-001.json"
State file not found:
# Check topics registry
cat .claude/agents/state/agenthero-ai/topics.json | python -m json.tool
Wrong directory created:
# Ensure scripts run from project root OR
# Use absolute paths (scripts auto-detect project root via find_project_root())
Version: 2.0.0 Created: 2025-10-22 Updated: 2025-10-24 (Python migration complete)
Key Changes:
For issues:
python -m json.tool < file.jsoncheck_topics_file.py --summarySTATE-STRUCTURE-V2.mdPart of: Hierarchical Multi-Agent Orchestration System V2.0 Related: agenthero-ai agent, orchestrated-sub-agent-template
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience