npx claudepluginhub wanderingstan/vibe-checkWant just this skill?
Then install: npx claudepluginhub u/[userId]/[slug]
Get the current Claude Code session ID and log file path. Use when user says "get session id", "what is my session id", "current session", "session info", or "what session is this".
This skill uses the workspace's default tool permissions.
Get Current Session ID
Purpose: Retrieve the current Claude Code session ID and log file path.
Primary Method: Use MCP Tool
The current session ID is injected into the system prompt by the vibe-check UserPromptSubmit hook on every turn, in this format:
[vibe-check] Session: <session-id> | Repo: ...
Read the session ID from that hook output, then pass it directly to mcp__vibe-check__vibe_session:
Use mcp__vibe-check__vibe_session with:
- session_id: [session ID from the hook output above]
If the hook output is not present, call with no parameters and the tool will fall back to the most recent session in the database.
The tool returns:
- Session ID
- Log file path
- Session start/end times
- Message counts
- Repository and branch information
Display the session information to the user in a clear format.
Fallback Method: Legacy Marker Technique
IMPORTANT: Only use this if the MCP tool is unavailable or fails. This is a last resort fallback.
<details> <summary>Click to expand fallback instructions</summary>Database Location
To find the database location, run:
vibe-check status
The default location is: ~/.vibe-check/vibe_check.db
Note: If the status shows no PID, vibe-check is not running and the database may be stale. Start it with vibe-check start.
Important: Use Read-Only Mode
To avoid database locks when the monitor is running, always use read-only mode:
sqlite3 "file:/path/to/vibe_check.db?mode=ro" "SELECT ..."
How the Fallback Works
This technique uses a clever workaround:
- Generate a unique marker - Create a random string that won't appear anywhere else
- Emit the marker - Output it into the conversation so vibe-check logs it
- Wait briefly - Allow time for vibe-check to process and write to the database
- Query for the marker - Search
conversation_events.event_datafor the unique string - Extract session info - Return
event_session_idandfile_namefrom the matching row
Execution Steps
Step 1: Generate and Emit Marker
Generate a unique marker string using this format:
VIBE_SESSION_MARKER_[random 16 character hex string]
Example: VIBE_SESSION_MARKER_a7f3b2c9e4d1f8a6
IMPORTANT: You MUST output this marker text directly into your response. Say something like:
Looking up session info...
Session marker: VIBE_SESSION_MARKER_a7f3b2c9e4d1f8a6
This ensures the marker gets logged by vibe-check.
Step 2: Wait for Logging
Wait 2 seconds to allow vibe-check to process and log the marker:
sleep 2
Step 3: Query the Database
Find the marker in the database:
SELECT
event_session_id,
file_name,
event_timestamp,
event_type
FROM conversation_events
WHERE event_data LIKE '%VIBE_SESSION_MARKER_[your-marker-here]%'
ORDER BY event_timestamp DESC
LIMIT 1;
Replace [your-marker-here] with the actual marker string you generated.
Step 4: Present Results
Response Format
After finding the session info, present it clearly:
Current Session Information
Session ID: abc123def456
Log File: /Users/you/.claude/projects/xyz/abc123.jsonl
Detected at: 2026-01-18 10:30:45
This session has been active since [start time if you query for it].
Complete Query Example
Here's the full query to run (substitute your marker and database path from vibe-check status):
sqlite3 "file:$HOME/.vibe-check/vibe_check.db?mode=ro" \
"SELECT event_session_id, file_name, event_timestamp FROM conversation_events WHERE event_data LIKE '%VIBE_SESSION_MARKER_abc123%' ORDER BY event_timestamp DESC LIMIT 1;"
Troubleshooting
No results found
If the marker isn't found:
- Wait longer (try 5 seconds) - vibe-check might be slow
- Check if vibe-check monitor is running:
ps aux | grep vibe-check - Verify the database exists at the expected path
- Try the alternate database location
Multiple results
The query orders by event_timestamp DESC and limits to 1, so you'll get the most recent match.
Additional Session Info
Once you have the session ID, you can get more details:
-- Get session statistics
SELECT
MIN(event_timestamp) as session_start,
MAX(event_timestamp) as session_end,
COUNT(*) as total_events,
COUNT(CASE WHEN event_type = 'user' THEN 1 END) as user_messages,
COUNT(CASE WHEN event_type = 'assistant' THEN 1 END) as assistant_messages,
git_remote_url as repository,
event_git_branch as branch
FROM conversation_events
WHERE event_session_id = '[session_id]'
GROUP BY event_session_id;
Use Cases
- Debugging: Find which session you're in when troubleshooting
- Cross-referencing: Link current conversation to database records
- Session tracking: Identify the log file for manual inspection
- Handoffs: Share session ID with another tool or person
Similar Skills
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.