Borrowing it
Nothing to install: this file belongs to phase-rs/phase. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/phase-rs/phase/main/.claude/skills/retrain-ai-weights/SKILL.mdgit clone --depth 1 https://github.com/phase-rs/phaseWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/phase-rs/phase/retrain-ai-weights)<a href="https://agentmods.dev/skills/phase-rs/phase/retrain-ai-weights"><img src="https://agentmods.dev/badge/skills/phase-rs/phase/retrain-ai-weights/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/phase-rs/phase/retrain-ai-weights"><img src="https://agentmods.dev/badge/skills/phase-rs/phase/retrain-ai-weights.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00049 | $0.02184 |
| Opus 5.5 | $0.00020 | $0.00874 |
| Sonnet 5.5 | $0.00010 | $0.00437 |
| Haiku 4.5 | $0.00005 | $0.00218 |
Grade A, and why
retrain-ai-weights scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Retrain AI Evaluation Weights
Use when the user wants to retrain AI weights from 17Lands data, add new training datasets, update learned weight values in Rust, or run CMA-ES optimization.
Architecture Overview
The AI weight system has 4 layers:
- Base weights (
EvalWeightSetincrates/phase-ai/src/eval.rs) — 9 weights × 3 game phases (early T1-3, mid T4-7, late T8+). Learned from 17Lands replay data. - Archetype multipliers (
ArchetypeMultipliersincrates/phase-ai/src/deck_profile.rs) — 5 archetypes × 9 multipliers. Scale base weights per deck type. - Keyword bonuses (
KeywordBonusesincrates/phase-ai/src/eval.rs) — 10 params for creature evaluation. - Policy penalties (
PolicyPenaltiesincrates/phase-ai/src/config.rs) — tactical policy score knobs. - AiProfile (
crates/phase-ai/src/config.rs) — 3 params (risk_tolerance, interaction_patience, stabilize_bias).
All stored in AiConfig. The CMA-ES optimizer tunes one parameter group per
run via --group eval|penalties|keywords|archetype:
eval: 9 late-gameEvalWeightsplus 3AiProfilevalues. Early/mid weights are derived from the 17Lands phase ratios.penalties: every field listed inACTIVE_POLICY_PENALTY_FIELDS.keywords: allKeywordBonusesfields.archetype: 5 archetypes x 9ArchetypeMultipliers.
Do not mix groups in one run. Compare and validate one group artifact at a time so regressions can be attributed to a specific surface.
Training Data Setup
Data location: data/17lands/ (gitignored)
Required files from 17Lands (https://www.17lands.com/public_datasets):
replay_data_public.{SET}.PremierDraft.csv— Per-turn board state snapshots. Premier Draft (Bo1) is best: largest dataset, no sideboard confounds, human-drafted decks.cards.csv— Arena card ID to mana value mapping.
To add new sets: Download CSVs and symlink or copy into data/17lands/:
ln -s ~/Downloads/replay_data_public.FDN.PremierDraft.csv data/17lands/
ln -s ~/Downloads/replay_data_public.DSK.PremierDraft.csv data/17lands/
# cards.csv only needed once (shared across sets)
ln -s ~/Downloads/cards.csv data/17lands/
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 178 lines · 49 tokens per session scan A 6cfe32185271
retrain-ai-weights is a skill published in the GitHub repository phase-rs/phase (312 stars, last pushed today), licensed Apache-2.0. It adds 49 tokens to every session and 2,184 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
rust-standards
Rust/Tauri backend standards — L0–L3 layers, centralized platform/net/error ownership, Rust-first business logic, registries, error handling. Load for changes under apps/desktop/src-tauri/src/.
tauri-standards
Tauri shell standards — the IPC 5-step capability flow, command implementation pattern, and capability/permission wiring. Load for new IPC capabilities and changes to commands.rs / tauri-client.ts / capabilities/.
anarlog
Query Anarlog meetings, notes, summaries, transcripts, participants, action items, and recurring history, or import a local recording. Use when a user asks about their Anarlog meeting data or needs meeting context for another task.
graphify-windows
Turn any folder of files into a navigable knowledge graph with community detection, an honest audit trail, and three outputs: interactive HTML, GraphRAG-ready JSON, and a plain-language GRAPHREPORT.md.
lessons
How to propose and query distilled lessons (the experiential memory). Only project-steward persists; every other agent proposes/queries. Use when you discover a durable lesson or need prior experience for the current task.
tauri-expert
Expert in Tauri framework, Rust backend, web frontend integration, and lightweight desktop applications. Use when the user mentions desktop, Rust, web, cross platform, or performance, or when the task involves Tauri Architecture, Tauri vs Electron, Core Components, or Security Features.