agentcraft

Visualize coding sessions as a real-time strategy game with automatic deploy and event reporting.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "agentcraft" with this command: npx skills add idosal/agentcraft

AgentCraft Event Reporting

AgentCraft visualizes your coding sessions as an RTS game. Follow these steps to ensure AgentCraft is running and to report your activity.

1. Check if AgentCraft is Running

curl -sf http://localhost:2468/health

If this returns JSON with "status":"ok", skip to step 3.

2. Deploy if Needed

If the health check fails (server not running), start it in the background:

npx -y @idosal/agentcraft start --no-browser -d

Wait a few seconds, then verify:

curl -sf http://localhost:2468/health

If it still fails, proceed with your task without reporting — silently ignore all AgentCraft errors.

3. Generate a Session ID

Use a deterministic ID based on your workspace path:

AGENTCRAFT_SESSION="openclaw_$(echo -n "$PWD" | md5sum | head -c 12)"

On macOS (if md5sum is unavailable):

AGENTCRAFT_SESSION="openclaw_$(echo -n "$PWD" | md5 | head -c 12)"

Use this same AGENTCRAFT_SESSION for all events in this session.

4. Report Events

POST events to http://localhost:2468/event at these moments. Use curl — fire-and-forget, do not block on the response.

Starting work (hero_active)

When you begin processing a user prompt:

curl -sf -X POST http://localhost:2468/event \
  -H "Content-Type: application/json" \
  -d "{\"type\":\"hero_active\",\"sessionId\":\"$AGENTCRAFT_SESSION\",\"client\":\"openclaw\",\"cwd\":\"$PWD\"}" &>/dev/null &

Mission start (mission_start)

Immediately after hero_active, report the mission with the user's prompt:

curl -sf -X POST http://localhost:2468/event \
  -H "Content-Type: application/json" \
  -d "{\"type\":\"mission_start\",\"sessionId\":\"$AGENTCRAFT_SESSION\",\"client\":\"openclaw\",\"missionId\":\"mission_$(date +%s)\",\"name\":\"<first 50 chars of prompt>\",\"prompt\":\"<full user prompt>\",\"cwd\":\"$PWD\"}" &>/dev/null &

File access (file_access)

When you read, write, or edit a file:

curl -sf -X POST http://localhost:2468/event \
  -H "Content-Type: application/json" \
  -d "{\"type\":\"file_access\",\"sessionId\":\"$AGENTCRAFT_SESSION\",\"client\":\"openclaw\",\"filePath\":\"<absolute-file-path>\",\"operation\":\"read\",\"linesAdded\":0,\"linesRemoved\":0,\"cwd\":\"$PWD\"}" &>/dev/null &

Set operation to "read", "write", or "edit". For edits, set linesAdded and linesRemoved to actual counts.

Shell commands (bash_command)

When you execute a shell command:

curl -sf -X POST http://localhost:2468/event \
  -H "Content-Type: application/json" \
  -d "{\"type\":\"bash_command\",\"sessionId\":\"$AGENTCRAFT_SESSION\",\"client\":\"openclaw\",\"command\":\"<command, max 200 chars>\",\"cwd\":\"$PWD\"}" &>/dev/null &

Done / idle (hero_idle)

When you finish processing and are waiting for the next prompt:

curl -sf -X POST http://localhost:2468/event \
  -H "Content-Type: application/json" \
  -d "{\"type\":\"hero_idle\",\"sessionId\":\"$AGENTCRAFT_SESSION\",\"client\":\"openclaw\"}" &>/dev/null &

Rules

  • Use curl to POST — fire-and-forget (&>/dev/null &), do not block on the response.
  • Always set client to "openclaw".
  • Use the same AGENTCRAFT_SESSION value for all events in a session.
  • Set cwd to the current working directory.
  • Do not report the same action more than once.
  • If the AgentCraft server is not reachable, silently ignore errors — do not retry or log failures.

Inviting Other Agents

Other OpenClaw agents can join your AgentCraft dashboard without installing this skill.

Quick join (same machine)

Share these curl commands with other agents. They only need to generate their own session ID and POST events:

# Generate a unique session ID (use md5 instead of md5sum on macOS)
AGENTCRAFT_SESSION="openclaw_$(echo -n "$PWD" | md5sum | head -c 12)"

# Report active
curl -sf -X POST http://localhost:2468/event \
  -H "Content-Type: application/json" \
  -d "{\"type\":\"hero_active\",\"sessionId\":\"$AGENTCRAFT_SESSION\",\"client\":\"openclaw\",\"cwd\":\"$PWD\"}" &>/dev/null &

# Report idle when done
curl -sf -X POST http://localhost:2468/event \
  -H "Content-Type: application/json" \
  -d "{\"type\":\"hero_idle\",\"sessionId\":\"$AGENTCRAFT_SESSION\",\"client\":\"openclaw\"}" &>/dev/null &

Share with remote agents

To let agents on other machines join:

  1. Expose your AgentCraft server:
cloudflared tunnel --url http://127.0.0.1:2468
  1. Share the resulting https://xxx.trycloudflare.com URL.

  2. Remote agents replace localhost:2468 with that URL in all event curl commands.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

aiq-assessment

AIQ(AI商数)评估工具。基于"三层18原子能力"框架,对个人或团队的AI协作效能进行 结构化评估。包含提示素养、算法共情、判断锐度三大维度,覆盖18个可量化的原子能力。 适用于自我诊断、招聘评估、团队AI成熟度审计等场景。触发词:AIQ、AI商数、AI能力评估、 AI协作效能、会不会用AI、AI Native...

Registry SourceRecently Updated
General

Reptile Pet Health Diagnosis Tool | 爬行类宠物健康诊断分析工具

Analyzes uploaded reptile or arachnid videos to identify scale, skin, and body issues, then generates a detailed health diagnosis report.

Registry SourceRecently Updated
General

Whop Digital Sales

Auto-create and manage digital products on Whop.com. Manages product lifecycle from creation to checkout link generation. Uses Whop REST API v1 with Company...

Registry SourceRecently Updated
General

ClawCap

Spending cap proxy for OpenClaw. Enforce hard daily and monthly limits across all your AI models (Claude, GPT, Gemini, and more) under one cap. Stop runaway...

Registry SourceRecently Updated