---
name: context
description: Show current session state — files modified, decisions made, recent git changes, and learning entries added this session. Quick situational awareness.
user-invocable: true
---

# /context — Current Session Context

Show a snapshot of the current session state for quick situational awareness. Useful when you've lost track of what has been done, or after a context compaction.

## Steps

### 1. Session State

Read `.session/state.md` and display:
- Session start time
- Current goals
- What is completed vs in-progress vs pending
- Decisions made this session

### 2. Files Modified This Session

Read `.session/checkpoint.md` and list all files modified during this session, with timestamps.

If checkpoint.md is empty or missing, fall back to:
```bash
git diff --name-only HEAD~5
```

### 3. Recent Git Activity

```bash
# Last 10 commits
git log --oneline -10

# Uncommitted changes
git status --short
```

### 4. Learning Entries Added This Session

Check if any entries were added to the learning files during this session by comparing file modification times:

```bash
# Check if learning files were modified today
ls -la agent-learnings/*.md
```

If modified today, show the last entry from each file that was updated.

### 5. Active Agent Report

Check for any in-progress agent report:
```bash
ls -t agent-reports/*.md | head -1
```

If found, show the Status and Pipeline Summary sections.

## Output Format

```
SESSION CONTEXT
===============

Session: Started [date time], Status: [active/ended]

GOALS:
- [goal 1]
- [goal 2]

FILES MODIFIED (this session):
- [file] ([time])
- [file] ([time])

RECENT COMMITS:
- [hash] [message]
- [hash] [message]

UNCOMMITTED CHANGES:
- [file status]

LEARNINGS ADDED:
- PATTERNS.md: [last entry title, if modified today]
- MISTAKES.md: [last entry title, if modified today]
- DECISIONS.md: [last entry title, if modified today]

ACTIVE PIPELINE:
- [Report: filename, Status: IN PROGRESS/COMPLETE]
```

## Rules

- This skill is READ-ONLY — it does not modify any files
- If `.session/` does not exist, say so and suggest running `/startup`
- Show the most useful information first (goals, then files, then git)
- Keep output concise — this is a quick reference, not a full report
