consulting-adrs
Check a design, change, pull request, plan, or threat model against Bitwarden's Architecture Decision Records (ADRs), or locate…
Locates, lists, filters, and extracts structured data from Claude Code native session logs. Supports both single and multiple session analysis.
$ npx -y skills add bitwarden/ai-plugins --skill extracting-session-data --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/extracting-session-dataContext preview
The summary Claude sees to decide when to auto-load this skill.
Locates, lists, filters, and extracts structured data from Claude Code native session logs. Supports both single and multiple session analysis.
name: extracting-session-data description: Locates, lists, filters, and extracts structured data from Claude Code native session logs. Supports both single and multiple session analysis.
Provide raw access to Claude Code session logs stored in `~/.claude/projects/{project-dir}/{session-id}.jsonl`.
**Key Principle**: This skill extracts data only - return raw data to calling skills for analysis. Do not analyze or interpret within this skill.
All scripts located in `scripts/` subdirectory relative to this skill.
Find log directory or specific session file path.
# Get logs directory for current working directory scripts/locate-logs.sh # Get logs directory for specific project scripts/locate-logs.sh /path/to/project # Get specific session log file path scripts/locate-logs.sh /path/to/project abc123-session-id
**Use when**: Building dynamic paths, verifying logs exist before processing.
Enumerate all sessions with metadata (ID, size, lines, date, branch).
# List all sessions (table format) scripts/list-sessions.sh # JSON output scripts/list-sessions.sh --format json # Sort by size or lines scripts/list-sessions.sh --sort size scripts/list-sessions.sh --sort lines # Specific project scripts/list-sessions.sh /path/to/project
**Output formats**: `table`, `json`, `csv` **Sort options**: `date`, `size`, `lines`
**Use when**: Starting retrospective, showing available sessions to user, checking for recent sessions.
Parse JSONL logs and extract specific data types.
**Available extraction types**:
# Extract from specific session scripts/extract-data.sh --type statistics --session SESSION_ID scripts/extract-data.sh --type errors --session SESSION_ID scripts/extract-data.sh --type tool-usage --session SESSION_ID # Extract from all sessions (omit --session) scripts/extract-data.sh --type statistics # Limit output scripts/extract-data.sh --type user-prompts --limit 10 # Different project scripts/extract-data.sh --type metadata --project /path/to/project
**Use when**: Need specific data without loading entire log, generating metrics, identifying errors.
Find sessions matching criteria.
**Filter options**:
**Output formats**: `list`, `paths`, `json`
# Recent sessions scripts/filter-sessions.sh --since "2 days ago" # Large sessions with errors scripts/filter-sessions.sh --min-lines 500 --has-errors # Sessions on main branch in last week scripts/filter-sessions.sh --branch main --since "7 days ago" # Sessions containing keyword scripts/filter-sessions.sh --keyword "authentication" # Get paths only (for piping) scripts/filter-sessions.sh --since "1 day ago" --format paths
**Use when**: User requests analysis of recent sessions, finding sessions for specific feature/branch, identifying problematic sessions.
# 1. Verify session exists and get metadata scripts/extract-data.sh --type metadata --session SESSION_ID # 2. Get session statistics (to determine size) scripts/extract-data.sh --type statistics --session SESSION_ID # 3. Extract specific data as needed scripts/extract-data.sh --type errors --session SESSION_ID scripts/extract-data.sh --type tool-usage --session SESSION_ID
# 1. Filter to find relevant sessions
scripts/filter-sessions.sh --since "7 days ago" --branch main
# 2. Extract data from all filtered sessions
scripts/extract-data.sh --type statistics
# 3. Or iterate through filtered subset
SESSIONS=$(scripts/filter-sessions.sh --has-errors --format paths)
for session in $SESSIONS; do
SESSION_ID=$(basename "$session" .jsonl)
scripts/extract-data.sh --type errors --session $SESSION_ID
doneWhen another skill (like retrospecting) needs session data:
1. **Discovery**: Use `list-sessions.sh` or `filter-sessions.sh` to find relevant sessions 2. **Size Check**: Use `extract-data.sh --type statistics` to determine session complexity 3. **Targeted Extraction**: Use `extract-data.sh` with specific types for needed data 4. **Return Raw Data**: Return extracted data to caller for analysis
**Example**:
# Get latest session ID
LATEST=$(scripts/list-sessions.sh --format json --sort date | jq -r '.[0].sessionId')
# Check size before processing
STATS=$(scripts/extract-data.sh --type statistics --session $LATEST)
LINE_COUNT=$(echo "$STATS" | grep "Total Lines:" | awk '{print $3}')
# Extract based on size
if [ "$LINE_COUNT" -lt 500 ]; then
# Small session: extract detail
scripts/extract-data.sh --type errors --session $LATEST
scripts/extract-data.sh --type tool-usage --session $LATEST
else
# Large session: summary only
scripts/extract-data.sh --type statistics --session $LATEST
fi**CRITICAL: This skill is designed for context efficiency**
# GOOD
A curated collection of plugins for AI-assisted development at Bitwarden. Enables discovery and distribution of quality-controlled plugins for use with Claude Code.
Check a design, change, pull request, plan, or threat model against Bitwarden's Architecture Decision Records (ADRs), or locate…
Use when the user provides a single Jira issue key and asks whether it is still relevant, still applicable, still pending, still…
File Jira work items that stand on their own, with real ticket titles, acceptance criteria in whatever field the target project…
Use whenever the user mentions a Jira issue key and wants more than a surface-level lookup — "Read PROJ-123", "What's PROJ-123…
Use when the user is addressing pull request review comments locally and asks for help evaluating, implementing, or drafting…
Use this skill to validate findings during a code review. For each finding, run the rejection criteria and verification checks.…