session-logger

charon-fan/agent-playbook · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/charon-fan/agent-playbook --skill session-logger
0 commentsdiscussion
summary

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

skill.md

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

Input Filename
"保存对话" 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
  • Safe to include sensitive information

Quick Reference

You say Skill 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
how to use session-logger

How to use session-logger on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add session-logger
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/charon-fan/agent-playbook --skill session-logger

The skills CLI fetches session-logger from GitHub repository charon-fan/agent-playbook and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/session-logger

Reload or restart Cursor to activate session-logger. Access the skill through slash commands (e.g., /session-logger) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.826 reviews
  • Rahul Santra· Nov 3, 2024

    session-logger has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Pratham Ware· Oct 22, 2024

    Solid pick for teams standardizing on skills: session-logger is focused, and the summary matches what you get after install.

  • Yash Thakker· Sep 17, 2024

    We added session-logger from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Min Ramirez· Sep 9, 2024

    Useful defaults in session-logger — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Ishan Torres· Aug 28, 2024

    I recommend session-logger for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Dhruvi Jain· Aug 8, 2024

    session-logger fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Oshnikdeep· Jul 27, 2024

    Registry listing for session-logger matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Jin Abebe· Jul 19, 2024

    Keeps context tight: session-logger is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Kaira Sharma· Jul 15, 2024

    Registry listing for session-logger matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Ganesh Mohane· Jun 18, 2024

    session-logger reduced setup friction for our internal harness; good balance of opinion and flexibility.

showing 1-10 of 26

1 / 3