session-log

Create structured session logs for AI coding/chat sessions. Use when starting a new development session, tracking decisions and context, documenting troubleshooting, or preserving conversation history for future reference.

16 stars

Best use case

session-log is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Create structured session logs for AI coding/chat sessions. Use when starting a new development session, tracking decisions and context, documenting troubleshooting, or preserving conversation history for future reference.

Teams using session-log should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/session-log/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/session-log/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/session-log/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How session-log Compares

Feature / Agentsession-logStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Create structured session logs for AI coding/chat sessions. Use when starting a new development session, tracking decisions and context, documenting troubleshooting, or preserving conversation history for future reference.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Session Log Skill

This skill teaches agents to create well-structured session logs that capture the context, decisions, and outcomes of AI-assisted development sessions. Session logs serve as breadcrumbs for future developers (including future you) to understand *why* decisions were made.

## When to Use This Skill

Use this skill when:
- Starting a new coding/chat session with specific goals
- Making architectural or design decisions that need documentation
- Troubleshooting complex issues with multiple attempted solutions
- Learning something new that should be preserved for reference
- Wrapping up a session and wanting to capture what was accomplished
- Creating audit trails for important changes

## Core Principles

**Session logs are NOT application logs**: They capture human-AI collaboration context, not system events. Think "meeting notes" not "server logs".

**Focus on "why" not "what"**: Code diffs show *what* changed. Session logs explain *why* it changed, what alternatives were considered, and what was learned.

**Structure enables searchability**: Consistent format makes logs searchable and parseable. Use markdown + frontmatter for maximum compatibility.

**Context is king**: Future readers lack your current context. Include enough detail to reconstruct your thought process months later.

## Session Log File Structure

### Directory Location

Create session logs in: `.github/sessions/`

**Why this location?**
- `.github/` - Already used for repo metadata (workflows, agents, skills)
- `sessions/` - Clear purpose, separate from other .github/ content
- Included in git - Session logs are documentation, not secrets
- Searchable - Can grep across all sessions for patterns

### Filename Format

Use ISO 8601 timestamp format: `YYYY-MM-DDTHH-MM-SSZ.md`

**Examples**:
- `2026-02-08T15-30-00Z.md` (February 8, 2026, 3:30 PM UTC)
- `2026-02-08T09-15-30Z.md` (February 8, 2026, 9:15:30 AM UTC)

**Why this format?**
- **Sortable**: Alphabetical sorting = chronological order
- **Unambiguous**: ISO 8601 is universally understood
- **Collision-resistant**: Down-to-second precision prevents overwrites
- **Tool-friendly**: No spaces or special chars, easy to parse

**Generate timestamp** (in bash):
```bash
date -u +"%Y-%m-%dT%H-%M-%SZ"
```

### File Format Template

```markdown
---
session_id: <unique-identifier>
started: <ISO-8601-timestamp>
ended: <ISO-8601-timestamp-or-ongoing>
participants: [human, ai-agent-name]
tags: [feature-name, bug-fix, refactoring, learning, etc]
status: ongoing | completed | abandoned
---

# Session: <Brief descriptive title>

## Goal

<What you're trying to accomplish in 1-3 sentences>

## Context

### Starting State
- **Current situation**: <What exists now>
- **Problem/need**: <What prompted this session>
- **Prior attempts**: <What's been tried before, if any>

### Environment
- **Branch**: <git branch name>
- **Tools**: <Relevant tools/frameworks/versions>
- **Files involved**: <Key files to be modified/created>

## Conversation Log

### <Timestamp> - <Topic/Phase>

**Discussion**:
<What was discussed, questions asked, alternatives considered>

**Decision**:
<What was decided and why>

**Action**:
<What was done (code written, commands run, files created)>

**Outcome**:
<What happened as a result>

---

*(Repeat this pattern for each major phase of the session)*

## Key Decisions

### Decision 1: <Brief title>
- **Question**: <What needed deciding>
- **Options**: <What alternatives were considered>
- **Choice**: <What was chosen>
- **Rationale**: <Why this option was best>
- **Trade-offs**: <What was sacrificed>

*(Repeat for each major decision)*

## Challenges & Solutions

### Challenge 1: <Brief description>
- **Problem**: <What went wrong>
- **Attempted solutions**: <What didn't work>
- **Final solution**: <What worked>
- **Lesson learned**: <Key takeaway>

## Artifacts Created

- [ ] `path/to/file.ext` - <Purpose/description>
- [ ] `another/file.ext` - <Purpose/description>
- [ ] Agent/skill: `.github/agents/name.md` - <Purpose>

## Next Steps

- [ ] <Immediate follow-up task>
- [ ] <Testing needed>
- [ ] <Documentation to update>
- [ ] <Future improvements to consider>

## References

- Related sessions: `YYYY-MM-DDTHH-MM-SSZ.md`
- Issues/PRs: #123, #456
- Related Commits: [If branch information and commit history is readily available via git]
- Documentation: [Link to relevant docs]
- External resources: [Helpful articles/guides]

## Summary

<2-3 sentence summary of what was accomplished and learned>

---

**Total session time**: <X hours Y minutes>  
**Status**: <completed | ongoing | abandoned>  
**Outcome**: <success | partial | blocked>
```

## Session Log Best Practices

### DO ✅

**Include session metadata** in frontmatter:
- Unique session ID (UUID or timestamp)
- Start/end timestamps
- Participants (human username, AI agent name)
- Status tracking (ongoing/completed/abandoned)
- Tags for categorization

**Capture decision context**:
- What options were considered
- Why each option was rejected
- Trade-offs made
- Assumptions that influenced the decision

**Log errors and failures**:
- What didn't work
- Why it failed
- How you debugged it
- What you learned

**Track time spent**:
- Session duration
- Time on different phases
- Helps estimate future work

**Link related artifacts**:
- Code files created/modified
- PRs/issues opened
- Related session logs
- External documentation

**Write for future you**:
- Assume you'll forget all context in 6 months
- Explain acronyms and project-specific terms
- Include enough detail to reproduce decisions

**Update logs in real-time**:
- Don't wait until the end of the session
- Capture thoughts while fresh
- It's easier than reconstructing later

### DON'T ❌

**Don't log code directly**:
- Link to files/commits instead
- Code belongs in version control, not logs
- Exception: Small snippets (< 10 lines) to illustrate a point

**Don't log sensitive data**:
- No API keys, passwords, tokens
- No PII (personally identifiable information)
- No customer data
- Use placeholders: `<REDACTED>`, `<API_KEY>`

**Don't duplicate what git already tracks**:
- Commit messages explain what changed
- Session logs explain why and how you decided

**Don't write novels**:
- Be concise but complete
- Bullet points over paragraphs
- Focus on decisions and outcomes, not play-by-play

**Don't skip the "why"**:
- "Added feature X" is useless
- "Added feature X because Y users requested it and Z data showed need" is valuable

## Structured Logging for AI Sessions

When logging AI-assisted sessions specifically:

### Conversation Tracking

**Track the flow of ideas**:
```markdown
### 14:30 - Initial approach discussion

**Human**: How should we structure the authentication system?

**AI suggested**: Three approaches:
1. JWT with Redis sessions (fast, scalable)
2. Traditional server-side sessions (simple, proven)
3. Stateless JWT-only (minimal infrastructure)

**Human concern**: Redis adds operational complexity

**AI recommendation**: Option 2 for MVP, migrate to Option 1 when scale demands

**Decision**: Server-side sessions with cookie storage
**Rationale**: Prioritizing simplicity for initial launch, can optimize later

**Implementation**:
- Created `auth/session-manager.ts`
- Added session middleware to Express app
- Configured secure cookie settings
```

### Tool/MCP Usage

**Log tool invocations when they matter**:
```markdown
### 15:45 - Debugging deployment failure

**Command run**: `kubectl get pods -n production`
**Output**: 3/5 pods in CrashLoopBackOff
**Inference**: Recent config change broke pod startup

**Command run**: `kubectl logs <pod-name>`
**Key error**: `ECONNREFUSED connecting to Redis`
**Root cause**: Redis connection string format changed in v2.0

**Fix applied**: Updated `REDIS_URL` format in secrets
**Verification**: All pods healthy after rollout
```

### Learning Capture

**Document insights gained**:
```markdown
## Key Learnings

### TypeScript Generic Constraints
**Context**: Struggled with typing a utility function
**Discovery**: Can use `extends` to constrain generic types
**Example**: `function process<T extends Identifiable>(item: T)` 
**Source**: [TypeScript Handbook - Generics](https://...)
**Apply to**: Similar utility functions across codebase

### Docker Build Optimization
**Problem**: 8-minute build times
**Solution**: Multi-stage builds + layer caching
**Result**: Down to 90 seconds
**Key insight**: Order Dockerfile commands by change frequency
```

## Session Categories & Tags

Use consistent tags for easier searching:

**By Activity Type**:
- `feature-development` - Building new functionality
- `bug-fix` - Resolving defects
- `refactoring` - Restructuring existing code
- `debugging` - Investigating issues
- `learning` - Educational/exploratory session
- `architecture` - System design decisions
- `code-review` - Reviewing changes
- `documentation` - Writing/updating docs
- `deployment` - Release and operations work

**By Domain**:
- `frontend`, `backend`, `infrastructure`, `database`
- `authentication`, `payments`, `notifications`
- `performance`, `security`, `testing`

**By Outcome**:
- `completed` - Goals achieved
- `partial` - Some progress made
- `blocked` - Hit a blocker
- `research` - Gathered information

## Automation Helpers

### Quick Session Start

Create a helper function in your shell:

```bash
# Add to ~/.zshrc or ~/.bashrc
new-session() {
  local session_dir=".github/sessions"
  local timestamp=$(date -u +"%Y-%m-%dT%H-%M-%SZ")
  local session_file="$session_dir/$timestamp.md"
  
  mkdir -p "$session_dir"
  
  cat > "$session_file" << EOF
---
session_id: $timestamp
started: $(date -u +"%Y-%m-%dT%H:%M:%SZ")
ended: ongoing
participants: [human, copilot]
tags: []
status: ongoing
---

# Session: <Title>

## Goal

<What you're trying to accomplish>

## Context

### Starting State
- **Current situation**: 
- **Problem/need**: 
- **Prior attempts**: 

### Environment
- **Branch**: 
- **Tools**: 
- **Files involved**: 

## Conversation Log

### $(date -u +"%H:%M") - Initial setup

**Discussion**:

**Decision**:

**Action**:

**Outcome**:

EOF

  echo "Created session log: $session_file"
  ${EDITOR:-code} "$session_file"  # Or your editor of choice
}
```

### Session Summary Generator

Ask your AI agent to generate a summary:

```
@agent Generate a summary of this session based on our conversation. Include:
- What we were trying to accomplish
- Key decisions made and why
- What was built/changed
- Any blockers or open questions
- Next steps

Format it as a session log entry using the session-log skill template.
```

## Searching Session Logs

**Find sessions by tag**:
```bash
grep -r "tags:.*authentication" .github/sessions/
```

**Find sessions working on specific files**:
```bash
grep -r "auth/session-manager.ts" .github/sessions/
```

**Find all debugging sessions**:
```bash
grep -r "status: completed" .github/sessions/ | grep "debugging"
```

**List recent sessions**:
```bash
ls -lt .github/sessions/ | head -10
```

## Integration with Agents

When creating a session-log-aware agent:

```markdown
---
name: session-logger
description: Helps create and maintain session logs for development work
tools: ['edit', 'read']
---

You are a session logging specialist. When users start or wrap up sessions:

1. **Session start**: Create a new session log file using the template
2. **During session**: Help update the log with decisions, challenges, learnings
3. **Session end**: Generate summary, mark status as completed, calculate duration
4. **Session search**: Help find relevant past sessions by tag, file, or topic

Always use the session-log skill's template and best practices.
```

## Remember

Session logs are **investments in future productivity**. They take 5-10 minutes to maintain but save hours of "why did we do this?" confusion later.

The goal isn't perfect documentation - it's **just enough context** to make future work faster and better informed.

Related Skills

summarize-session

16
from diegosouzapw/awesome-omni-skill

Summarize the current session and generate reusable Claude rules, skills, or commands.

sessions

16
from diegosouzapw/awesome-omni-skill

Agent Sessions window architecture — covers the sessions-first app, layering, folder structure, chat widget, menus, contributions, entry points, and development guidelines. Use when implementing features or fixing issues in the Agent Sessions window.

session-start

16
from diegosouzapw/awesome-omni-skill

Initialize a new mission with role selection and persona naming

session-start-routine

16
from diegosouzapw/awesome-omni-skill

Execute work session initialization routine at conversation start. Identifies new skills, researches improvements for existing skills, and updates skill library. Triggers automatically at session start.

session-retrospective

16
from diegosouzapw/awesome-omni-skill

Review the current session to extract learnings and propose improvements to CLAUDE.md files and skills. Run at the end of a session or when asked to reflect on what was learned. Routes project-specific learnings to the project CLAUDE.md, universal patterns to the global ~/.claude/CLAUDE.md, and repeated workflows to skill creation/modification proposals. Triggers include "retrospective", "session retro", "振り返って", "何を学んだ?", "セッションの学び", "what did we learn?", "improve from this session".

session-memory

16
from diegosouzapw/awesome-omni-skill

Internal skill. Use cc10x-router for all development tasks.

72-close-session-150

16
from diegosouzapw/awesome-omni-skill

[72] CLOSE. Save and restore session context between conversations. Use when ending a session to preserve progress, or starting a new session to restore context. Triggers on "save session", "end session", "preserve context", "handoff", "continue from last time", or when context window is running low.

cc-get-session-id

16
from diegosouzapw/awesome-omni-skill

Get the current Claude Code session ID. Use when you need to reference or display the session ID.

agent-sessions-layout

16
from diegosouzapw/awesome-omni-skill

Agent Sessions workbench layout — covers the fixed layout structure, grid configuration, part visibility, editor modal, titlebar, sidebar footer, and implementation requirements. Use when implementing features or fixing issues in the Agent Sessions workbench layout.

74-mid-session-save-150

16
from diegosouzapw/awesome-omni-skill

[74] CLOSE. Quick checkpoint during active work when context is running low. Use multiple times per development cycle to preserve progress and lessons. Lighter than close-session — no full handoff needed. Triggers on 'save progress', 'checkpoint', 'context low', or automatically when nearing token limits.

session-logs

16
from diegosouzapw/awesome-omni-skill

Search and analyze your own session logs (older/parent conversations) using jq.

session-log-data

16
from diegosouzapw/awesome-omni-skill

Describes the data files available in the coding agent environment after copilot-setup-steps runs. Use when analyzing downloaded session logs or aggregated usage data.