用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/SocketDev/socket-btm --skill updating-pricing命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | updating-pricing |
| description | Refresh current AI model pricing data from vendor sources and update fleet pricing constants. |
| user-invocable | true |
| allowed-tools | Skill, Read, Edit, WebFetch, Bash(node:*), Bash(git:*) |
| model | claude-haiku-4-5 |
| context | fork |
| metadata | {"internal":true} |
Re-sources the per-model token prices the fleet routes spend on, so the figure scripts/fleet/estimate-ai-cost.mts reports stays honest. Invoked directly via /update-pricing or as a phase of the updating umbrella. The snapshot date is restamped on every refresh, which is what keeps the freshness anchored to the weekly cadence rather than to a guessed timer.
updating umbrella — this is the cadence the pricing refresh rides, not a bespoke timer./update-pricing.check --all warns the pricing snapshot is stale — the pricing-data-is-current gate points here.model-pricing.json is GENERIC + PUBLIC: vendor list prices + the generic plan STRUCTURE (kind / constraint / public list price) only. An org's real budgets, usage, or subscription specifics live solely in private runtime config — never in this committed, cascaded file.scripts/fleet/update-model-pricing.mts, the same owner pattern as gen/coverage-badge.mts: the skill hands it sourced prices for one --service, the script stamps that service's date and writes canonically. The skill never hand-edits the JSON.estimate-ai-cost.mts's math is fixed; this skill only refreshes its input data.| # | Phase | Outcome |
|---|---|---|
| 1 | Read current | node scripts/fleet/update-model-pricing.mts --check — print each service's snapshot + priced models. |
| 2 | Source | Per service: WebFetch its pricingSource; if a number isn't directly available, mine the feed with node scripts/fleet/source-pricing-feed.mts --service <id> and read it off the evidence envelope. |
| 3 | Write | node scripts/fleet/update-model-pricing.mts --service <id> --prices '<json>' — restamps that service's snapshot + the doc marker. |
| 4 | Commit | chore(pricing): refresh <service> pricing snapshot to <date>. Direct-push per fleet norm. |
The snapshot/date/shape logic is owned by scripts/fleet/update-model-pricing.mts and reads the current data via loadPricing() from scripts/fleet/estimate-ai-cost.mts — the same loader the estimator and the pricing-data-is-current gate share. Pricing is per-service: each service stamps its own snapshot, so a refresh targets one --service. This skill is orchestration over those scripts; the judgment it keeps is reading the prices correctly and surfacing a fetch failure rather than writing a guess.
node scripts/fleet/update-model-pricing.mts --check
Prints each service's snapshot date, pricingSource URL, and priced model ids. No write. Use this to see the before-state and confirm which service + models need a price read.
For the service you're refreshing, WebFetch its pricingSource URL — the --check run printed it. Read off, for each model id already in that service, the input and output price in USD per million tokens (MTok). Price only the ids that exist — a new model/service is a deliberate add, not part of a refresh.
When a number isn't directly available — the page moved, is gated, or a price just changed and the doc lags — mine the multi-source feed:
node scripts/fleet/source-pricing-feed.mts --service <id>
It runs the researching-recency engine with a pricing-tuned plan and prints a compact evidence envelope (recent pricing announcements across web / hackernews / lobsters / reddit). Read the current prices off the envelope, cross-checking against the service's pricingSource.
If neither the page nor the feed yields a price, STOP: report the failure and the last-known snapshot, and do not write. A stale real snapshot is safer than a hallucinated price.
node scripts/fleet/update-model-pricing.mts --service anthropic --prices '{"claude-haiku-4-5":{"inputPerMtok":1.0,"outputPerMtok":5.0},"claude-sonnet-4-6":{"inputPerMtok":3.0,"outputPerMtok":15.0}}'
Pass the prices read in Phase 2 as a JSON object keyed by model id, with --service <id> (default anthropic) naming which service they belong to. The script stamps that service's snapshot to today, writes scripts/fleet/constants/model-pricing.json canonically (preserving each model's other fields — contextWindow / billing / suspended), and restamps the combined MODEL-PRICING-SNAPSHOT marker in docs/agents.md/fleet/skill-model-routing.md. Models you omit keep their current rates — a partial refresh never drops a model. Override that service's recorded pricingSource with --source <url> if the vendor URL changed.
git add scripts/fleet/constants/model-pricing.json docs/agents.md/fleet/skill-model-routing.md
git commit -m "chore(pricing): refresh <service> pricing snapshot to <date>"
git push origin <default-branch>
Direct-push per the fleet's Commits & PRs → Push policy rule; fall back to PR if the remote rejects. In the wheelhouse, edit template/base/ and cascade — the live scripts/fleet/ + docs/ copies are cascade-derived.
When called via /update-pricing, emit a one-line summary: the service refreshed, its snapshot date before → after, and which models were re-priced. When neither the page nor the feed yields a price (or nothing moved), say so and exit without committing.
.claude/skills/updating/SKILL.md: umbrella that calls this skill as its pricing phase..claude/skills/researching-recency/SKILL.md: the broader recency-research skill source-pricing-feed.mts builds on; use it directly when a refresh needs more than a single provider page.scripts/fleet/source-pricing-feed.mts: the feed-sourcing fallback — runs the recency engine with a per-service pricing plan when a vendor number isn't directly fetchable.scripts/fleet/estimate-ai-cost.mts: consumes model-pricing.json to compute run costs.scripts/fleet/check/pricing-data-is-current.mts: the per-service staleness gate that points here.