Agent skill

Copilot Log Analysis

by rajbos in rajbos/ai-engineering-fluency

Analyzing GitHub Copilot session log files to extract token usage, model information, and interaction data.

MITAuto-check passedAI & LLM Engineering

Install Copilot Log Analysis

skills CLI
$ npx skills add rajbos/ai-engineering-fluency --skill copilot-log-analysis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rajbos/ai-engineering-fluency copilot-log-analysis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rajbos/ai-engineering-fluency.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/copilot-log-analysis .claude/skills/copilot-log-analysis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
copilot-log-analysis
GitHub stars
116
Token cost
~5.5k tokens
SKILL.md length
1,684 words
Files
1
Skills in repo
21
Repo updated
First seen
Licence
MIT

At a glance

Analyzing GitHub Copilot session log files to extract token usage, model information, and interaction data.

  • Works in 7 steps: Workspace Storage: {VSCode User… → Global Storage (Legacy): {VSCode User… → Copilot Chat Extension Storage: {VSCode… → …
  • Working with session files
  • SKILL.md covers Overview, Session File Discovery, Field Extraction Methods and Token Estimation Algorithm, plus 8 more sections
  • Calls node and pwsh

What it does

Copilot Log Analysis is an agent skill from rajbos/ai-engineering-fluency. Analyzing GitHub Copilot session log files to extract token usage, model information, and interaction data. Use when working with session files, understanding the extension's log analysis methods, or debugging token tracking issues.

Its SKILL.md is about 5.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering LLM observability. It works with Visual Studio Code. The repository describes itself as: Extension that shows information about the estimated token usage and more of AI in editors/CLI's. The licence is MIT.

When your agent uses it

  • Working with session files
  • Understanding the extensions log analysis methods
  • Debugging token tracking issues

Example prompts

  • “/copilot-log-analysis”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Workspace Storage: {VSCode User Path}/workspaceStorage/{workspace-id}/chatSessions/*.json
  2. Global Storage (Legacy): {VSCode User Path}/globalStorage/emptyWindowChatSessions/*.json
  3. Copilot Chat Extension Storage: {VSCode User Path}/globalStorage/github.copilot-chat/**/*.json
  4. Copilot CLI Sessions: ~/.copilot/session-state/*.jsonl
  5. JetBrains IDE Copilot Sessions: ~/.copilot/jb/{conversationId}/partition-{n}.jsonl
  6. Gemini CLI Sessions: ~/.gemini/tmp/{project}/chats/session-*.jsonl
  7. Antigravity Sessions: ~/.gemini/antigravity/brain/{session-uuid}/.system_generated/logs/transcript.jsonl

What it can do on your machine

Read from SKILL.md and the folder at commit 64b51e6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node
    • pwsh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Copilot Log Analysis loads about 5.5k tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 1,684 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~5.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from rajbos/ai-engineering-fluency at commit 64b51e6, republished under its MIT licence (© rajbos). 1,684 words, ~5,486 tokens.

Download SKILL.mdSave it as .claude/skills/copilot-log-analysis/SKILL.md (or your agent's skills folder).
name
copilot-log-analysis
description
Analyzing GitHub Copilot session log files to extract token usage, model information, and interaction data. Use when working with session files, understanding the extension's log analysis methods, or debugging token tracking issues.

Copilot Log Analysis Skill

This skill documents the methods and approaches used by the AI Engineering Fluency extension to analyze Copilot session log files. These files contain chat sessions, token usage, and model information.

Overview

The extension analyzes two types of log files:

  • .json files: Standard VS Code Copilot Chat session files
  • .jsonl files: Copilot CLI/Agent mode sessions, JetBrains IDE Copilot Chat sessions, Claude Code sessions, Gemini CLI sessions, Antigravity sessions, and other ecosystem adapters (one JSON event per line)

Session File Discovery

Key Method: getCopilotSessionFiles()

Location: src/extension.ts (via SessionDiscovery) Helper Methods: getVSCodeUserPaths(), scanDirectoryForSessionFiles()

This method discovers session files across all VS Code variants and locations:

Supported VS Code Variants:

  • VS Code (Stable)
  • VS Code Insiders
  • VS Code Exploration
  • VSCodium
  • Cursor
  • VS Code Server/Remote

File Locations Checked:

  1. Workspace Storage: {VSCode User Path}/workspaceStorage/{workspace-id}/chatSessions/*.json
  2. Global Storage (Legacy): {VSCode User Path}/globalStorage/emptyWindowChatSessions/*.json
  3. Copilot Chat Extension Storage: {VSCode User Path}/globalStorage/github.copilot-chat/**/*.json
  4. Copilot CLI Sessions: ~/.copilot/session-state/*.jsonl
  5. JetBrains IDE Copilot Sessions: ~/.copilot/jb/{conversationId}/partition-{n}.jsonl
  6. Gemini CLI Sessions: ~/.gemini/tmp/{project}/chats/session-*.jsonl
  7. Antigravity Sessions: ~/.gemini/antigravity/brain/{session-uuid}/.system_generated/logs/transcript.jsonl

Platform-Specific Paths:

  • Windows: %APPDATA%/{Variant}/User
  • macOS: ~/Library/Application Support/{Variant}/User
  • Linux: ~/.config/{Variant}/User (respects XDG_CONFIG_HOME)
  • Remote/Server: ~/.vscode-server/data/User, ~/.vscode-server-insiders/data/User
Helper Method: getVSCodeUserPaths()

Location: src/extension.ts

Returns all possible VS Code user data paths for different variants and platforms.

Helper Method: scanDirectoryForSessionFiles()

Location: src/extension.ts

Recursively scans directories for .json and .jsonl session files.

Field Extraction Methods

Parsing and Token Accounting: parseSessionFileContent()

Location: src/sessionParser.ts

Purpose: Parses session files and returns tokens, interactions, model usage, and editor type-safe model IDs.

How it works:

  1. Accepts raw file content along with callbacks for token estimation and model detection.
  2. Supports both .json (Copilot Chat) and .jsonl (CLI/agent) formats, including delta-based JSONL streams.
  3. Counts interactions (user messages), input tokens, and output tokens while grouping by model.
  4. Uses estimateTokensFromText() (in src/extension.ts) for character-to-token estimation.
Model Detection Logic: getModelFromRequest()

Location: src/extension.ts

  • Primary: request.result.metadata.modelId
  • Fallback: parses request.result.details for known model patterns
  • Detected patterns: GPT-3.5-Turbo, GPT-4 family (4, 4.1, 4o, 4o-mini, 5, o3-mini, o4-mini), Claude Sonnet (3.5, 3.7, 4), Gemini (2.5 Pro, 3 Pro, 3 Pro Preview); defaults to gpt-4
  • Display name mapping in getModelDisplayName() adds variants such as GPT-5 family, Claude Haiku, Claude Opus, Gemini 3 Flash, Grok, and Raptor when present in metadata.modelId.
Editor Type Detection: getEditorTypeFromPath()

Location: src/extension.ts

Purpose: Determines which VS Code variant created the session file.

Detection patterns:

  • Contains /.copilot/jb/ → 'JetBrains' (must be checked BEFORE the Copilot CLI rule below since both live under ~/.copilot/)
  • Contains /.copilot/session-state/ → 'Copilot CLI'
  • Contains /code - insiders/ → 'VS Code Insiders'
  • Contains /code - exploration/ → 'VS Code Exploration'
  • Contains /vscodium/ → 'VSCodium'
  • Contains /cursor/ → 'Cursor'
  • Contains .vscode-server-insiders/ → 'VS Code Server (Insiders)'
  • Contains .vscode-server/ → 'VS Code Server'
  • Contains /code/ → 'VS Code'
  • Default → 'Unknown'

Token Estimation Algorithm

Character-to-Token Conversion: estimateTokensFromText()

Location: src/extension.ts

Approach: Uses model-specific character-to-token ratios

  • Default ratio: 0.25 (4 characters per token)
  • Model-specific ratios loaded from src/tokenEstimators.json
  • Formula: Math.ceil(text.length * tokensPerChar)

Model matching:

  • Checks if model name includes the key from tokenEstimators
  • Example: gpt-4o matches key gpt-4o

Caching Strategy

Cache Structure: SessionFileCache

Location: src/extension.ts

Stores pre-calculated tokens, interactions, model usage, and file mtime to avoid re-processing unchanged files.

Cache Methods:
  • isCacheValid(): Validates cached entry by mtime
  • getCachedSessionData(): Retrieves cached data
  • setCachedSessionData(): Stores data with FIFO eviction after 1000 files
  • clearExpiredCache(): Drops cache entries for missing files
  • getSessionFileDataCached(): Reads session content, parses via parseSessionFileContent(), and caches results

Schema Documentation

Schema Files Location

Directory: docs/logFilesSchema/

Key files:

  1. session-file-schema.json: Manual curated schema with descriptions
  2. session-file-schema-analysis.json: Auto-generated field discovery (generated by PowerShell script)
  3. README.md: Complete guide for schema analysis
  4. SCHEMA-ANALYSIS.md: Quick reference guide
  5. VSCODE-VARIANTS.md: VS Code variant detection documentation

Note: The analysis JSON file is auto-generated and may not exist in fresh clones. It is created by running the schema analysis script documented below.

Schema Analysis

See the Executable Scripts section for available utilities:

  1. get-session-files.js - Quick session file discovery
  2. diagnose-session-files.js - Detailed diagnostics
  3. analyze-session-schema.ps1 - PowerShell schema analysis

JSON File Structure (VS Code Sessions)

Primary fields used by extension:

json
{
  "requests": [
    {
      "message": {
        "parts": [
          { "text": "user message content" }
        ]
      },
      "response": [
        { "value": "assistant response content" }
      ],
      "result": {
        "metadata": {
          "modelId": "gpt-4o"
        },
        "details": "Used GPT-4o model"
      }
    }
  ]
}

Key paths:

  • Input tokens: requests[].message.parts[].text
  • Output tokens: requests[].response[].value
  • Model ID: requests[].result.metadata.modelId
  • Model details: requests[].result.details
  • Interaction count: requests.length

JSONL File Structure (Copilot CLI)

Event types:

jsonl
{"type": "user.message", "data": {"content": "..."}, "model": "gpt-4o"}
{"type": "assistant.message", "data": {"content": "..."}}
{"type": "tool.execution_start", "data": {"toolCallId": "...", "toolName": "...", "arguments": {}}}
{"type": "tool.execution_complete", "data": {"toolCallId": "...", "success": true, "result": {"content": "...", "detailedContent": "..."}}}
{"type": "session.shutdown", "data": {"modelMetrics": {"claude-opus-4.6": {"usage": {"inputTokens": 0, "outputTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0}}}}}

Key fields:

  • Event type: type
  • User input: data.content (when type: 'user.message')
  • Assistant output: data.content (when type: 'assistant.message')
  • Tool output: data.result.content or data.result.detailedContent (when type: 'tool.execution_complete')
  • Tool name for counting: data.toolName (when type: 'tool.execution_start')
  • API-accurate token counts: data.modelMetrics[model].usage (when type: 'session.shutdown') — always prefer these over estimates when available
  • Model: model (optional, defaults to gpt-4o)

JSONL File Structure (JetBrains IDE)

Location: ~/.copilot/jb/{conversationId}/partition-{n}.jsonl — one UUID-named directory per conversation, one or more partition files per conversation. Empty partition files are skipped.

Full schema documentation: docs/logFilesSchema/jetbrains-session-schema.json

Common envelope — every line is { type, data, id, timestamp, parentId }.

Event types:

jsonl
{"type":"partition.created","data":{"conversationId":"...","partitionId":1,"source":"panel","createdAt":1777552130660}}
{"type":"user.message","data":{"content":"...","turnId":"..."}}
{"type":"user.message_rendered","data":{"turnId":"...","renderedMessage":"<context>...</context><reminderInstructions>You are an agent...</reminderInstructions><userRequest>...</userRequest>"}}
{"type":"assistant.turn_start","data":{"turnId":"..."}}
{"type":"assistant.message","data":{"text":"...","thinking":{"text":"..."},"iterationNumber":1,"messageId":"..."}}
{"type":"tool.execution_start","data":{"toolCallId":"toolu_bdrk_...","toolName":"read_file","arguments":{...}}}
{"type":"tool.execution_complete","data":{"toolCallId":"...","success":true,"result":{"result":[{"type":"text","value":"..."}]}}}
{"type":"assistant.turn_end","data":{"turnId":"...","status":"success"}}

Key extraction rules (also implemented by parseJetBrainsPartition in src/jetbrains.ts):

  • Interactions: count of user.message events
  • Input tokens: estimated from user.message_rendered.data.renderedMessage (falls back to user.message.data.content)
  • Output tokens: estimated from assistant.message.data.text
  • Thinking tokens: estimated from assistant.message.data.thinking.text
  • Actual tokens: always 0 — JetBrains does not record API-side usage counts in the session file
  • Mode: presence of any tool.execution_start event ⇒ agent, otherwise ask (no edit/plan/customAgent)
  • Model: not in the file. Best-effort heuristic from toolCallId prefix (toolu_* ⇒ Anthropic Claude, call_* ⇒ OpenAI), otherwise unknown
  • First/last interaction: timestamps of the first user.message and the last assistant.turn_end (or assistant.message) event

JSONL File Structure (Antigravity)

What: Google's closed-source successor to Gemini CLI, released May 2026. An Electron-based desktop IDE backed by cloudcode-pa.googleapis.com.

Location: %USERPROFILE%\.gemini\antigravity\brain\{session-uuid}\.system_generated\logs\transcript.jsonl

Full schema documentation: docs/logFilesSchema/antigravity-session-format.md

Entry types (each line is one entry):

jsonl
{"step_index":0,"source":"USER_EXPLICIT","type":"USER_INPUT","status":"DONE","created_at":"2026-05-22T21:48:22Z","content":"<USER_REQUEST>\nuser message here\n</USER_REQUEST>\n<ADDITIONAL_METADATA>...</ADDITIONAL_METADATA>"}
{"step_index":1,"source":"SYSTEM","type":"CONVERSATION_HISTORY","status":"DONE","created_at":"2026-05-22T21:48:22Z"}
{"step_index":2,"source":"MODEL","type":"PLANNER_RESPONSE","status":"DONE","created_at":"2026-05-22T21:48:22Z","tool_calls":[{"name":"search_web","args":{"query":"..."}}]}
{"step_index":3,"source":"MODEL","type":"SEARCH_WEB","status":"DONE","created_at":"2026-05-22T21:48:23Z","content":"Search result text..."}
{"step_index":11,"source":"MODEL","type":"PLANNER_RESPONSE","status":"DONE","created_at":"2026-05-22T21:48:44Z","content":"Final answer text...","thinking":"Chain of thought..."}

Key extraction rules (implemented by AntigravityDataAccess in src/antigravity.ts):

  • Interactions: count of USER_INPUT entries (source: "USER_EXPLICIT")
  • Session title: content of first USER_INPUT, strip <USER_REQUEST> XML wrapper
  • User message: strip the <USER_REQUEST>...</USER_REQUEST> wrapper; discard everything after </USER_REQUEST> (metadata blocks)
  • Model response: content field of the last PLANNER_RESPONSE with non-empty content
  • Thinking: thinking field of any PLANNER_RESPONSE
  • Tool calls: tool_calls[].name on PLANNER_RESPONSE entries (e.g. search_web)
  • Tool results: content of SEARCH_WEB entries (and future tool result entry types)
  • Actual tokens: always 0 — no token counts in Antigravity transcripts
  • Model: not available — not stored in the transcript format
  • Session ID: the UUID directory name under brain/
  • Timestamps: created_at of first and last entries
Pricing Data

Location: src/modelPricing.json

Contains per-million-token costs for input and output:

json
{
  "pricing": {
    "gpt-4o": {
      "inputCostPerMillion": 1.75,
      "outputCostPerMillion": 14.0,
      "category": "gpt-4"
    }
  }
}
Show full SKILL.md (682 more words)Show less
Cost Calculation: calculateEstimatedCost()

Location: src/extension.ts

Formula:

  • Input cost = (inputTokens / 1_000_000) * inputCostPerMillion
  • Output cost = (outputTokens / 1_000_000) * outputCostPerMillion
  • Total cost = input cost + output cost
  • Fallback to gpt-4o-mini pricing for unknown models

Executable Scripts

This skill includes three executable scripts that can be run directly to analyze session files. Always run scripts with their appropriate command first before attempting to read or modify them.

Script 1: Quick Session File Discovery

Purpose: Quickly discover all Copilot session files on your system with summary statistics.

Location: .github/skills/copilot-log-analysis/get-session-files.js

When to use:

  • Need a quick overview of session file locations
  • Want to know how many session files exist
  • Need sample paths for manual inspection
  • Troubleshooting why session files aren't being found

Usage:

bash
# Basic output with summary statistics
node .github/skills/copilot-log-analysis/get-session-files.js

# Show all file paths (verbose mode)
node .github/skills/copilot-log-analysis/get-session-files.js --verbose

# JSON output for programmatic use
node .github/skills/copilot-log-analysis/get-session-files.js --json

What it does:

  • Scans all VS Code variants (Stable, Insiders, Cursor, VSCodium, etc.)
  • Finds files in workspace storage, global storage, and Copilot CLI locations
  • Categorizes files by location and editor type
  • Shows total counts and sample file paths

Example output:

Platform: win32
Home directory: C:\Users\YourName

VS Code installations found:
  C:\Users\YourName\AppData\Roaming\Code\User
  C:\Users\YourName\AppData\Roaming\Code - Insiders\User

Total session files found: 274

Session files by location:
  Workspace Storage: 192 files
  Global Storage (Legacy): 67 files
  Copilot Chat Extension: 6 files
  Copilot CLI: 9 files

Session files by editor:
  VS Code: 265 files
  VS Code Insiders: 9 files
Script 2: Detailed Session File Diagnostics

Purpose: Comprehensive diagnostic tool that analyzes session file structure, content, and provides debugging information.

Location: .github/skills/copilot-log-analysis/diagnose-session-files.js

When to use:

  • Debugging session file discovery issues
  • Need detailed information about session file structure
  • Investigating token counting discrepancies
  • Troubleshooting parser failures
  • Understanding session file metadata and format variations

Usage:

bash
# Basic diagnostic report
node .github/skills/copilot-log-analysis/diagnose-session-files.js

# Verbose output with all file paths and details
node .github/skills/copilot-log-analysis/diagnose-session-files.js --verbose

What it does:

  • Discovers all session files across VS Code variants
  • Reports file locations, counts, and metadata
  • Analyzes file structure (JSON vs JSONL format)
  • Validates session file integrity
  • Provides diagnostic information for troubleshooting
  • Shows file modification times and sizes
Script 3: Schema Analysis and Field Discovery

Purpose: PowerShell script that analyzes session files to discover field structures and generate schema documentation.

Location: .github/skills/copilot-log-analysis/analyze-session-schema.ps1

When to use:

  • Need to understand the complete structure of session files
  • Discovering new fields added by VS Code updates
  • Generating schema documentation
  • Understanding field variations across different VS Code versions
  • Creating or updating schema reference files

Usage:

powershell
# Analyze session files and generate schema
pwsh .github/skills/copilot-log-analysis/analyze-session-schema.ps1

# Specify custom output directory
pwsh .github/skills/copilot-log-analysis/analyze-session-schema.ps1 -OutputPath ./output

What it does:

  • Scans all discovered session files
  • Extracts and catalogs all field names and structures
  • Generates JSON schema documentation
  • Creates field analysis reports
  • Outputs to docs/logFilesSchema/session-file-schema-analysis.json
  • Documents field types, occurrences, and variations

Note: This script generates the session-file-schema-analysis.json file referenced in the Schema Documentation section below.

Usage Examples

Example 1: Finding all session files
typescript
const sessionFiles = await getCopilotSessionFiles();
console.log(`Found ${sessionFiles.length} session files`);
Example 2: Analyzing a specific session file
typescript
const filePath = '/path/to/session.json';
const stats = fs.statSync(filePath);
const mtime = stats.mtime.getTime();
const content = await fs.promises.readFile(filePath, 'utf8');

const estimate = (text: string, model = 'gpt-4o') => Math.ceil(text.length * 0.25);
const detectModel = (req: any) => req?.result?.metadata?.modelId ?? 'gpt-4o';

const parsed = parseSessionFileContent(filePath, content, estimate, detectModel);
const editorType = getEditorTypeFromPath(filePath);

console.log(`Tokens: ${parsed.tokens}`);
console.log(`Interactions: ${parsed.interactions}`);
console.log(`Editor: ${editorType}`);
console.log(`Models:`, parsed.modelUsage);
Example 3: Processing daily statistics
typescript
const now = new Date();
const todayStart = new Date(now.getFullYear(), now.getMonth(), now.getDate());
const sessionFiles = await getCopilotSessionFiles();
const estimate = (text: string, model = 'gpt-4o') => Math.ceil(text.length * 0.25);
const detectModel = (req: any) => req?.result?.metadata?.modelId ?? 'gpt-4o';

let todayTokens = 0;
for (const file of sessionFiles) {
  const stats = fs.statSync(file);
  if (stats.mtime >= todayStart) {
    const content = await fs.promises.readFile(file, 'utf8');
    const parsed = parseSessionFileContent(file, content, estimate, detectModel);
    todayTokens += parsed.tokens;
  }
}

Diagnostic Tools

Output Channel Logging

Location: Throughout src/extension.ts

Methods available:

  • log(message): Info-level logging
  • warn(message): Warning-level logging
  • error(message, error?): Error-level logging

All logs go to "AI Engineering Fluency" output channel.

Diagnostic Report Generation

Method: generateDiagnosticReport() Location: src/extension.ts

Creates comprehensive report including:

  • System information (OS, Node version, environment)
  • GitHub Copilot extension status
  • Session file discovery results
  • Token usage statistics
  • No sensitive data (code/conversations excluded)

Access via:

  • Command Palette: "Generate Diagnostic Report"
  • Details panel: "Diagnostics" button

File References

When working with log analysis, refer to these files:

  1. Main implementation: src/extension.ts

    • All field extraction methods
    • Session file discovery logic
    • Caching implementation
  2. Configuration files:

    • src/tokenEstimators.json - Token estimation ratios
    • src/modelPricing.json - Model pricing data
    • src/README.md - Data files documentation
  3. Schema documentation: docs/logFilesSchema/

    • Complete schema reference
    • Field analysis tools
    • VS Code variant information
  4. Skill resources: .github/skills/copilot-log-analysis/

    • get-session-files.js - Quick session file discovery script
    • diagnose-session-files.js - Detailed diagnostic tool
    • analyze-session-schema.ps1 - PowerShell schema analysis script
    • SKILL.md - This documentation
  5. Project instructions: .github/copilot-instructions.md

    • Architecture overview
    • Development guidelines

Common Issues and Solutions

Issue: No session files found

Solution:

  1. Run diagnostic script: node .github/skills/copilot-log-analysis/diagnose-session-files.js
  2. Check if Copilot Chat extension is active
  3. Verify user has started at least one Copilot Chat session
  4. Check OS-specific paths are correct
Issue: Token counts seem incorrect

Solution:

  1. Verify tokenEstimators.json has correct ratios for models
  2. Check if new models need to be added
  3. Review session file content to verify expected structure
  4. Check cache hasn't become stale (cache uses mtime)
Issue: Model not detected properly

Solution:

  1. Check getModelFromRequest() detection logic
  2. Review request.result.details string patterns
  3. Add new model pattern if needed
  4. Update modelPricing.json with new model

Notes

  • All file paths must be absolute
  • Token estimation is approximate (character-based)
  • Caching significantly improves performance
  • Session files grow over time as conversations continue
  • JSONL format is newer (Copilot CLI/Agent mode)
  • The extension processes files sequentially with progress callbacks

© rajbos, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/copilot-log-analysis of rajbos/ai-engineering-fluency.

Open the folder on GitHubat commit 64b51e6

Compare with similar skills

Copilot Log Analysis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Copilot Log Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Copilot Log Analysis this skillrajbos/ai-engineering-fluency116—~5.5kAutomated safety check: PassMIT
Evals Contextzgsm-ai/costrict4.4k1 repos~1.9kAutomated safety check: PassApache-2.0
Dev BumpNetis/heron102—~983Automated safety check: PassApache-2.0
Opik Python SDK Patternscomet-ml/opik22k—~684Automated safety check: PassApache-2.0
BenchAlphaLab-USTC/OhMyCode131—~941Automated safety check: PassMIT
Datadog Query Recipeslangfuse/langfuse36k—~824Automated safety check: PassCustom licence

Similar skills

  • Evals Context

    zgsm-ai/costrict

    Provides context about the CoStrict evals system structure in this monorepo.

    4.4k GitHub starsUsed in 1 repo~1.9k tokens
    AI & LLM EngineeringAuto-check passed
  • Dev Bump

    Netis/heron

    Bump Heron version via the VERSION-file SSOT. An agent skill from Netis/heron.

    102 GitHub stars~983 tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • Developer notes for working inside the Opik Python SDK: layered design, async versus blocking calls, integration styles, batching and dependency rules.

    22k GitHub stars~684 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Bench

    AlphaLab-USTC/OhMyCode

    Run OhMyCode benchmarks — score any provider/model with token tracking.

    131 GitHub stars~941 tokensUpdated 6 mo ago
    AI & LLM EngineeringAuto-check passed
  • Datadog Query Recipes

    langfuse/langfuse

    Research Langfuse production telemetry with reusable Datadog queries.

    36k GitHub stars~824 tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Linear Work Rhythm

    langfuse/langfuse

    Answer "what should I do today" for a Langfuse maintainer, from the tracker rather than from memory: which projects you lead, which owe an update before the Monday engineering weekly, what shipped…

    36k GitHub stars~3.4k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed

More from rajbos/ai-engineering-fluency

All 21 skills in this repo
  • Check Urls

    rajbos/ai-engineering-fluency

    Find all hardcoded URLs in TypeScript source files and verify they resolve (return HTTP 2xx/3xx).

    116 GitHub stars~662 tokensUpdated today
    Auto-check passed
  • Create Issue

    rajbos/ai-engineering-fluency

    Create a well-scoped GitHub issue in this repo. An agent skill from rajbos/ai-engineering-fluency.

    116 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Deduplicate Code

    rajbos/ai-engineering-fluency

    Detect copy-pasted code blocks across the shared source (vscode-extension/src, the repo-root src/, cli/src) with the dependency-free check-code-duplication.js detector, then pick one duplicate group…

    116 GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Improve Tool Families

    rajbos/ai-engineering-fluency

    Analyze coverage of the vscode-extension's tool-family definitions (DEFAULTTOOLFAMILIES in vscode-extension/src/toolFamilies.ts) against the canonical tool-name list in src/toolNames.json and/or a…

    116 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Load Cache Data

    rajbos/ai-engineering-fluency

    Load and display the last 10 cache entries as raw JSON output.

    116 GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • PR Risk Review

    rajbos/ai-engineering-fluency

    Assess the risk of a changeset (a PR, a branch, or the working tree) and classify it as low, medium, or high with a written rationale.

    116 GitHub stars~2.6k tokensUpdated today
    Auto-check passed

Questions about Copilot Log Analysis

What does Copilot Log Analysis do?

Analyzing GitHub Copilot session log files to extract token usage, model information, and interaction data. Copilot Log Analysis is an agent skill from rajbos/ai-engineering-fluency. Analyzing GitHub Copilot session log files to extract token usage, model information, and interaction data.

When should I use Copilot Log Analysis?

Copilot Log Analysis fits situations like: working with session files; understanding the extensions log analysis methods; debugging token tracking issues.

How do I install Copilot Log Analysis in Claude Code?

Run `npx skills add rajbos/ai-engineering-fluency --skill copilot-log-analysis -a claude-code`. Or copy the skill folder (.claude/skills/copilot-log-analysis in rajbos/ai-engineering-fluency) into .claude/skills/copilot-log-analysis in your project. Claude Code loads it when a task matches its description.

How do I install Copilot Log Analysis in Codex?

Run `npx skills add rajbos/ai-engineering-fluency --skill copilot-log-analysis -a codex`. Or copy the skill folder (.claude/skills/copilot-log-analysis in rajbos/ai-engineering-fluency) into .agents/skills/copilot-log-analysis in your project. Codex loads it when a task matches its description.

Can I use Copilot Log Analysis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rajbos/ai-engineering-fluency --skill copilot-log-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/copilot-log-analysis, .gemini/skills/copilot-log-analysis, .github/skills/copilot-log-analysis and .opencode/skills/copilot-log-analysis in your project.

What does Copilot Log Analysis need to run?

Going by SKILL.md and its folder, Copilot Log Analysis needs the command-line tools its instructions call (node and pwsh).

Does Copilot Log Analysis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Copilot Log Analysis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Copilot Log Analysis use?

Copilot Log Analysis is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Copilot Log Analysis use?

About 5.5k tokens (SKILL.md is roughly 22k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Copilot Log Analysis?

Skills that share tags, products or a category with Copilot Log Analysis: Evals Context (zgsm-ai/costrict, 4.4k stars), Dev Bump (Netis/heron, 102 stars), Opik Python SDK Patterns (comet-ml/opik, 22k stars) and Bench (AlphaLab-USTC/OhMyCode, 131 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Copilot Log Analysis?

rajbos (a GitHub user) maintains it in rajbos/ai-engineering-fluency, which has 116 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 8, 2026.

Source: rajbos/ai-engineering-fluency on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.