Getting it into your agent
There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.
Wrote 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.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00024 | $0.01092 |
| Sonnet 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 6d 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.
- 6d 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 (268 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. 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/.
product-update-newsletter
Draft, update, or audit a crisp, changelog-grounded Anarlog product-update newsletter in Loops (app.loops.so) for a desktop release. Use after the changelog is merged, when asked to draft, revise, or pre-send check the release announcement email.
qa-cli-mcp-api
Select and run explicitly requested, risk-based QA for Anarlog's CLI, webhooks, stdio MCP, hosted Cloud API, and remote MCP. Test only affected lanes unless comprehensive coverage is requested.
sqlite-schema-design
Design or review schemas for crates/cloudsync using SQLite Sync constraints, not generic SQLite advice. Use when adding synced tables, changing synced columns, or planning CloudSync-safe migrations.
release-new-version
Release a new desktop stable version for Anarlog. Use when asked to cut, publish, or prepare a new stable desktop release after checking and merging the changelog.