phase: Skill for Claude Code

.claude/skills/oracle-parser/SKILL.md

oracle-parser is a skill for Claude Code from phase-rs/phase. It costs 82 tokens per session (20,428 once invoked), scanned A, original, Apache-2.0.

Project instructions for a parser that turns Magic: The Gathering card text from MTGJSON into typed game abilities. MTGJSON is a structured database of card data, and the instructions define how text should be interpreted by the game engine.

In plain words
What is it for?
Use them when adding or fixing card-text patterns, handling targets and subjects, composing effects, or replacing unimplemented parser fallbacks.
Why use it?
They provide the required parsing rules and prevent new card-text support from breaking established behavior or official rules references.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

This is phase-rs/phase's own configuration. It tells Claude Code how to work on phase itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything phase configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./scripts/check-skill-doc.sh # exit 0 = doc in sync; non-zero lists drift.

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/phase-rs/phase/main/.claude/skills/oracle-parser/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/phase-rs/phase

Made for: Claude Code.

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.

agentmods badge for oracle-parser

README.md
[![agentmods](https://agentmods.dev/badge/skills/phase-rs/phase/oracle-parser/github.svg)](https://agentmods.dev/skills/phase-rs/phase/oracle-parser)
Your own site
<a href="https://agentmods.dev/skills/phase-rs/phase/oracle-parser"><img src="https://agentmods.dev/badge/skills/phase-rs/phase/oracle-parser/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.

agentmods 80×15 button for oracle-parser

Your own site · 80×15
<a href="https://agentmods.dev/skills/phase-rs/phase/oracle-parser"><img src="https://agentmods.dev/badge/skills/phase-rs/phase/oracle-parser.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 20,428 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00082 $0.20428
Opus 5.5 $0.00033 $0.08171
Sonnet 5.5 $0.00016 $0.04086
Haiku 4.5 $0.00008 $0.02043

Measured today against content hash bc223f597e9e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

oracle-parser 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 today.

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.

.claude/skills/oracle-parser/SKILL.md · 1,104 lines

How it starts

The opening of the file, as written. The whole thing — 1,104 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Oracle Parser — Single Source of Truth

The Oracle parser converts MTGJSON Oracle text into typed AbilityDefinition structs that the engine executes. This skill is the authoritative reference for all parser work.

CR Verification Rule: Every CR number you write MUST be verified by grepping docs/MagicCompRules.txt BEFORE adding it to code. See Section 8.


1. Non-Negotiable Rules

These rules are defined in CLAUDE.md and are enforced without exception. Violations will be caught in review and must be fixed before merge.

⚠ RULE ZERO: Nom Combinators Are Mandatory — No Exceptions

All new parser code MUST use nom combinators from the very first line written. This is the single most important rule in the parser codebase. It has been violated repeatedly and is now enforced as a hard gate.

NEVER write any of these for parsing dispatch:

  • find(), split_once(), contains(), starts_with() — for dispatch routing
  • if lower.starts_with("destroy ") — use tag("destroy ").parse(lower) instead
  • if lower.contains("target") — use scan_at_word_boundaries or a nom combinator instead
  • text.find(' ').map(|i| &text[..i]) — use nom take_till or take_while

ALWAYS write:

  • tag("destroy ").parse(lower)? — for known prefix dispatch
  • alt((tag("destroy "), tag("exile "))).parse(lower)? — for multi-option dispatch
  • nom_on_lower(text, lower, parser_fn) — for mixed-case text bridging to nom
  • nom_on_lower_required(text, lower, parser_fn)? — same with ? propagation
  • nom_parse_lower(lower, parser_fn) — when remainder is unused
  • scan_at_word_boundaries(text, combinator) — for multi-position phrase matching

Nom combinator reference: See nom_combinators.md in this skill directory for the complete list of nom parsers and combinators organized by module. Consult this when choosing which combinator to use.

Copy-paste patterns + the enforcement gate: When you need to translate a string-method idiom into combinators, open crates/engine/src/parser/oracle_nom/PATTERNS.md — it indexes every common shape (strip prefix, strip suffix, optional trailing clause, alternatives, word-boundary scan, delimiter split, contains-check, peek-without-consume) with copy-pasteable code. The pre-commit hook scripts/check-parser-combinators.sh actively rejects new lines containing .strip_prefix(...), .strip_suffix(...), .contains("..."), .starts_with("..."), .ends_with("..."), .split_once(...), .find("..."), or .trim_end_matches("...") against string literals inside crates/engine/src/parser/. If a use is genuinely structural (post-tokenization punctuation cleanup, TextPair dual-string stripping, runtime char scans) annotate the line // allow-noncombinator: <one-line reason> per PATTERNS.md §9. Existing offenders are grandfathered; new code is gated.

Read the full file on GitHub · 1,104 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. today Changed · +2 lines bc223f597e9e
  2. 9d ago Changed beb3148812f7
  3. 11d ago Changed · +10 lines 1a8e7475326b
  4. 14d ago Changed d360f9182b75
  5. 20d ago Changed · +1 lines f4c195d5fe24
  6. 2mo ago First seen · 1,091 lines · 82 tokens per session scan A f163aab8e5d2

Subscribe to this mod's changes

oracle-parser is a skill published in the GitHub repository phase-rs/phase (312 stars, last pushed today), licensed Apache-2.0. It adds 82 tokens to every session and 20,428 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

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.

fastrepl/anarlog · 50 tokens

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.

saeedkolivand/ai-job-hunter-app · 75 tokens

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.

saeedkolivand/ai-job-hunter-app · 45 tokens

webgl-standards

DORMANT (ADR-0017, 2026-07-20) - the TERMINAL VELOCITY scroll-film was retired and apps/landing is a static site with no GL surface; this skill is preserved for any future WebGL rebuild (conventions, verified version pins, playhead/scroll-rig/VAT/Gerstner/post-chain patterns, budgets, gate + semantic-layer machinery).…

saeedkolivand/ai-job-hunter-app · 108 tokens

agent-cli-standards

Agent-facing CLI standards — the argv-sentinel binary mode, the thin-client-over-the-bridge rule, allowlist projections, prompt-fencing third-party text, the stable machine-readable output contract, exit codes, throttling, and destructive-command operability. Load for changes under extensionbridge/agentcli.rs…

saeedkolivand/ai-job-hunter-app · 83 tokens

webgl-gate-audit

Procedures for auditing apps/landing TERMINAL VELOCITY WebGL phase gates - driving the browser to exact playhead positions across the 9 scenes, screenshot discipline, scrub + VAT determinism (scrub down THEN rewind to the same playhead -> identical frame), FPS sampling at the risk scenes, draw-call + bundle-size…

saeedkolivand/ai-job-hunter-app · 123 tokens