Community程式設計與開發github.com

grahama1970/agent-inbox

基於檔案的代理間訊息傳遞系統,支援無頭調度。檢查收件匣、將錯誤/請求傳送給其他專案、自動生成無頭代理來修復錯誤,並透過 task-monitor 追蹤進度。

agent-inbox 是什麼?

Agent Inbox 是一個基於檔案的代理間訊息傳遞系統,專為 AI 代理(如 Claude Code、Cursor 等)設計,讓不同專案的代理能非同步協作。其核心工作流程包含:傳送訊息(指定模型與驗證指令)、AI 分類嚴重性與路由、自動生成無頭代理執行修復、透過 task-monitor 即時追蹤進度(0% 到 100%)、執行驗證測試後自動確認,並支援多則對話的訊息串接。此技能支援多種平台,透過儲存在 `~/.agent-inbox/` 的檔案結構進行狀態管理,並提供完整指令集:註冊/管理專案、傳送與讀取訊息、更新狀態、AI 分類(triage)、以及網鉤整合。代理可在工作階段開始或切換專案時主動檢查收件匣,實現跨專案的協作自動化。

相容平台✓Claude Code✓Codex CLI~Cursor✓Antigravity
npx skills add https://github.com/grahama1970/agent-skills/tree/main/skills/agent-inbox

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

停止。在呼叫任何端點之前,請先完整閱讀此 SKILL.MD。

Agent Inbox

基於檔案的代理間訊息傳遞系統,包含無頭調度與 task-monitor 整合。

核心工作流程

  1. 傳送:代理 A 將錯誤/請求傳送給專案 B,並指定模型與驗證指令
  2. 分類:AI 分類嚴重性,調整優先級與模型,並路由到對應專案
  3. 調度:以指定模型生成無頭代理來修復問題
  4. 追蹤:Task-monitor 顯示即時進度(0% → 25% → 50% → 75% → 100%)
  5. 驗證:自動確認前執行測試指令 – 失敗則迴圈回代理
  6. 串接:支援回覆/交換串接,實現多則對話

設定

# 註冊專案(一次性)
.pi/skills/agent-inbox/agent-inbox register memory /home/user/workspace/memory
.pi/skills/agent-inbox/agent-inbox register scillm /home/user/workspace/litellm

# 列出 / 檢查
.pi/skills/agent-inbox/agent-inbox projects
.pi/skills/agent-inbox/agent-inbox whoami

指令

指令說明
register <name> <path>註冊一個專案
unregister <name>移除一個專案
projects [--json]列出已註冊的專案
whoami顯示目前工作目錄對應的專案
send --to PROJECT --type TYPE "msg"傳送訊息(類型:bug, request, info, question)
check [--project P] [--all] [--quiet]檢查收件匣
list [--project P] [--status S] [--json]列出訊息
read MSG_ID [--json]讀取一則訊息
ack MSG_ID [--note "..."]確認/完成
reply MSG_ID "msg"回覆(自動建立串接)
thread THREAD_ID檢視完整交換串接
update-status MSG_ID STATUS [--note]手動更新狀態
triage classify --message "..." [--no-llm]手動分類
triage route --message "..."根據檔案路徑自動路由
triage log --msg-id ID檢視分類決策記錄
triage webhook-add --url URL --events E註冊網鉤

傳送選項

選項說明預設值
--model MODELAI 模型:sonnet, opus-4.5, codex-5.2, codex-5.2-highsonnet
--timeout MINUTES最大代理工作時間30
--test COMMAND自動確認前執行的驗證指令無
--no-dispatch停用自動生成False
--context-file FILE附加檔案作為上下文(可重複)無
--priority PRIORITYlow, normal, high, criticalnormal
--no-triage跳過 AI 分類False
--dry-run顯示訊息 JSON 但不傳送False

模型選擇

模型使用情境
sonnet簡單修復、拼寫錯誤
opus-4.5複雜分析、架構設計
codex-5.2標準錯誤修復
codex-5.2-high深度推理、競賽條件

AI 分類

訊息會自動依嚴重性分類:

  • critical:當機、資料遺失、安全性問題、生產環境故障 → opus-4.5
  • high:錯誤、例外、失敗、損壞、回歸 → opus-4.5
  • medium:錯誤、問題、不正確、非預期行為 → sonnet
  • low:拼寫錯誤、美化、增強、微小問題 → sonnet

自動路由會從訊息中提取檔案路徑,並比對已註冊的專案。

狀態進展

pending → dispatched(25%) → in_progress(50%) → needs_verification(75%) → done(100%)

記憶預鉤

調度器在生成代理前會查詢 /memory,尋找相似的錯誤與先前的解決方案。

主動檢查

代理應在工作階段開始時、切換專案時、執行重大工作前,以及使用者提到其他代理或專案時檢查收件匣。

儲存

~/.agent-inbox/
├── pending/          # 未處理的訊息
├── done/             # 已確認的訊息
├── logs/             # 調度記錄
├── task_states/      # Task-monitor 狀態檔案
├── triage_logs/      # AI 分類決策記錄
├── webhooks.json     # 已註冊的網鉤
└── projects.json     # 專案註冊表

範例

# 傳送錯誤並附帶驗證(生成無頭 Opus 代理,測試通過後自動確認)
python inbox.py send --to scillm --type bug --model opus-4.5 \
  --test "pytest tests/test_providers.py -x" \
  "提供者初始化中的競賽條件"

# 附加上下文檔案
python inbox.py send --to scillm --type bug --model opus-4.5 \
  --context-file src/server.py --context-file /tmp/traceback.txt \
  "伺服器啟動時當機"

# 檢查並處理收件匣
python inbox.py check --all
python inbox.py read scillm_abc123
python inbox.py ack scillm_abc123 --note "已在 commit abc123 中修復"

# 串接交換
python inbox.py reply scillm_abc123 "可以提供堆疊追蹤嗎?"
python inbox.py thread scillm_abc123

調度器守護行程

python dispatcher.py start              # 背景執行
python dispatcher.py start --foreground  # 除錯模式
python dispatcher.py status
python dispatcher.py stop

環境變數

變數說明預設值
AGENT_INBOX_DIR收件匣目錄~/.agent-inbox
TASK_MONITOR_API_URLTask-monitor URLhttp://localhost:8765
CLAUDE_PROJECT目前專案名稱自動偵測

與 Claude Code 鉤子整合

{
  "hooks": {
    "on_session_start": [
      ".pi/skills/agent-inbox/agent-inbox check --project $(basename $PWD) || true"
    ]
  }
}

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

grahama1970/acceptance-contract

Turn a client brief, zip bundle, directory, or single requirements file into a typed acceptance-contract bundle with extracted requirements, acceptance checks, open questions, an immutable-goal draft, and a create-report-backed decision report. Use when users say acceptance contract, brief to requirements, freeze the goal, create immutable goal, amend immutable goal, build a Battle requirements bundle, or extract requirements from this bundle.

grahama1970/agent-ecosystem

Canonical map and shared contracts for the agent-governance ecosystem: the pi.receipt_envelope.v1 boundary envelope, the component graph, and the rules for which component owns which schema. Use when wiring a skill or extension into the shared receipt world, when asking how shame, triage-error, tau, ask, project-watchdog, ops-herdr, ponytail, and Memory fit together, or when validating an envelope.

grahama1970/agentic-evals

Agentic evaluation of skills using multi-trial fixtures, deterministic command assertions, trajectory checks, safety constraints, and evidence-backed readiness scoring. Use when users ask for agentic evals, multi-trial skill evaluation, skill trajectory validation, or readiness scoring for a skill workflow.

grahama1970/agents-registry

Generate and query the centralized agent identity registry. Scans .pi/agents/*/AGENTS.md, parses frontmatter, outputs agents-registry.json and optionally syncs to /memory for semantic search.

grahama1970/agent-status

Artifact-driven status surfaces for long-running project-agent work. Maintains status.json, events.jsonl, proof manifests, and a stale-aware STATUS.html so humans can tell where the agent is, what passed, what is still unproven, and what decision or action is next — without dashboard theater.

grahama1970/align

Round-based context alignment before execution. Use when the human, project agent, WebGPT, scillm, ask, dogpile, memory, or project-knowledge may each hold different facts about a task; especially before ambiguous design, infographic, product workflow, high-stakes implementation, plan-iterate, project-infographic, or multi-review work.

grahama1970/analytics

Flexible data science analytics for any dataset. Auto-discovers schema, recommends charts, exports to create-figure. Works with JSONL, JSON, CSV from any source.

grahama1970/analyze-chatterbox-emotions

Evaluate generated Chatterbox voice files as voice-quality artifacts: affect match, arousal/valence proxies, pause placement, intelligibility inputs, clipping, loudness, and discontinuity flags. Use when reviewing Chatterbox emotional tags, pauses, Turbo/base affect delivery, Persona Dream utterance renders, or whether generated speech matches an intended product-facing affect.

grahama1970/analyze-elf

Reverse-engineer features from ELF binaries. Extracts CLI commands, state machines, protocols, Zod schemas, and data models. Automatically generates a /create-walkthrough prosecution brief with Mermaid diagrams. Uses /treesitter for AST analysis of bundled JS/TS source.

grahama1970/animation-vocabulary

Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.

grahama1970/anonymize-data

Anonymize supported CSV, JSON, UTF-8 text, and SQLite files using an explicit policy through the oai-trial project. Use for anonymize data, pseudonymize exports, redact policy literals, or discover and explicitly approve fuzzy name aliases. The skill is a thin CLI/Docker interface, not another engine.

grahama1970/anvil

Heavy-duty "No-Vibes" debugging and hardening orchestrator. Use this for complex, stubborn bugs where `review-code` has failed, or for "Red Teaming" (hardening) a codebase. Runs multiple agents in parallel (Thunderdome) using git worktree isolation.

grahama1970/apple-design

Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.

grahama1970/argue

Multi-persona structured debate orchestrator. Personas research via /dogpile, consult colleagues via /ask, and argue toward nuanced synthesis on complex questions.

grahama1970/arxiv

Search arXiv for papers and extract knowledge into memory. Use `search` to find papers, `learn` to extract knowledge.

grahama1970/ask

Use when the user asks to query project memory, ask an oracle, use supported browser-backed reviewers, run Tau roundtable/single-handler workflows, ask Pi-native subagents from within Pi, run persona/deep-review workflows, generate image prompts, check OS/project health through composed skills, or run an ask DAG. This skill is the executable /ask runtime; do not replace it with an informal subagent, plain web search, or hand-written review; inside Pi, explicit Pi-native subagent targets are routed through the pi-subagents tool as an Ask target type.

grahama1970/assess

Step back and critically reassess project state. Use when asked to "assess", "step back", "fresh eyes", "check alignment", "sanity check", "health check", "prune documentation", or "evaluate what's working". Offers documentation pruning and doc-code alignment analysis. Offer to run after major changes (don't auto-run).

grahama1970/assistant

Shared GPT + classifier inference gateway for persona monitor tasks. Routes validation and classification through a 4-tier cascade: heuristic → classifier → local GPT → scillm.

grahama1970/assistant-lab

Self-improvement workbench for /assistant. All the tools needed to diagnose, train, evaluate, and promote models in a continuous loop. The "warm pond" where /assistant evolves its own inference stack.

grahama1970/batch-quality

Pre-flight validation and quality gates for batch LLM operations. ACTUALLY tests samples through LLM before burning tokens. Uses SPARTA contracts for DuckDB validation queries. Integrates with task-monitor for enforced quality gates.

相關技能