Command Palette

Search for a command to run...

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

refresh-json-data

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

Refresh token estimator and model pricing JSON files with latest data from AI model providers

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

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

Refresh JSON Data Skill

This skill helps you update the token estimation ratios and model pricing data in the AI Engineering Fluency extension.

Overview

The extension uses two JSON data files that need periodic updates:

  1. tokenEstimators.json - Character-to-token ratio estimators for AI models
  2. modelPricing.json - Pricing information per million tokens for various AI models

These files are located in src/ directory and are bundled into the extension at build time.

When to Use This Skill

Use this skill when you need to:

  • Add support for new AI models
  • Update token estimation ratios based on new benchmarks
  • Refresh pricing information from provider APIs
  • Keep model data current with latest releases

Prerequisites

Before updating these files, ensure you have:

  • Access to official pricing documentation from AI providers
  • Token estimation benchmarks or documentation
  • The repository cloned locally
  • Node.js and pnpm installed

Step 1: Update tokenEstimators.json

Location

src/tokenEstimators.json

Structure

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "Character-to-token ratio estimators for different AI models.",
  "estimators": {
    "model-name": 0.25
  }
}

Update Process

  1. Research token ratios for new or updated models:

    • Look at the existing ratios for that provider's other models in tokenEstimators.json and match the pattern; verify with an actual tokenizer if unsure
  2. Add or update entries in the estimators object:

    "new-model-name": 0.25
    
  3. Validation:

    • Ensure JSON syntax is valid
    • Keep ratio values between 0.20 and 0.30
    • Use consistent formatting

Step 2: Update modelPricing.json

Location

src/modelPricing.json

Structure

{
  "$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"
    }
  }
}

Update Process

  1. Check official pricing pages:

  2. Update pricing entries in the pricing object:

    "model-name": {
      "inputCostPerMillion": 1.25,
      "outputCostPerMillion": 10.0,
      "category": "Provider models"
    }
    
  3. Update metadata:

    • Set metadata.lastUpdated to current date (YYYY-MM-DD format)
    • Add or update source URLs and retrieval dates
    • Keep the disclaimer intact
  4. Pricing guidelines:

    • Costs are per million tokens
    • Input costs are typically lower than output costs
    • Group models by category (e.g., "GPT-4 models", "Claude models")
    • Verify pricing is in USD
  5. Validation:

    • Ensure JSON syntax is valid
    • Verify pricing values are positive numbers
    • Check that all required fields are present

Step 3: Build and Test

Validate JSON syntax, run pnpm run compile && pnpm run test:node (do not launch VS Code or the Extension Development Host — that is a manual, human-only debugging step; see AGENTS.md), review with git diff, then commit/push as usual.

Important Notes

  • Bundled at build time: These JSON files are bundled into the extension during compilation via esbuild.js
  • Rebuild required: Always run pnpm run compile after changes
  • Pricing disclaimer: GitHub Copilot pricing may differ from direct API usage
  • Estimation nature: Token counts are estimates based on character ratios
  • Documentation: See src/README.md for additional details

Reference Resources

  • VS Code extension development: https://code.visualstudio.com/api
  • Token estimation methodology: Character-to-token ratios based on model tokenizers
  • Cost calculation: Uses 50/50 split between input and output tokens for estimates

Troubleshooting

**Extension not

Полный SKILL.md на GitHub

Установить refresh-json-data в Claude Code и Claude Desktop

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

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

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

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

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

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

FAQ

Что делает скилл refresh-json-data?

Refresh token estimator and model pricing JSON files with latest data from AI model providers

Как установить скилл refresh-json-data?

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

Скилл refresh-json-data запускает скрипты?

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

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

Сравнить refresh-json-data с