From cb4eca34d3f6aea14135a7a34dcd9a3f11c3740e Mon Sep 17 00:00:00 2001 From: Zhongwei Li Date: Sat, 29 Nov 2025 18:20:02 +0800 Subject: [PATCH] Initial commit --- .claude-plugin/plugin.json | 11 + README.md | 3 + plugin.lock.json | 53 +++ skills/session-reporter/SKILL.md | 114 +++++++ skills/session-reporter/reference.md | 44 +++ skills/session-reporter/templates/report.html | 307 ++++++++++++++++++ 6 files changed, 532 insertions(+) create mode 100644 .claude-plugin/plugin.json create mode 100644 README.md create mode 100644 plugin.lock.json create mode 100644 skills/session-reporter/SKILL.md create mode 100644 skills/session-reporter/reference.md create mode 100644 skills/session-reporter/templates/report.html diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..191cee4 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,11 @@ +{ + "name": "session-reporter-plugin", + "description": "Generate HTML reports to visualize work sessions including conversation history, code changes, and execution results", + "version": "1.0.0", + "author": { + "name": "Stefan Cho" + }, + "skills": [ + "./skills" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..f8199c7 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# session-reporter-plugin + +Generate HTML reports to visualize work sessions including conversation history, code changes, and execution results diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..2ddf2f5 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,53 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:devstefancho/claude-plugins:session-reporter-plugin", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "0aea82b0b0cdccb511c9ef9b128aed07491944f6", + "treeHash": "dc7118120bc59bf4f369e4724379de52d4278f6b9384d4dddad6a0696d6c7c75", + "generatedAt": "2025-11-28T10:16:21.267388Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "session-reporter-plugin", + "description": "Generate HTML reports to visualize work sessions including conversation history, code changes, and execution results", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "acbfa73ebfebaf601d11fc2e0c5c7f62c346914a6b274cab8fccb342c0f83e90" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "3062dc64adfa898649bfb2ef732cddad349bf68ccfcb127e9fa8e5698680fbcc" + }, + { + "path": "skills/session-reporter/reference.md", + "sha256": "3e1df9ff1f8769186bbd4c58965ca2d080e6db841366f189a41655539dc2aabd" + }, + { + "path": "skills/session-reporter/SKILL.md", + "sha256": "a8fd2ab30add7855119ccf19567f050cab68b875a3df5ef494e2fc54107abd41" + }, + { + "path": "skills/session-reporter/templates/report.html", + "sha256": "2a0c5575822568a5f79b0e44325f25aadfbed6f6f6b384bb5bd4a7aa563aad77" + } + ], + "dirSha256": "dc7118120bc59bf4f369e4724379de52d4278f6b9384d4dddad6a0696d6c7c75" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file diff --git a/skills/session-reporter/SKILL.md b/skills/session-reporter/SKILL.md new file mode 100644 index 0000000..635f967 --- /dev/null +++ b/skills/session-reporter/SKILL.md @@ -0,0 +1,114 @@ +--- +name: session-reporter +description: Generate HTML file to view work session. Use when user asks to view content as HTML (e.g., 'HTML로 보여줘', 'HTML 파일로 만들어줘', 'view as HTML', 'export to HTML', 'HTML로 저장'). +allowed-tools: Write, Bash, AskUserQuestion +--- + +# Session Reporter + +Generate an HTML file that visualizes your current work session, including conversation history, code changes, and execution results. The HTML file is automatically opened in your default browser. + +## Instructions + +Follow these steps to generate a session report: + +### 1. Ask User for Report Scope + +Use the AskUserQuestion tool to determine what content to include: + +``` +Question: "어떤 범위의 세션 내용을 HTML로 만들까요?" +Options: +- "마지막 작업만" (Last activity only - most recent task/conversation) +- "전체 세션" (Full session - entire conversation from start) +- "커스텀 선택" (Custom - ask user to specify what to include) +``` + +### 2. Collect Session Information + +Based on the user's choice, gather the following information: + +- **작업 요약 (Work Summary)**: + - Files modified + - Key decisions made + - Major changes implemented + +- **대화 내용 (Conversation)**: + - User questions and requests + - Claude's responses + - Important clarifications + +- **코드 변경사항 (Code Changes)**: + - Modified files with diffs or before/after comparisons + - New files created + - Files deleted + +- **실행 결과 (Execution Results)**: + - Test results + - Build output + - Error messages + - Command outputs + +### 3. Generate HTML File + +Use the template at `templates/report.html` to create the HTML file: + +1. Read the template file +2. Replace placeholders with actual session data: + - `{{TITLE}}` - Report title (e.g., "Session Report - 2025-11-15") + - `{{TIMESTAMP}}` - Generation timestamp + - `{{SUMMARY}}` - Work summary section + - `{{CONVERSATION}}` - Conversation content + - `{{CHANGES}}` - Code changes section + - `{{RESULTS}}` - Execution results section +3. Save to `/tmp/session-report-{timestamp}.html` + - Use format: `session-report-YYYYMMDD-HHMMSS.html` + - Example: `session-report-20251115-143022.html` + +### 4. Open in Browser + +After generating the HTML file: + +1. Use Bash tool to open the file: + ```bash + open /tmp/session-report-{timestamp}.html + ``` +2. Provide the file:// path to the user: + ``` + file:///tmp/session-report-{timestamp}.html + ``` + +### 5. Inform User + +Tell the user: +- HTML 파일이 생성되었고 브라우저에서 열렸습니다 +- The file path for future reference +- The file is temporary and will be cleaned up on system restart + +## Examples + +### Example 1: Last Activity Only + +``` +User: HTML로 보여줘 +Claude: [Uses AskUserQuestion to confirm scope] +User: 마지막 작업만 +Claude: [Generates HTML with recent changes only, opens in browser] +``` + +### Example 2: Full Session + +``` +User: 전체 세션 내용을 HTML 파일로 만들어줘 +Claude: [Uses AskUserQuestion to confirm] +User: 전체 세션 +Claude: [Generates comprehensive HTML with all conversation and changes] +``` + +## Tips + +- Keep HTML styling simple and clean for easy reading +- Include proper syntax highlighting for code blocks using `
` tags
+- Add section navigation for longer reports
+- Make the HTML print-friendly for documentation purposes
+- Use semantic HTML elements for better accessibility
diff --git a/skills/session-reporter/reference.md b/skills/session-reporter/reference.md
new file mode 100644
index 0000000..acd2660
--- /dev/null
+++ b/skills/session-reporter/reference.md
@@ -0,0 +1,44 @@
+# Session Reporter - Reference
+
+## Overview
+
+HTML 파일로 작업 세션을 시각화하여 브라우저에서 볼 수 있습니다.
+
+## Trigger Keywords
+
+**Korean**: "HTML로 보여줘", "HTML 파일로 만들어줘", "HTML로 저장"
+**English**: "view as HTML", "export to HTML", "show in HTML"
+
+## Report Scope Options
+
+1. **마지막 작업만** - 최근 작업 내용만
+2. **전체 세션** - 처음부터 모든 대화/변경사항
+3. **커스텀 선택** - 원하는 내용만 선택
+
+## File Location
+
+```
+/tmp/session-report-YYYYMMDD-HHMMSS.html
+```
+
+⚠️ `/tmp` 파일은 시스템 재시작시 삭제됩니다.
+
+## Template Customization
+
+템플릿 위치: `.claude/skills/session-reporter/templates/report.html`
+
+### Placeholders
+
+- `{{TITLE}}` - 리포트 제목
+- `{{TIMESTAMP}}` - 생성 시간
+- `{{SUMMARY}}` - 작업 요약
+- `{{CONVERSATION}}` - 대화 내용
+- `{{CHANGES}}` - 코드 변경사항
+- `{{RESULTS}}` - 실행 결과
+- `{{FILE_PATH}}` - 파일 경로
+
+## Tips
+
+- **공유 전 확인**: 민감한 정보(API 키, 비밀번호) 제거
+- **영구 저장**: 중요한 리포트는 다른 위치에 복사
+- **PDF 변환**: 브라우저의 인쇄 기능(Cmd+P) 사용
diff --git a/skills/session-reporter/templates/report.html b/skills/session-reporter/templates/report.html
new file mode 100644
index 0000000..31a68f3
--- /dev/null
+++ b/skills/session-reporter/templates/report.html
@@ -0,0 +1,307 @@
+
+
+
+    
+    
+    {{TITLE}}
+    
+
+
+    
+
+

{{TITLE}}

+

생성 시간: {{TIMESTAMP}}

+
+ + + +
+
+

📋 작업 요약

+ {{SUMMARY}} +
+ +
+

💬 대화 내용

+ {{CONVERSATION}} +
+ +
+

📝 코드 변경사항

+ {{CHANGES}} +
+ +
+

✅ 실행 결과

+ {{RESULTS}} +
+
+ + +
+ +