From charon-fan-agent-playbook
Saves conversation history to timestamped Markdown session logs in sessions/ directory with metadata, summaries, actions, technical notes, and follow-ups. Activates on 'save session', '保存对话', or similar phrases.
npx claudepluginhub zhaono1/agent-playbookThis skill is limited to using the following tools:
A skill for automatically saving conversation history to persistent session log files.
Generates and saves Markdown session logs capturing objectives, file changes, referenced materials, technical notes, future plans, open items, and metrics to resume project work across conversations.
Saves structured summaries of conversations to dated markdown files in conv-logs/ using git project root, checks prior saves to append new topics, tracks skills used, branch, and changed files.
Documents development sessions into daily .agents/SESSIONS/YYYY-MM-DD.md files using /start and /end commands. Tracks decisions, file changes, mistakes, next steps, and generates Mermaid flowcharts.
Share bugs, ideas, or general feedback.
A skill for automatically saving conversation history to persistent session log files.
This skill activates when you:
All sessions are saved to: sessions/YYYY-MM-DD-{topic}.md
For each session, log:
Metadata
Summary
Actions Taken
Technical Notes
Open Questions
# Session: {Topic}
**Date**: {YYYY-MM-DD}
**Duration**: {approximate}
**Context**: {project/directory}
## Summary
{What was accomplished in this session}
## Key Decisions
1. {Decision 1}
2. {Decision 2}
## Actions Taken
- [x] {Completed action 1}
- [x] {Completed action 2}
- [ ] {Pending action 3}
## Technical Notes
{Important technical details}
## Open Questions / Follow-ups
- {Question 1}
- {Question 2}
## Related Files
- `{file-path}` - {what changed}
Simply say:
"保存对话信息"
The skill will:
Specify the session topic:
"保存对话,主题是 skill-router 创建"
If auto-extraction misses something, provide details:
"保存对话,重点是:1) 创建了 skill-router,2) 修复了 front matter"
| Input | Filename |
|---|---|
| "保存对话" | YYYY-MM-DD-session.md |
| "保存对话,主题是 prd" | YYYY-MM-DD-prd.md |
| "保存今天的讨论" | YYYY-MM-DD-discussion.md |
sessions/
├── README.md # This file
├── 2025-01-11-skill-router.md # Session about skill-router
├── 2025-01-11-prd-planner.md # Session about PRD planner
└── 2025-01-12-refactoring.md # Session about refactoring
Session logs are stored in sessions/ which is in .gitignore.
| You say | Skill does |
|---|---|
| "保存对话信息" | Creates session log with today's date |
| "保存今天的对话" | Creates session log |
| "保存session" | Creates session log |
| "记录会话" | Creates session log |
When triggered by other skills via hooks, session-logger extracts structured data for learning:
When a skill completes, capture:
## Skill Execution Context
**Skill**: {skill-name}
**Trigger**: {user-invoked | hook-triggered | auto-triggered}
**Status**: {completed | error | partial}
**Duration**: {approximate time}
### Input Context
- User request: {original request}
- Files involved: {list of files}
- Codebase patterns detected: {patterns}
### Output Summary
- Actions taken: {list}
- Files modified: {list with changes}
- Decisions made: {key decisions}
### Learning Signals
- What worked well: {successes}
- What could improve: {areas for improvement}
- Patterns discovered: {new patterns}
- Errors encountered: {errors and resolutions}
When a skill encounters errors:
## Error Context
**Error Type**: {type}
**Error Message**: {message}
**Stack Trace**: {if available}
### Resolution Attempted
- Approach: {what was tried}
- Result: {success/failure}
- Root cause: {if identified}
### Prevention Notes
- How to avoid: {prevention strategy}
- Related patterns: {similar issues}
Extract reusable patterns for the self-improving-agent:
## Extracted Patterns
### Code Patterns
- Pattern name: {name}
- Context: {when to use}
- Example: {code snippet}
### Workflow Patterns
- Trigger: {what initiates}
- Steps: {sequence}
- Outcome: {expected result}
### Anti-Patterns
- Pattern: {what to avoid}
- Why: {reason}
- Alternative: {better approach}
For machine-readable extraction, use YAML front matter in session logs:
---
session_type: skill_execution
skill_name: code-reviewer
trigger_source: hook
status: completed
files_modified:
- path: src/utils.ts
changes: refactored error handling
patterns_learned:
- name: error-boundary-pattern
category: error-handling
confidence: high
errors_encountered: []
learning_signals:
successes:
- "Identified code smell in utils.ts"
improvements:
- "Could have suggested more specific refactoring"
---
When triggered by self-improving-agent:
When invoked via hooks with mode: auto: