Community寫作與編輯github.com

grahama1970/batch-report

為批次處理作業生成執行後分析報告。分析清單、時間與失敗原因,產出完整的 Markdown 報告,並可選擇傳送至 agent-inbox 以進行跨專案溝通。

batch-report 是什麼?

Batch Report 技能可為批次處理作業生成深入的分析報告,支援多種批次格式(如 extractor、youtube、generic 與自動偵測)。它會分析任務清單中的成功、失敗與部分完成數量,計算時間分佈圖與瓶頸,並對失敗模式進行分類與摘要。報告格式為美觀易讀的 Markdown,且可輸出 JSON 供其他工具串接。除了命令列工具外,此技能還內建 agent-inbox 整合,能將報告自動傳送至指定專案的收件匣,方便跨專案協作與通知。此外,技能也提供 `failures` 子命令列出失敗原因,以及視覺化建議,可搭配 `/create-figure` 生成時間瀑布圖、結果圓餅圖等圖表。

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

Installed? Explore more 寫作與編輯 skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

在你喜歡的 AI 中提問

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

說明文件

批次報告技能

為已完成的批次處理作業生成全面的分析報告。

特點

  • 清單分析 - 統計成功、失敗、部分完成數量
  • 時間分佈 - 各步驟延遲分析,找出瓶頸
  • 失敗模式 - 分類與摘要失敗原因
  • 品質指標 - 抽樣輸出以進行品質評估
  • Markdown 報告 - 人類可讀的摘要
  • Agent-inbox 整合 - 自動傳送至專案收件匣

快速開始

cd .pi/skills/batch-report

# 為擷取器批次生成報告(自動偵測格式)
uv run python report.py analyze /path/to/batch/output

# 生成報告並傳送至 agent-inbox
uv run python report.py analyze /path/to/batch/output --send-to extractor

# 僅顯示摘要統計
uv run python report.py summary /path/to/batch/output

# 分析獨立狀態檔案
uv run python report.py state /path/to/.batch_state.json

# JSON 輸出以便管線傳遞
uv run python report.py summary /path/to/output --json | jq .success_rate

命令

analyze - 完整分析報告

uv run python report.py analyze /path/to/output \
    --output report.md \
    --send-to extractor \
    --priority high

選項:

選項簡寫說明
--output-o輸出檔案路徑(預設為 stdout)
--send-to-s將報告傳送至 agent-inbox 專案
--priority-pagent-inbox 的優先級(low/normal/high/critical)
--sample-n包含的樣本數(預設:5)
--format-f批次格式:extractor、youtube、generic、auto(預設:auto)
--json-j輸出為 JSON,供其他工具串接

summary - 快速統計

uv run python report.py summary /path/to/output
uv run python report.py summary /path/to/output --json

輸出:

批次:run-2025-12-18_144426-2eb428c
總計:230 | 成功:180 | 失敗:35 | 部分完成:15
成功率:78.3%
平均時間:4.2 分鐘 | 最慢:09_section_summarizer(45%)

JSON 輸出:

{
  "batch": "run-2025-12-18_144426-2eb428c",
  "format": "extractor",
  "total": 230,
  "successful": 180,
  "partial": 15,
  "failed": 35,
  "success_rate": 78.3,
  "avg_time_min": 4.2
}

state - 分析獨立狀態檔案

uv run python report.py state /path/to/.batch_state.json
uv run python report.py state /path/to/.batch_state.json --json

可與任何批次作業的 .batch_state.json 檔案搭配使用。

failures - 列出失敗項目及其原因

uv run python report.py failures /path/to/output
uv run python report.py failures /path/to/output --json

報告格式

# 批次報告:run-2025-12-18_144426-2eb428c

## 摘要
- **總項目數:** 230
- **成功:** 180(78.3%)
- **失敗:** 35(15.2%)
- **部分完成:** 15(6.5%)

## 時間分析
| 步驟 | 平均值(秒) | 最大值(秒) | 佔總計百分比 |
|------|---------|---------|------------|
| 09_section_summarizer | 120.5 | 341.0 | 45.2% |
| 05_table_extractor | 65.3 | 105.0 | 24.5% |
...

## 失敗模式
| 模式 | 數量 | 範例 |
|---------|-------|---------|
| 空的 text_content | 12 | 047ca6ef... |
| CUDA OOM | 5 | 9497a4e5... |
...

## 建議
1. 考慮對知識萃取使用 --text-only 模式
2. 在 VLM 前新增表格信心閾值
...

視覺化

生成報告後(特別是搭配 --json),可提議透過 /create-figure 進行視覺化:

# 按管線步驟顯示時間瀑布圖
create-figure metrics --input batch.json --output timing.png --type hbar --title "步驟時間"

# 成功/失敗分佈
create-figure metrics --input batch.json --output results.png --type pie --title "批次結果"

# 失敗模式細項
create-figure metrics --input batch.json --output failures.png --type bar --title "失敗模式"

何時提出: 在呈現批次分析後,詢問:「要我將時間分佈視覺化嗎?」

支援的批次格式

--format 旗標接受:extractor、youtube、generic 或 auto(預設)。

自動偵測邏輯:

  1. 如果 */manifest.json 和 */timings_summary.json 存在 → extractor
  2. 如果 .batch_state.json 的 description 中包含「transcript」→ youtube
  3. 如果 .batch_state.json 存在 → generic

Extractor 批次

預期包含:

  • */manifest.json - 每個項目的清單
  • */timings_summary.json - 時間資料
  • */14_report_generator/json_output/final_report.json - 品質指標
  • failed_urls.txt - 失敗項目清單

YouTube 逐字稿批次

預期包含:

  • .batch_state.json - 含有 transcript 相關 description 的狀態檔案

Generic 批次

預期包含:

  • .batch_state.json - 含有完成/失敗計數的狀態檔案
  • *.log 檔案(選擇性)用於失敗分析

與 agent-inbox 整合

# 將報告以 bug 形式傳送
uv run python report.py analyze /path/to/output \
    --send-to extractor \
    --priority high

# 已傳送訊息:extractor_abc123

相依性

dependencies = [
    "typer",
    "rich",
]

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/agent-inbox

File-based inter-agent messaging with headless dispatch. Check inbox, send bugs/requests to other projects, automatically spawn headless agents to fix bugs, and track progress via task-monitor.

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.

相關技能