Compile and save the answers output by the Agent during the conversation, such as reviews, investigations, and bug analysis, as an easy-to-read HTML document.
Workflow
1. 種別判定 → 2. 設定読み込み → 3. 番号決定 → 4. HTML生成 → 5. 保存・報告
Step 1: Type determination
Classify into one of the following based on the conversation content and the user's statements.
| Type key | Filename prefix | Color theme | Target |
|---|---|---|---|
review |
PR |
Blue (#1d4ed8) | Code review, PR review |
bug |
bug |
Red (#dc2626) | Bug investigation, defect analysis |
investigation |
investigation |
Purple (#7c3aed) | Code investigation, behavior investigation |
research |
research |
Cyan (#0891b2) | Technical investigation, research |
security |
security |
Orange (#ea580c) | Security audit |
If it cannot be determined, investigation is the default.
Step 2: Load configuration
~/.claude/skills/save-report/output-config.toml Read.
output.base_dir: Root directory for savingoutput.subdirs.<種別キー>: Subdirectory nameoutput.prefixes.<種別キー>: Filename prefix
Save destination = base_dir / subdirs[種別] / ファイル名
Step 3: Determine the number
Obtain the number in the following order of priority:
- Extract from conversation: If the user mentions a number such as "PR #123" or "bug #42", use that number
- Automatic numbering: If there are existing files in the save destination directory, use the highest number + 1; otherwise,
001start from
Numbers are zero-padded to 3 digits (e.g., 001, 042, 123)。
Final filename: {prefix}{番号}.html(e.g., PR123.html, bug001.html)
Step 4: Generate HTML
templates/base.html Based on this, assemble the HTML by applying the settings for each type.
Applying the color theme
| Variable | review | bug | investigation | research | security |
|---|---|---|---|---|---|
ACCENT_COLOR |
#1d4ed8 | #dc2626 | #7c3aed | #0891b2 | #ea580c |
ACCENT_LIGHT |
#dbeafe | #fee2e2 | #ede9fe | #cffafe | #ffedd5 |
Placeholder replacement
Replace the following in base.html:
| Placeholder | Content |
|---|---|
{{TITLE}} |
Document title (e.g., PR123 コードレビュー結果) |
{{ACCENT_COLOR}} |
Type color |
{{ACCENT_LIGHT}} |
Light accent color |
{{BADGE_LABEL}} |
Badge text (e.g., CODE REVIEW) |
{{SUBTITLE}} |
Description of the target (branch name, investigation target, etc.) |
{{DATE}} |
Today's date (YYYY-MM-DD) |
{{DOC_ID}} |
Filename (e.g., PR123) |
{{SUMMARY_CARDS}} |
Summary card HTML |
{{MAIN_CONTENT}} |
Body section HTML |
Section structure by type
review (code review):
- 📋 Review overview
- 🔴 Critical findings (table: Location / Problem / Recommended action)
- 🟡 Improvement suggestions (table: Location / Content / Priority)
- ✅ Good points
- 📝 Summary/Next actions
Summary card: Target PR/branch / Number of findings (breakdown of critical/minor) / Overall assessment
bug (Bug investigation):
- 🐛 Bug overview/Reproduction steps
- 📊 Investigation Results / Log
- 🧩 Root Cause
- 🔧 Remediation Plan (Table: Action / Priority / Notes)
- 📝 Summary
Summary Card: Bug ID / Status / Impact Scope
investigation (code investigation):
templates/investigation.htmlFollow the section structure of- 🔍 Background & Purpose of Investigation / 📊 Investigation Results / 🧩 Cause Analysis / 💡 Recommended Actions / 📝 Summary
Summary Card: Investigation Target / Status / Impact Scope
research (research):
- 🎯 Investigation Purpose / 📚 Investigation Results / ⚖️ Comparison & Evaluation / 💡 Conclusion & Recommendations / 📝 References
Summary Card: Investigation Theme / Number of Targets / Recommendation
security (security):
- 🛡️ Audit Overview / 🔴 Vulnerabilities (Table: CVE/Type / Severity / Response) / 🟡 Risks / ✅ No Issues / 📝 Summary
Summary Card: Audit Target / Number of Vulnerabilities / Highest Severity
HTML Quality Standards
- Japanese Font:
'Segoe UI', 'Meiryo', sans-serif - Code is
<pre>or<code>Enclose in tags - If the table has many rows, display up to 15 rows, and collapse the rest (
<details>) - The file must be self-contained as complete HTML (no external CDN)
Step 5: Save & Report
- Create the save destination directory if it does not exist
- Write the HTML file
- Report the following to the user:
✅ 保存しました
ファイル: ~/reports/reviews/PR123.html
種別: コードレビュー
Important Notes
- Faithful Reproduction of Conversation Content: Do not summarize or omit. Put the content output by the Agent into the HTML as-is
- Preservation of Code Blocks: Always preserve source code and diffs with
<pre>tags - Linking: File paths (e.g.,
src/auth.rs:42)は<code>Decorate with tags - Unknown Information: For items that cannot be read from the conversation (such as PR numbers), write "unknown" or "-", and do not guess