Skip to main content
skill CX Codex

session-info — Claude Code skill: what it does, how to install

session-info returns the active Claude Code session UUID and session chain cache details. Helpful for debugging and linking transcripts to sessions.

MIT 127 installs ★ 3 updated 2026-10-25

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add terrylica/cc-skills --skill session-info -a claude-code
Open on GitHub

What session-info does

This skill invokes a TypeScript script via bun located in the statusline-tools plugin directory. It inspects local configuration files and returns the active Claude Code session UUID, short ID, project folder, registry path, chain length, and timestamp.

Sections for model name, token cost, and repository metadata are not yet implemented in get-session-info.ts. The script parses .session-chain-cache.json under ~/.claude/projects/, where forward slashes in directory paths turn into hyphens.

Execution fails if Bun is missing from your environment. A fresh project will show a chain length of zero until multiple sessions accumulate.

What it helps with

  • retrieve the current Claude Code session UUID and short ID
  • check session chain length for the active project
  • locate the project .session-chain-cache.json file
  • link debugging logs and transcripts to the right session

Example prompts for the agent

  • What is the current session UUID?
  • Show session id and chain cache status
  • Check which session is currently active

How to install session-info

1Skills CLI (Vercel)

npx skills add terrylica/cc-skills --skill session-info -a claude-code

2Manually: put the files in place

~/.claude/skills/session-info/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/session-info/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about session-info

How to install session-info in Claude Code?

Run npx skills add terrylica/cc-skills --skill session-info -a claude-code.

What does session-info do?

It reads Claude Code local project cache files using Bun and displays session identifiers alongside chain registry status.

What dependencies does session-info need?

It requires the Bun runtime installed locally, an active Claude Code session, and read permissions for ~/.claude.

Source text

SKILL.md · MIT
---
name: session-info
description: Get current Claude Code session UUID and registry info. TRIGGERS - current session, session uuid, session id, what session, which session.
allowed-tools: Bash, Read
---

> **Navigation**: [Plugin CLAUDE.md](../../CLAUDE.md) | [Root CLAUDE.md](../../../../CLAUDE.md)

# Session Info Skill

Returns the current Claude Code session UUID and registry information.

> **Self-Evolving Skill**: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.

## When to Use This Skill

Use this skill when:

- Need to know the current session UUID for debugging
- Want to check the session chain history
- Verify the session registry is working
- Find correlation between sessions and transcripts

## Implementation

Run the session info script:

```bash
bun $HOME/.claude/plugins/marketplaces/cc-skills/plugins/statusline-tools/scripts/get-session-info.ts
```

## Output Format

The script outputs structured session information:

```
Current Session: c1c1c149-1abe-45f3-8572-fd77aa046232
Short ID: c1c1c149
Project: ~/.claude
Registry: ~/.claude/projects/-Users-you--claude/.session-chain-cache.json
Chain Length: 3 session(s)
Last Updated: 2026-01-15T21:30:00.000Z
```

> **Note**: The `Managed By`, `Metadata` (Repo, Hash, Branch, Model, Cost), and `Recent Sessions` sections shown in earlier versions of this doc are **not yet implemented** in `get-session-info.ts`. The script currently outputs only the 6 fields above.

## Registry Location

The session registry follows Claude Code's native path encoding:

```
~/.claude/projects/{encoded-path}/.session-chain-cache.json
```

Where `encoded-path` replaces `/` with `-`:

- `/Users/username/eon/cc-skills` → `-Users-username-eon-cc-skills`

## References

- [Registry Format](./references/registry-format.md) - Schema documentation

---

## Troubleshooting

| Issue                     | Cause                      | Solution                                         |
| ------------------------- | -------------------------- | ------------------------------------------------ |
| Script not found          | Plugin not installed       | Run `claude plugin list` to verify installation  |
| JSONL ID undefined        | No active session          | Start Claude Code session first                  |
| Registry file not found   | First session in project   | Registry created automatically on first session  |
| Chain length is 0         | Fresh project              | Normal for new projects, chain grows over time   |
| Path encoding looks wrong | Special characters in path | Claude Code uses `-` to replace `/` in paths     |
| Bun not found             | Bun not installed          | Install with `brew install oven-sh/bun/bun`      |
| Permission denied         | Registry file permissions  | Check ~/.claude permissions (should be readable) |

## Post-Execution Reflection

After this skill completes, check before closing:

1. **Did the command succeed?** — If not, fix the instruction or error table that caused the failure.
2. **Did parameters or output change?** — If the underlying tool's interface drifted, update Usage examples and Parameters table to match.
3. **Was a workaround needed?** — If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround.

Only update if the issue is real and reproducible — not speculative.

© terrylica · MIT · terrylica/cc-skills

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set79

The whole set →
issue-create issue-create turns a rough description into a formatted GitHub issue: detects the type, picks labels that exist in the repo, and warns about duplicates before you post. CX Codex +1 129installs asciinema-streaming-backup asciinema-streaming-backup streams asciinema terminal recordings to an isolated GitHub orphan branch using zstd and brotli compression. CX Codex +1 128installs multi-agent-e2e-validation The multi-agent-e2e-validation skill for Claude Code and other AI editors spawns multiple validation agents in parallel to test database refactors comprehensively. CX Codex +1 128installs link-validator The link-validator skill detects absolute paths in markdown links that break when a skill is installed elsewhere. Run it before sharing a skill or after adding new links. CX Codex +1 127installs asciinema-analyzer The asciinema-analyzer skill searches asciinema text recordings for keywords, commands, errors, and patterns. Use it when reviewing terminal session history. CX Codex +1 127installs research-archival research-archival scrapes AI research conversations and web pages, saves them as markdown with YAML frontmatter, and opens cross-referenced GitHub issues once the writing account is confirmed. CX Codex +1 127installs iterm2-layout iterm2-layout configures iTerm2 workspace layouts, panes, and tabs using a TOML file. Helps an AI agent register project directories and auto-discover git worktrees. CX Codex +1 126installs asciinema-player asciinema-player — a skill for Claude Code and five other platforms that plays .cast terminal recordings inside a dedicated iTerm2 window. Files over 100 MB crash browser players; this skill streams them from disk. CX Codex +1 126installs

Project sponsors

Companies that keep this analytics open