report-engine
Guides Claude through the 4-phase report workflow (Scope → Query → Draft → Final) and produces output in multiple formats (docx, pptx, html) with dynamic…
от CognitionAI★ 42 звезды на GitHub
Установить report-engine в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Report Engine — 4-Phase Workflow with Multi-Format Output
Overview
Every report follows a mandatory 4-phase workflow. The user always reviews a markdown draft before the final output is generated. This prevents wasted effort and ensures accuracy.
Brand Loading
Before generating any output, load brand tokens:
- Check for
brand/custom.json— if it exists, load it as the primary brand - Fall back to
brand/enterpret.json— the Enterpret default palette - Shallow merge — if
custom.jsonexists, merge its fields overenterpret.json(custom overrides only the fields it specifies; unspecified fields use Enterpret defaults) - Resolve template variables:
{ORG_NAME}→context/organization.json→name{ORG_SLUG}→context/organization.json→slug- Apply to all brand fields:
name,footer.dashboardUrl,citations.baseUrl, etc.
The resolved brand object is referred to as BRAND throughout all format-specific reference files.
The 4 Phases
Phase 1: Scope
Purpose: Confirm what the report should cover before querying any data.
Ask the user (conversationally, not as a checklist):
| Parameter | Question | Default |
|---|---|---|
| Audience | "Who will read this?" | Mixed (leadership + ops) |
| Time period | "What date range?" | Last 7 days |
| Region | "Any region filter?" | All regions |
| Goal | "What question are you trying to answer?" | General overview |
| Focus | "Any specific topics or categories to focus on?" | None |
Rules:
- Ask 2-3 questions max. Don't interrogate.
- If the user provides context in their command (e.g.,
/customer-digest US last week), extract parameters from that and confirm. - Always confirm the scope before proceeding: "I'll pull [time range] data for [region/topic], aimed at [audience]. Sound right?"
Phase 2: Query
Purpose: Pull data from the Wisdom Knowledge Graph.
- Load the
wisdom-kgskill for query patterns and rules - Execute queries based on the report type (see
wisdom-kgSKILL.md → Query Strategy) - Collect: theme volumes, sentiment, WoW changes, verbatim evidence with citation IDs
- If a query fails, simplify and retry (never present failed query results)
Rules:
- Always run the pre-flight check first: call
get_organization_detailsto verify auth - If auth fails, tell the user to run
/startto re-authenticate - Run queries sequentially, not in parallel (to handle errors gracefully)
- Always collect
feedback_record_idfor citations
Phase 3: Draft
Purpose: Present a structured markdown draft for user review.
Present the report draft directly in chat as markdown. Structure depends on the report type (see references/report-templates.md), but always includes:
- Executive Summary — 3-5 bullet points of key findings
- Data sections — Tables, ranked lists, themed groupings
- Evidence — Verbatim quotes with citation links
- Recommendations — Actionable next steps framed as product decisions
Rules:
- Always say: "Here's the draft. Want me to adjust anything before I generate the final report?"
- Wait for user approval or edits before proceeding to Phase 4
- If the user requests changes, update the draft and re-present
Phase 4: Final (Multi-Format Output)
Purpose: Generate branded output from the approved draft.
Step 4a: Choose Format
Ask: "What format would you like?"
- docx — Word document (default, best for sharing and editing)
- pptx — Executive summary deck (5-8 slides, best for presentations)
- html — Self-contained HTML with interactive charts (best for web/email)
- all — Generate all three formats
Default: docx
Step 4b: Generate Charts
Before building the document, generate chart images for each report section that supports them. See references/chart-patterns.md for config recipes and references/report-templates.md for which sections get which chart type.
- Build the Chart.js config object for each chart using
BRAND.chart.*colors - Call
generateChart(config, width, height)to fetch a PNG buffer from QuickChart API - If any chart fails (
nullreturn), skip it — charts never block report generation - Store buffers for use in Step 4c
Step 4c: Build Document
Route to the appropriate format-specific reference:
| Format | Reference File | Key Approach |
|---|---|---|
| docx | references/report-format-docx.md |
docx-js (npm docx package) |
| pptx | references/report-format-pptx.md |
pptxgenjs |
| html | references/report-format-html.md |
Self-contained HTML + Chart.js CDN |
For each format:
- Apply
BRANDtokens (colors, typography, footer text) - Embed charts where applicable
- Include citation hyperlinks using
BRAND.citations.baseUrl - Save with appropriate file extension
File naming: {report_type}_{region}_{date}.{ext}
- Example:
customer_digest_US_2026-03-05.docx - Example: `
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/chart-patterns.md
- references/report-format-docx.md
- references/report-format-html.md
- references/report-format-pptx.md
- references/report-templates.md
FAQ
Что делает скилл report-engine?
Guides Claude through the 4-phase report workflow (Scope → Query → Draft → Final) and produces output in multiple formats (docx, pptx, html) with dynamic branding. Loads brand tokens from custom.json (if exists) or enterpret.json default. Auto-loads for any report-generating command.
Как установить скилл report-engine?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл report-engine запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
AnthropicUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
xlsx
AnthropicUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
pptx
AnthropicUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…