Skip to content

Add azure-storage-loader skill for querying token usage data from Azure Tables#162

Merged
rajbos merged 6 commits intomainfrom
copilot/add-agent-skill-load-table-data
Jan 31, 2026
Merged

Add azure-storage-loader skill for querying token usage data from Azure Tables#162
rajbos merged 6 commits intomainfrom
copilot/add-agent-skill-load-table-data

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

Enables loading actual token usage data from Azure Table Storage directly into chat conversations for rapid analysis and iteration without manual exports.

Implementation

New skill: .github/skills/azure-storage-loader/

  • load-table-data.js - CLI tool for querying Azure Tables with date range and dimension filters (model, workspace, user). Outputs JSON/CSV to stdout or file.
  • SKILL.md - Complete Azure Tables schema reference, authentication patterns (Entra ID/Shared Key), OData filtering, troubleshooting.
  • example-usage.js - Demonstrates data loading and aggregation patterns.

Usage

node load-table-data.js \
  --storageAccount myaccount \
  --startDate 2026-01-01 \
  --endDate 2026-01-31 \
  --model gpt-4o \
  --output usage.json

Supports DefaultAzureCredential (az login, env vars, managed identity) and shared key authentication. Validates inputs to prevent OData filter injection.

Schema Reference

Entities use partition key ds:{datasetId}|d:{YYYY-MM-DD} and row key m:{model}|w:{workspaceId}|mc:{machineId}|u:{userId} for efficient date-range queries.

Original prompt

Adda new agent skill that will load the table data from the azure storage so we can run the rest of the chat conversation with the actual data for faster iterating.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits January 30, 2026 19:33
- Created comprehensive SKILL.md documentation
- Implemented load-table-data.js helper script with Entra ID and Shared Key auth
- Added package.json for skill dependencies
- Created README and .gitignore for skill directory
- Updated main skills README to include new skill
- Script supports filtering by date range, model, workspace, and user
- Outputs JSON or CSV format to stdout or file

Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
- Created example-usage.js demonstrating data loading and analysis
- Shows model breakdown, daily usage, and workspace analytics
- Includes usage instructions and error handling
- Updated README to reference example script

Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
- Improved sanitizeTableKey regex escaping with explanatory comments
- Enhanced OData filter validation to prevent injection issues
- Fixed argument parsing to validate values and reject missing/invalid args
- Updated example-usage.js to use os.tmpdir() for cross-platform compatibility
- Fixed CSV format example in SKILL.md to match actual output
- Updated Microsoft documentation URLs to use learn.microsoft.com domain

Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
Copilot AI changed the title [WIP] Add agent skill to load table data from Azure storage Add azure-storage-loader skill for querying token usage data from Azure Tables Jan 30, 2026
@rajbos rajbos marked this pull request as ready for review January 31, 2026 17:39
@rajbos rajbos merged commit c5d7006 into main Jan 31, 2026
17 checks passed
@rajbos rajbos deleted the copilot/add-agent-skill-load-table-data branch January 31, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments