Skip to content
Back to skills

Sessions

ASecurity

Use when the user wants to see active Tandem sessions, inspect session details, clean orphaned sessions, or understand which sessions share a project.

  • 6 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 26, 2026
toolsgobash

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add jonny981/claude-tandem --skill sessions --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sessions?

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

Security grade badge for Sessions
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jonny981-sessions/badge)](https://www.skillsdirectory.com/skills/jonny981-sessions)

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
---
description: "Use when the user wants to see active Tandem sessions, inspect session details, clean orphaned sessions, or understand which sessions share a project."
---

# Tandem Sessions

Inspect the session registry at `~/.tandem/sessions/`.

## Steps

1. **List all session directories** under `~/.tandem/sessions/`. For each, read `state.json` and display:
   - Session ID
   - Project (basename of project path)
   - Branch
   - Status (active/ended)
   - Current task
   - Last heartbeat (and how long ago)
   - PID (and whether it's still alive: `kill -0 $pid`)

2. **Group by project** to show topology: which sessions share a project.

3. **Identify orphans**: sessions where the PID is dead or heartbeat is older than 5 minutes with a dead process. Offer to clean them up (delete the session directory) if found.

## Output format

```
Active Sessions:
  jonnyn-cv (2 sessions)
    abc123  main  "building session topology"  heartbeat: 30s ago  pid: 12345 ✓
    def456  main  "fixing CSS layout"          heartbeat: 2m ago   pid: 12346 ✓

  claude-tandem (1 session)
    ghi789  main  "adding frontmatter schema"  heartbeat: 1m ago   pid: 12347 ✓

Orphaned Sessions:
  jkl012  jonnyn-cv  pid: 99999 ✗ (dead)  last heartbeat: 15m ago
  → Clean up? (delete ~/.tandem/sessions/jkl012/)
```

## Arguments

- No arguments: show all sessions
- `clean`: force-clean all orphaned sessions without prompting
- `<session-id>`: show detailed state.json for a specific session

## Implementation

Use bash to read `~/.tandem/sessions/*/state.json` files. Check PIDs with `kill -0`. Calculate heartbeat age from the ISO timestamp. No external dependencies beyond jq.

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.

Comments

Loading comments…

Newsletter

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