get-session-id
Reference for accessing session ID via ${CLAUDE_SESSION_ID} automatic substitution
What this skill does
# Get Session ID Skill
**Purpose**: The session ID is automatically available in skills and commands via `${CLAUDE_SESSION_ID}`.
**How It Works**:
- Claude Code substitutes `${CLAUDE_SESSION_ID}` with the actual session ID when loading skills
- No manual extraction or lookup required
- The session ID is also visible in context via SessionStart hooks for user reference
**When to Use This Skill**:
- Reference this documentation to understand how session IDs work
- The session ID is already available - just use `${CLAUDE_SESSION_ID}` in skill/command templates
## How Session IDs Work
Claude Code assigns a unique session ID (UUID v4) to each conversation session. This ID is used for:
- Naming conversation history files: `/home/node/.config/projects/-workspace/{session-id}.jsonl`
- Session-specific TODO list tracking
- Hook coordination across tools
- Task ownership in multi-instance scenarios
## Automatic Substitution in Skills
In skill and command markdown files, use `${CLAUDE_SESSION_ID}` directly:
```bash
# This gets auto-substituted when the skill loads
SESSION_FILE="/home/node/.config/claude/projects/-workspace/${CLAUDE_SESSION_ID}.jsonl"
cat "$SESSION_FILE" | jq -s 'length'
```
## Hooks and Scripts
Bash hooks receive the session ID via stdin JSON:
```bash
# Read stdin JSON and extract session_id
INPUT=$(cat)
SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // empty')
# Use for session-specific operations
SESSION_FILE="/home/node/.config/claude/projects/-workspace/${SESSION_ID}.jsonl"
```
## User Visibility
The session ID is injected into conversation context via two mechanisms:
- `echo-session-id.sh`: Outputs session ID at SessionStart
- `inject-session-instructions.sh`: Includes session ID in CAT instructions
Users see the session ID in system reminders at conversation start:
```
Session ID: b6933609-ab67-467e-af26-e48c3c8c129e
```
## Usage Examples
### Example 1: In Skill Templates
```bash
# Session ID is auto-substituted - no manual lookup needed
cat /home/node/.config/projects/-workspace/${CLAUDE_SESSION_ID}.jsonl | jq -s 'length'
```
### Example 2: Access Session History
```bash
# The session ID is already substituted when this runs
jq -s '[.[] | select(.type == "message")]' \
"/home/node/.config/projects/-workspace/${CLAUDE_SESSION_ID}.jsonl"
```
### Example 3: In Hook Scripts (stdin JSON)
```bash
#!/bin/bash
INPUT=$(cat)
SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // empty')
# Now use $SESSION_ID for session-specific operations
```
## Related
- **echo-session-id.sh**: Hook that outputs session ID for user visibility
- **inject-session-instructions.sh**: Hook that includes session ID in CAT instructions
- **get-history**: Skill that uses session ID to access conversation
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.