ワンクリックで
refresh-json-data
Refresh token estimator and model pricing JSON files with latest data from AI model providers
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Refresh token estimator and model pricing JSON files with latest data from AI model providers
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Find all hardcoded path-to-editor-name mappings in the CLI (cli/src/analysis.ts::getEditorSourceFromPath) and VS Code extension (src/workspaceHelpers.ts::getEditorTypeFromPath), verify they return matching friendly display names for the same path patterns, and confirm every CLI-returned name appears in the EDITOR_ICON_MAP in formatUtils.ts. Use after adding a new editor adapter, after CLI changes, or if JetBrains/other CLI-based consumers show raw editor keys instead of friendly names.
Validate that ~/.copilot/data.db has the required schema for session hierarchy (workspace_parent_links, workspaces, sessions tables and columns). Runs an actual today's-data query so schema regressions are caught early. Use when data.db schema changes may have broken hierarchy enrichment, or on a periodic schedule to detect breaking changes.
Find all hardcoded path-to-editor-name mappings in the CLI (cli/src/analysis.ts::getEditorSourceFromPath) and VS Code extension (src/workspaceHelpers.ts::getEditorTypeFromPath), verify they return matching friendly display names for the same path patterns, and confirm every CLI-returned name appears in the EDITOR_ICON_MAP in formatUtils.ts. Use after adding a new editor adapter, after CLI changes, or if JetBrains/other CLI-based consumers show raw editor keys instead of friendly names.
Find all model IDs referenced in local AI-coding session log files and debug logs, then compare them against the keys in src/modelPricing.json. Reports models found in logs that have no pricing entry (unknown — informational only) and pricing entries never observed locally (unused). Use after adding a new model to modelPricing.json, after seeing unexpected cost attributions, or to discover which new models have appeared in recent sessions. Depends on file discovery patterns from the validate-session-schemas skill.
Loop over recent local AI-coding session log files for every supported file-based platform (Copilot Chat, Copilot CLI, JetBrains, Claude Code, Gemini CLI, Antigravity, OpenCode) and validate they still match the documented schema, while surfacing newly-discovered fields we could start using. Use after an editor/CLI update, when adding a parser, or on a schedule to catch schema drift early.
Validate that ~/.copilot/data.db has the required schema for session hierarchy (workspace_parent_links, workspaces, sessions tables and columns). Runs an actual today's-data query so schema regressions are caught early. Use when data.db schema changes may have broken hierarchy enrichment, or on a periodic schedule to detect breaking changes.
| name | refresh-json-data |
| description | Refresh token estimator and model pricing JSON files with latest data from AI model providers |
This skill helps you update the token estimation ratios and model pricing data in the Copilot Token Tracker extension.
The extension uses two JSON data files that need periodic updates:
These files are located in src/ directory and are bundled into the extension at build time.
Use this skill when you need to:
Before updating these files, ensure you have:
src/tokenEstimators.json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Character-to-token ratio estimators for different AI models.",
"estimators": {
"model-name": 0.25
}
}
Research token ratios for new or updated models:
Add or update entries in the estimators object:
"new-model-name": 0.25
Common model families and their ratios:
Validation:
src/modelPricing.json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Model pricing data - costs per million tokens",
"metadata": {
"lastUpdated": "YYYY-MM-DD",
"sources": [
{
"name": "Provider Name",
"url": "https://pricing-url",
"retrievedDate": "YYYY-MM-DD"
}
],
"disclaimer": "..."
},
"pricing": {
"model-name": {
"inputCostPerMillion": 1.25,
"outputCostPerMillion": 10.0,
"category": "Model category"
}
}
}
Check official pricing pages:
Update pricing entries in the pricing object:
"model-name": {
"inputCostPerMillion": 1.25,
"outputCostPerMillion": 10.0,
"category": "Provider models"
}
Update metadata:
metadata.lastUpdated to current date (YYYY-MM-DD format)Pricing guidelines:
Validation:
After updating the JSON files:
Validate JSON syntax:
# Check JSON is valid
node -e "require('./src/tokenEstimators.json')"
node -e "require('./src/modelPricing.json')"
Rebuild the extension:
npm run compile
Validate with the automated test suite (do not launch VS Code or the Extension Development Host — that is a manual, human-only debugging step; see .github/copilot-instructions.md):
npm run test:node
Review changes:
git diff src/tokenEstimators.json
git diff src/modelPricing.json
Stage the files:
git add src/tokenEstimators.json src/modelPricing.json
Commit with descriptive message:
git commit -m "Update model pricing and token estimators
- Updated pricing for [model names]
- Added support for [new models]
- Refreshed data from provider APIs as of [date]"
Push and create PR:
git push origin your-branch-name
esbuild.jsnpm run compile after changessrc/README.md for additional detailsJSON validation errors:
Build failures after update:
Extension not loading updated data:
npm run compilenpm run test:node passes# 1. Update src/tokenEstimators.json and src/modelPricing.json with new data
# 2. Validate JSON syntax
node -e "require('./src/tokenEstimators.json')" && echo "tokenEstimators.json: OK"
node -e "require('./src/modelPricing.json')" && echo "modelPricing.json: OK"
# 3. Rebuild the extension
npm run compile
# 4. Run the automated test suite
npm run test:node
# 5. Commit changes
git add src/tokenEstimators.json src/modelPricing.json
git commit -m "Update model pricing data for 2026-01"
git push origin update-model-data
The extension reads these files at compile time via:
import tokenEstimatorsData from './tokenEstimators.json';
import modelPricingData from './modelPricing.json';
The data is then used in the CopilotTokenTracker class:
tokenEstimators - Used for token estimation from character countsmodelPricing - Used for cost calculations in the details panelBoth files must maintain their structure to ensure the extension compiles and runs correctly.