Loading...
Loading...
Saves conversation history to session log files. Use when user says "保存对话", "保存对话信息", "记录会话", "save session", or "save conversation". Automatically creates timestamped session log in sessions/ directory.
npx skill4agent add charon-fan/agent-playbook session-loggersessions/YYYY-MM-DD-{topic}.md# 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}"保存对话信息""保存对话,主题是 skill-router 创建""保存对话,重点是:1) 创建了 skill-router,2) 修复了 front matter"| Input | Filename |
|---|---|
| "保存对话" | |
| "保存对话,主题是 prd" | |
| "保存今天的讨论" | |
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 refactoringsessions/.gitignore| You say | Skill does |
|---|---|
| "保存对话信息" | Creates session log with today's date |
| "保存今天的对话" | Creates session log |
| "保存session" | Creates session log |
| "记录会话" | Creates session log |
## 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}## 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}## 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}---
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"
---self-improving-agentmode: auto