Skip to content
Back to skills

Session Summary

ASecurity

Use when you need to generate or view a session summary from work tracker logs.

  • 8 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 28, 2026
ai-agentsbashnodegit

Works with

  • claude code

Security analysis

A100/100

Scanned May 28, 2026

npx -y skills add seokan-jeong/team-shinchan --skill session-summary --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Session Summary?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Session Summary
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/seokan-jeong-session-summary/badge)](https://www.skillsdirectory.com/skills/seokan-jeong-session-summary)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: team-shinchan:session-summary
description: Use when you need to generate or view a session summary from work tracker logs.
user-invocable: false
---

# Session Summary Skill

**Generate a quantitative session summary from work tracker data.**

## Usage

```bash
/team-shinchan:session-summary                          # Current session
/team-shinchan:session-summary --session session-xxx    # Specific session
```

## Arguments

| Arg | Default | Description |
|-----|---------|-------------|
| `--session {id}` | current | Session ID to summarize (defaults to `.shinchan-docs/.session-id`) |

## Process

### Step 1: Resolve Session ID

- If `--session` provided, use that ID
- Otherwise, read `.shinchan-docs/.session-id` for the current session ID
- If no session ID found:
  ```
  No active session found. Use --session {id} to specify one.
  Available sessions can be found via: /team-shinchan:work-log
  ```

### Step 2: Read and Filter Events

1. Read `.shinchan-docs/work-tracker.jsonl`
   - If file does not exist:
     ```
     No work tracker log found.
     Events will be recorded automatically during Claude Code sessions.
     ```
2. Parse each line as JSON: `{"ts", "type", "agent", "session", "data"}`
3. Filter events where `event.session` matches the target session ID
4. If zero events match:
   ```
   No events found for session {id}.
   ```

### Step 3: Compute Metrics

From the filtered session events, calculate:

| Metric | How |
|--------|-----|
| **Duration** | First event `ts` to last event `ts`. Format as `{start} - {end} ({N} minutes)` |
| **Agents invoked** | Count unique non-null `agent` values from `agent_start` events. Build `{agent: count}` map. |
| **Files changed** | Count events where `type === "file_change"`. Deduplicate by `data.file` path. |
| **Delegations** | Count events where `type === "delegation"`. |
| **Events total** | Total count of all filtered events. |

### Step 3.5: Git Metrics

Run git metrics to include development activity in the summary:

```bash
node ${CLAUDE_PLUGIN_ROOT}/src/analytics.js --git --format table
```

Append to summary output:

```
Git Activity:
  Commits today: {N}
  Lines: +{added} / -{deleted}
  Files changed: {N}
  Test ratio: {N}%
  Hotspot files: {top 3 files}
```

Include in saved SESSION_SUMMARY.md as:

```markdown
## Git Activity
| Metric | Value |
|--------|-------|
| Commits today | {N} |
| Lines changed | +{added} / -{deleted} |
| Files changed | {N} |
| Test ratio | {N}% |
| Hotspot files | {file1}, {file2}, {file3} |
```

### Step 4: Build and Display Summary

Display the summary in console AND save to file.

**Console output:**
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Session Summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Session: {session_id}
Duration: {start_time} - {end_time} ({N} minutes)
Agents invoked: {count} ({agent: count, ...})
Files changed: {count}
Delegations: {count}
Events total: {count}

Agent Activity:
| Agent | Invocations | Last Action |
|-------|-------------|-------------|
| {agent} | {count} | {last event summary} |

Key Events:
- {HH:MM}: {type} - {description}
...

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```

### Step 5: Save to File

Determine output path:
- If active workflow exists (`.shinchan-docs/*/PROGRESS.md` with `status: active`): `.shinchan-docs/{doc_id}/SESSION_SUMMARY.md`
- Otherwise: `.shinchan-docs/SESSION_SUMMARY.md`

Write the summary using the same markdown template as `hooks/session-wrap.md`:

```markdown
# Session Summary
- **Session**: {session_id}
- **Duration**: {start_time} - {end_time} ({N} minutes)
- **Agents invoked**: {count} ({agent: count, ...})
- **Files changed**: {count}
- **Delegations**: {count}
- **Events total**: {count}

## Agent Activity
| Agent | Invocations | Last Action |
|-------|-------------|-------------|
| {agent} | {count} | {last event summary} |

## Key Events
- {HH:MM}: {type} - {description}
```

Confirm:
```
Summary saved to {output_path}
```

## Important

- This skill uses the same logic as the `session-wrap` Stop hook but is user-triggered
- Log file: `.shinchan-docs/work-tracker.jsonl`
- Session IDs tracked via `.shinchan-docs/.session-id`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.