to-triggers

to-triggers is a skill for Claude Code from bartolli/kmd. It costs 165 tokens per session (2,088 once invoked), scanned A, original, MIT.

A skill that turns a plain-language rule into a trigger entry in vault.yaml, a configuration file for vault gates. It asks what the rule should do, such as remind, warn, or block, then creates and tests the matching pattern.

In plain words
What is it for?
It is for creating, dry-running, and validating rules that react to prompts or other vault events. It writes the configuration only after the trigger behavior is checked.
Why use it?
It removes the need to design regular expressions and other matching details by hand, reducing triggers that fail silently or make the configuration invalid.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the wiki-sdd plugin — 10 skills, 5 hooks shipped together

Good fit It is for creating, dry-running, and validating rules that react to prompts or other vault events. It writes the configuration only after the trigger behavior is checked.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bartolli/kmd/to-triggers
View source ↗ bartolli/kmd
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add bartolli/kmd --skill to-triggers
Clone the repo
git clone --depth 1 https://github.com/bartolli/kmd

Made for: Claude Code.

Or install wiki-sdd, the plugin that ships this one along with the rest of its 10 skills, 5 hooks.

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 to-triggers

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/bartolli/kmd/to-triggers"><img src="https://agentmods.dev/badge/skills/bartolli/kmd/to-triggers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 165 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,088 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 warn 7 Sept 2026
SkillSpector: 2 findings, 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 Tool Misuse · line 81
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 126
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
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.00165 $0.02088
Opus 5 $0.00082 $0.01044
Sonnet 5 $0.00033 $0.00418
Haiku 4.5 $0.00016 $0.00209

Measured 2d ago against content hash 6fd0173b67a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

to-triggers 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 2d 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.

plugins/claude/wiki-sdd/skills/to-triggers/SKILL.md · 165 lines

How it starts

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

To-Triggers — Author Vault Gate Triggers from Intent

Convert a stated rule into a trigger entry in vault.yaml. The division of labor is fixed: the user owns the intent ("never let a tag happen before the retro"); the agent owns the matching sophistication. A mis-authored trigger either never fires (silent protocol decay) or fails the vault.yaml load (fail-loud: one invalid trigger takes down every tool). Never hand the user a regex question they didn't ask for.

Source of truth

The trigger schema is read at use time, never from memory:

  • The wiki skill's references/vault-yaml.md § Harness gate triggers (ships alongside these skills) — field vocabulary and examples.
  • The vault's own vault.schema.json (vault root) and kmd validate — the runtime authority. When the reference file is unavailable, these suffice.

Interview flow — recommend first

Draft a complete trigger from the user's sentence, present it, and ask only what could not be inferred. Never open the interview with questions the intent already answers.

  1. Intent class. Map the sentence:

    The user wants Class Event
    a reminder when a topic comes up inject prompt
    a nudge alongside a risky tool call inject or warn pretool
    an action denied until a precondition holds block pretool

    Only pretool can block. A prompt-time rule that sounds like a gate ("never tag before the retro") is really a pretool block on the tagging command plus, optionally, a prompt-time reminder — propose both, let the user drop one.

  2. Matching draft. Author the mechanics (rules below) with the trigger id (descriptive kebab-case; duplicate ids keep the first occurrence).

  3. Payload register. text (inject) and reason (block) are read by an agent mid-session: one ASCII line naming the protocol pointer, no banners. A block reason tells the denied agent what to do instead, not just why.

  4. Scope. Propose where it lands: the active scope's triggers_extra (additive), or triggers_extra._all for vault-wide. A full-replace triggers section only on explicit request — it drops the engine defaults and the compiled file source too.

Read the full file on GitHub · 165 lines

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. 2d ago Changed 6fd0173b67a4
  2. 3d ago Changed 127140e1ea18
  3. 4d ago Changed fd516e105ea2
  4. 9d ago First seen · 165 lines · 165 tokens per session scan A 2fca2738b742

Subscribe to this mod's changes

to-triggers is a skill published in the GitHub repository bartolli/kmd (7 stars, last pushed 3d ago), licensed MIT. It adds 165 tokens to every session and 2,088 once invoked, about $0.0008 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-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens