Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

azure-storage-loader

БесплатноБез исполняемых скриптовНе проверен

Load token usage data from Azure Table Storage for faster iteration and analysis in chat conversations

rajbosот rajbos★ 127 звёзд на GitHub

Об этом скилле

Azure Storage Loader Skill

This skill enables you to load actual token usage data from Azure Table Storage into your chat conversations. This allows for faster iteration when analyzing usage patterns, testing queries, or debugging issues without needing to sync data from local session files.

Overview

The AI Engineering Fluency extension can sync token usage data to Azure Table Storage. This skill provides helper scripts to:

  • Query and fetch data from Azure Storage Tables
  • Load data into a usable format for chat analysis
  • Authenticate using Azure credentials (Entra ID or Shared Key)
  • Filter data by date range, dataset, model, workspace, or user

When to Use This Skill

Use this skill when you need to:

  • Analyze actual usage data patterns without manual export
  • Test query logic against real data
  • Debug backend sync issues with live data
  • Perform ad-hoc analysis of token usage across teams
  • Validate data transformations or aggregations
  • Quickly iterate on data analysis tasks in chat

Prerequisites

Before using this skill, ensure you have:

  • Azure Storage account with token usage data already synced
  • Azure credentials configured (either Entra ID or Shared Key)
  • Node.js installed for running helper scripts
  • Access to the storage account and table (read permissions minimum)

Azure Table Storage Schema

The extension stores daily aggregate data in Azure Tables with the following schema:

Table Name

Default: usageAggDaily (configurable via aiEngineeringFluency.backend.aggTable)

Entity Structure

Partition Key: ds:{datasetId}|d:{YYYY-MM-DD}

  • Groups entities by dataset and day for efficient queries

Row Key: m:{model}|w:{workspaceId}|mc:{machineId}|u:{userId}

  • Unique identifier for each model/workspace/machine/user combination

Fields:

  • schemaVersion (number): Schema version for compatibility
  • datasetId (string): Logical dataset identifier
  • day (string): Date in YYYY-MM-DD format
  • model (string): AI model name (e.g., "gpt-4", "claude-3-5-sonnet-20241022")
  • workspaceId (string): Workspace identifier (sanitized)
  • workspaceName (string, optional): Human-readable workspace name
  • machineId (string): Machine identifier (sanitized)
  • machineName (string, optional): Human-readable machine name
  • userId (string, optional): User identifier (if team sharing enabled)
  • userKeyType (string, optional): Type of user identifier (pseudonymous/teamAlias/entraObjectId)
  • shareWithTeam (boolean, optional): Whether data is shared with team
  • consentAt (string, optional): ISO timestamp of consent
  • inputTokens (number): Total input tokens for this dimension
  • outputTokens (number): Total output tokens for this dimension
  • interactions (number): Total interactions count
  • updatedAt (string): ISO timestamp of last update

Sanitization Rules

Azure Tables disallow certain characters in PartitionKey/RowKey: /, \, #, ? These are replaced with _ by the sanitizeTableKey() function in src/backend/storageTables.ts.

Authentication Methods

Option 1: Entra ID (Recommended)

Uses DefaultAzureCredential for authentication:

  • Azure CLI: az login
  • VS Code: Sign in via Azure extension
  • Environment variables: AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET
  • Managed Identity (when running in Azure)

Required RBAC Roles:

  • Storage Table Data Reader (read-only)
  • Storage Table Data Contributor (read/write)

Option 2: Shared Key

Uses account access key stored in VS Code SecretStorage:

  • Set via command: "AI Engineering Fluency: Set Backend Storage Shared Key"
  • Does not sync across devices
  • Requires account key from Azure Portal

Helper Script: load-table-data.js

Purpose

Fetch token usage data from Azure Table Storage and output as JSON for analysis.

Usage

# Navigate to skill directory
cd .github/skills/azure-storage-loader

# Install dependencies (first time only)
pnpm install

# Load data with Entra ID auth
node load-table-data.js \
  --storageAccount "youraccount" \
  --tableName "usageAggDaily" \
  --datasetId "default" \
  --startDate "2026-01-01" \
  --endDate "2026-01-30"

# Load data with Shared Key auth: the key is read from the AZURE_STORAGE_KEY
# environment variable only (never pass it on the command line). Do not type
# the key into a command either: that puts it in shell history and transcripts.
# Read it with a silent prompt (input is not echoed) ...
read -rs AZURE_STORAGE_KEY && export AZURE_STORAGE_KEY
# ... or have Azure CLI / your secret manager inject it without printing it:
#   export AZURE_STORAGE_KEY="$(az storage account keys list --account-name youraccount --query '[0].value' -o tsv)"
# PowerShell: $env:AZURE_STORAGE_KEY = Read-Host -MaskInput 'Storage key'
node load-table-data.js \
  --storageAccount "youraccount" \
  --tableName "usageAggDaily" \
  --datasetId "default" \
  --startDate "2026-01-01" \
  --endDate "2026-01-30"

# Filter by specific model
no
Полный SKILL.md на GitHub

Установить azure-storage-loader в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл azure-storage-loader?

Load token usage data from Azure Table Storage for faster iteration and analysis in chat conversations

Как установить скилл azure-storage-loader?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл azure-storage-loader запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить azure-storage-loader с