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/add-ai-feature-policy/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/add-ai-feature-policy)<a href="https://agentmods.dev/skills/phase-rs/phase/add-ai-feature-policy"><img src="https://agentmods.dev/badge/skills/phase-rs/phase/add-ai-feature-policy/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/add-ai-feature-policy"><img src="https://agentmods.dev/badge/skills/phase-rs/phase/add-ai-feature-policy.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.00081 | $0.09514 |
| Opus 5 | $0.00041 | $0.04757 |
| Sonnet 5 | $0.00016 | $0.01903 |
| Haiku 4.5 | $0.00008 | $0.00951 |
Grade A, and why
add-ai-feature-policy 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 9d 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 — 388 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Adding a Deck-Aware AI Feature + Policy
This is the authoritative checklist for adding a new feature to the three-layer AI architecture (Features → Plan → Policies). Nine features exist as reference: landfall, mana_ramp, tribal, control, aristocrats, aggro_pressure, tokens_wide, plus_one_counters, spellslinger_prowess. Each follows the same pattern; mirror it.
Before you start: Read landfall.rs (simplest), then aristocrats.rs (geometric-mean commitment with identity lookup), then one feature similar in shape to yours. Trace from features/<name>.rs::detect() through DeckFeatures::analyze and AiSession::from_game through policies/<name>.rs::verdict so the data flow is concrete.
CR Verification Rule. Every CR number in annotations MUST be verified by grepping
docs/MagicCompRules.txtBEFORE you write it. Do NOT rely on memory or prior prompts. The 701.x and 702.x sections are arbitrary sequential assignments that hallucinate consistently. Rungrep -n "^701.34" docs/MagicCompRules.txtfor every number. CR 122.1d is Stun (NOT +1/+1 — that's CR 122.1a). CR 701.27 is Transform (NOT Proliferate — that's CR 701.34). Two real catches from the existing batch — you will have similar misses unless you grep.
1. Architecture (memorize this)
AiSession (per-game cache; built once in AiSession::from_game)
├─ features: HashMap<PlayerId, DeckFeatures> ← Layer 1: structural detection
├─ plan: HashMap<PlayerId, PlanSnapshot> ← Layer 2: bottoming + curve schedule
├─ deck_profile / strategy: per-player strategic profiles
├─ synergy: HashMap<PlayerId, SynergyGraph>
└─ memory: PolicyMemory
DeckFeatures
├─ landfall: LandfallFeature
├─ mana_ramp: ManaRampFeature
├─ tribal: TribalFeature
├─ control: ControlFeature
├─ aristocrats: AristocratsFeature
├─ aggro_pressure: AggroPressureFeature
├─ tokens_wide: TokensWideFeature
├─ plus_one_counters: PlusOneCountersFeature
├─ spellslinger_prowess: SpellslingerProwessFeature
└─ <your new feature>
Policies (Layer 3)
├─ TacticalPolicy — in-game decisions (CastSpell, ActivateAbility, DeclareAttackers, ...)
└─ MulliganPolicy — pre-game hand evaluation (sibling trait)
Both run inside their respective registries (`PolicyRegistry::default`,
`MulliganRegistry::default`). Activation is the single multiplicative knob.
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.
- 9d ago First seen · 388 lines · 81 tokens per session scan A daa0278e52bf
add-ai-feature-policy is a skill published in the GitHub repository phase-rs/phase (269 stars, last pushed today), licensed Apache-2.0. It adds 81 tokens to every session and 9,514 once invoked, about $0.0004 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
critic-contract
Shared read-side contract every read-only CRITIC imports — adversarial stance, empirical verification of runtime-behavior claims, the mandatory self-red-team before APPROVE, how a finding is stated (quote the span, take the UNKNOWN escape hatch) and held (only new evidence moves a severity, never pushback), spec-UB…
code-quality
Shared clean-code / DRY / KISS / YAGNI standards and stack-specific smells for the React 19 + TypeScript + Rust (Tauri 2) monorepo. Library consumed by the code-quality-reviewer and code-quality-author agents.
review-workflow
The implement→review flow under the ≤3-reviewer budget with the conditional test stage. Use for /implement-feature, /fix-bug, /refactor-module and any change that needs structured review.
anarlog
Query Anarlog meetings, notes, summaries, transcripts, participants, action items, and recurring history. 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.