Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
charon-fan avatar

Session Logger

  • 699 installs
  • 65 repo stars
  • Updated June 21, 2026
  • charon-fan/agent-playbook

session-logger is a Claude Code skill that persists Claude Code or similar agent chat turns into timestamped markdown session logs for developers who need continuity across interrupted coding sessions.

About

session-logger is a Claude Code skill from charon-fan/agent-playbook that automatically saves agent conversations to persistent markdown files under a sessions/ directory. Installation symlinks the skill into ~/.claude/skills/session-logger. Trigger phrases in Chinese and English—such as 保存对话信息—cause the agent to review the conversation, extract key decisions, and write a structured session log without manual copy-paste. Developers reach for session-logger when long agent threads contain architecture choices, debugging paths, or TODOs that would be costly to reconstruct in the next session. Logs support referencing prior decisions, tracking project evolution, and learning from earlier problem-solving approaches across Claude Code runs.

  • Writes `sessions/YYYY-MM-DD-{topic}.md` from the current conversation
  • Activates on bilingual triggers (e.g. 保存对话信息, save session, log session)
  • Summarizes decisions, context, and problem-solving steps into a structured log
  • Keeps logs local via `.gitignore` so session files are not committed
  • Uses Read, Write, Edit, and Bash to create and place session files

Session Logger by the numbers

  • 699 all-time installs (skills.sh)
  • Ranked #1,403 of 16,659 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: HIGH risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/charon-fan/agent-playbook --skill session-logger

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs699
repo stars65
Security audit1 / 3 scanners passed
Last updatedJune 21, 2026
Repositorycharon-fan/agent-playbook

How do you persist Claude Code chat history?

Persist Claude Code (or similar) chat turns into timestamped markdown logs so you can resume work without re-explaining context.

Who is it for?

Developers running multi-day Claude Code sessions on complex codebases who need searchable continuity without re-prompting full project context.

Skip if: Skip session-logger when official IDE chat export, git commit history, or a team wiki already captures the same decisions with better access control.

When should I use this skill?

The user asks to save conversation information, resume prior session context, or uses documented Chinese or English session-logger trigger phrases.

What you get

Timestamped markdown session logs in sessions/ capturing decisions, context, and problem-solving steps from the agent conversation.

  • Timestamped session markdown log
  • Extracted decision and context summary

By the numbers

  • Documents bilingual trigger phrases in Chinese and English for activation
  • Produces session logs as markdown files under a sessions/ directory

Files

SKILL.mdMarkdownGitHub ↗

Session Logger

A skill for automatically saving conversation history to persistent session log files.

When This Skill Activates

This skill activates when you:

  • Say "保存对话信息" or "保存对话"
  • Say "记录会话内容" or "保存session"
  • Say "save session" or "save conversation"
  • Ask to save the current conversation

Session File Location

All sessions are saved to: sessions/YYYY-MM-DD-{topic}.md

What Gets Logged

For each session, log:

1. Metadata

  • Date and duration
  • Context/working directory
  • Main topic

2. Summary

  • What was accomplished
  • Key decisions made
  • Files created/modified

3. Actions Taken

  • Checklist of completed tasks
  • Pending follow-ups

4. Technical Notes

  • Important code snippets
  • Commands used
  • Solutions found

5. Open Questions

  • Issues to revisit
  • Follow-up tasks

Session Template

# 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}

How to Use

Option 1: Automatic Logging

Simply say:

"保存对话信息"

The skill will: 1. Review the conversation history 2. Extract key information 3. Create/update the session file

Option 2: With Topic

Specify the session topic:

"保存对话,主题是 skill-router 创建"

Option 3: Manual Prompt

If auto-extraction misses something, provide details:

"保存对话,重点是:1) 创建了 skill-router,2) 修复了 front matter"

File Naming

InputFilename
"保存对话"YYYY-MM-DD-session.md
"保存对话,主题是 prd"YYYY-MM-DD-prd.md
"保存今天的讨论"YYYY-MM-DD-discussion.md

Session Log Structure

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

Privacy Note

Session logs are stored in sessions/ which is in .gitignore.

  • Logs are NOT committed to git
  • Logs contain your actual conversation
  • Do not include secrets, credentials, tokens, or private user data unless they are explicitly required and redacted

Quick Reference

You saySkill does
"保存对话信息"Creates session log with today's date
"保存今天的对话"Creates session log
"保存session"Creates session log
"记录会话"Creates session log

Best Practices

1. Save at key milestones: After completing a feature, fixing a bug, etc. 2. Be specific with topics: Helps when searching later 3. Include code snippets: Save important solutions 4. Track decisions: Why did you choose X over Y? 5. List pending items: What to do next time

Rich Content Extraction (for Self-Improving Agent)

When triggered by other skills via hooks, session-logger extracts structured data for learning:

Skill Context Capture

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}

Error Context Capture

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}

Pattern Extraction

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}

Structured Data Format

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"
---

Integration with Self-Improving Agent

When triggered by self-improving-agent:

1. Extract episodic memory: Capture the full context of what happened 2. Identify semantic patterns: Tag reusable knowledge 3. Update working memory: Note immediate follow-ups needed 4. Signal completion: Write trigger file if skill chaining is needed

Auto-Trigger Behavior

When invoked via hooks with mode: auto:

  • Silently create/update session log
  • Extract structured data without user interaction
  • Append to existing session if same day/topic
  • Create new session if context differs significantly

Related skills

FAQ

Where does session-logger store conversation logs?

session-logger creates timestamped markdown files in a sessions/ directory after reviewing the conversation and extracting key information. Developers symlink the skill into ~/.claude/skills/session-logger for Claude Code.

How do you trigger session-logger in Claude Code?

session-logger activates on documented trigger phrases such as 保存对话信息 or English equivalents. The skill reviews the thread, extracts decisions, and writes a structured session log without a separate export step.

Is Session Logger safe to install?

skills.sh reports 1 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

AI & Agent Buildingagentsautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.