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-trigger/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-trigger)<a href="https://agentmods.dev/skills/phase-rs/phase/add-trigger"><img src="https://agentmods.dev/badge/skills/phase-rs/phase/add-trigger/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-trigger"><img src="https://agentmods.dev/badge/skills/phase-rs/phase/add-trigger.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Rogue Agent · line 348 Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
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.00068 | $0.04957 |
| Opus 5.5 | $0.00027 | $0.01983 |
| Sonnet 5.5 | $0.00014 | $0.00991 |
| Haiku 4.5 | $0.00007 | $0.00496 |
Grade A, and why
add-trigger 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 yesterday.
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 — 350 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Adding a Triggered Ability
Triggered abilities fire in response to game events and go on the stack (MTG Rule 603). They differ from replacement effects (which modify events) and static abilities (which exist continuously). This skill covers the full trigger pipeline: event fired → matcher detects → APNAP ordering → targeting → stack → resolution.
Before you start: Trace how ChangesZone (ETB/dies) triggers work end-to-end. They're the most complete reference: parse_trigger_line() in oracle_trigger.rs → TriggerDefinition → process_triggers() → match_changes_zone() → stack placement → resolve_top().
CR Verification Rule: Every CR number in annotations MUST be verified by grepping
docs/MagicCompRules.txtbefore writing. Do NOT rely on memory — 701.x and 702.x numbers are arbitrary sequential assignments that LLMs consistently hallucinate. Rungrep -n "^603.2" docs/MagicCompRules.txt(etc.) for every number. If you cannot find it, do not write the annotation.
MTG Rules Reference
| Rule | What it governs | Engine implication |
|---|---|---|
| 603.2 | A triggered ability triggers when its event occurs | process_triggers() scans all permanents against the event |
| 603.3 | Triggered abilities are placed on the stack (APNAP order) | Sort by (is_nap, timestamp) before stack placement |
| 603.3b | Active player's triggers go on stack first (resolve last) | NAP triggers pushed after AP triggers |
| 603.4 | Intervening-if checked at fire-time AND resolution-time | TriggerCondition checked in both process_triggers() and resolve_top() |
| 603.5 | Triggered abilities target when placed on stack | extract_target_filter_from_effect() → targeting phase before stack |
| 603.6c | "Once each turn" constraint | TriggerConstraint::OncePerTurn tracked in triggers_fired_this_turn |
Key Types
TriggerDefinition — crates/engine/src/types/ability.rs
pub struct TriggerDefinition {
pub mode: TriggerMode, // Event type: ChangesZone, DamageDone, SpellCast, etc.
pub execute: Option<Box<AbilityDefinition>>, // Effect to run when triggered
pub valid_card: Option<TargetFilter>, // Filter on the event subject ("another creature")
pub origin: Option<Zone>, // For zone changes: from where
pub destination: Option<Zone>, // For zone changes: to where
pub trigger_zones: Vec<Zone>, // Active zones (default: Battlefield)
pub phase: Option<Phase>, // For phase triggers (Upkeep, End, etc.)
pub optional: bool, // "You may" triggers
pub combat_damage: bool, // Combat damage only filter
pub secondary: bool, // Multi-target secondary indicator
pub valid_target: Option<TargetFilter>, // Controller filter for events (You, Opponent)
pub valid_source: Option<TargetFilter>, // Source filter for damage/spell triggers
pub description: Option<String>, // Human-readable text
pub constraint: Option<TriggerConstraint>, // OncePerTurn, OncePerGame, OnlyDuringYourTurn
pub condition: Option<TriggerCondition>, // Intervening-if condition
}
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.
- yesterday Changed 34efc9ec3749
- 2mo ago First seen · 350 lines · 68 tokens per session scan A 37d18c78c626
add-trigger is a skill published in the GitHub repository phase-rs/phase (313 stars, last pushed today), licensed Apache-2.0. It adds 68 tokens to every session and 4,957 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.
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.
json-ui
CRITICAL: Use for json-ui component rendering and development. Triggers on: json-ui, json render, component catalog, report render, HTML report, I18nString, i18n, bilingual, language switch, dual language, PaperHeader, AuthorList, Abstract, MetricsGrid, Section, Highlight, Zod schema, catalog.ts, cli.ts…
prompt-cache-optimizer
Audit and optimize Pisper system-prompt and tool-schema token overhead while preserving stable prompt-cache prefixes, permissions, and runtime behavior. Invoke only for explicit prompt or tool-context optimization work.
tauri-updater
Use when adding software auto-update to a Tauri 2 desktop app, or when users ask about tauri-plugin-updater integration, app update checking, distinguishing installer vs portable builds for updates, or generating update manifests for GitHub Releases.
worth-fix
A verification and decision-making guide for checking whether bug reports, claims, proposals, or refactoring ideas are true and worth acting on.
npm-release
Use when publishing or preparing to publish an npm package from this repository, especially the Skill Zoo CLI package under packages/cli. Also use when npm publish fails because of duplicate versions, npm authentication, browser authentication, dist-tag propagation, tarball contents, bin entry issues, or…