whyguard: Skill for Kiro

.kiro/skills/create-rationale-contract/SKILL.md

create-rationale-contract is a skill for Kiro from rosselps/whyguard. It costs 47 tokens per session (551 once invoked), scanned A, original, MIT.

A written record of a confirmed code rule, stored in a YAML file with its reason, evidence, tests, owners, and expiry conditions.

In plain words
What is it for?
Use it after reviewing a WhyGuard finding to document the files and symbols it protects, the behavior that must remain, supporting issues or pull requests, and the tests required.
Why use it?
It prevents future developers or coding agents from having to rediscover why the rule exists. It also separates a human-approved decision from an unverified suggestion.

Skill for Kiro

Written for Kiro: installed under .kiro/.

This is rosselps/whyguard's own configuration. It tells Kiro how to work on whyguard 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 whyguard configures →

Reuse

Borrowing it

Nothing to install: this file belongs to rosselps/whyguard. 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/rosselps/whyguard/main/.kiro/skills/create-rationale-contract/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/rosselps/whyguard

Made for: Kiro.

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 create-rationale-contract

README.md
[![agentmods](https://agentmods.dev/badge/skills/rosselps/whyguard/create-rationale-contract/github.svg)](https://agentmods.dev/skills/rosselps/whyguard/create-rationale-contract)
Your own site
<a href="https://agentmods.dev/skills/rosselps/whyguard/create-rationale-contract"><img src="https://agentmods.dev/badge/skills/rosselps/whyguard/create-rationale-contract/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 create-rationale-contract

Your own site · 80×15
<a href="https://agentmods.dev/skills/rosselps/whyguard/create-rationale-contract"><img src="https://agentmods.dev/badge/skills/rosselps/whyguard/create-rationale-contract.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 551 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.
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.00047 $0.00551
Opus 5.5 $0.00019 $0.00220
Sonnet 5.5 $0.00009 $0.00110
Haiku 4.5 $0.00005 $0.00055

Measured 1mo ago against content hash 83d83750b158, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

create-rationale-contract 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 1mo 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.

.kiro/skills/create-rationale-contract/SKILL.md · 55 lines

What it actually says

When to use this skill

After a Finding's protected property has been reviewed and confirmed by a human (not just proposed by the deterministic scan), capture it as a durable rationale contract so the next agent or reviewer does not have to re-trace the same history.

Workflow

  1. Confirm the finding has moved from proposed to confirmed state (see .kiro/steering/evidence-policy.md) with a human actor recorded.
  2. Create a new file at .whyguard/decisions/<short-slug>.yml following this shape:
    id: <short-slug>
    version: 1
    status: active
    scope:
      files:
        - <path/to/file.ts>
      symbols:
        - <symbolName>
    reason: >
      <one or two sentences describing the real-world incident or requirement>
    must_preserve:
      - <explicit behavioral property, phrased as an invariant>
    evidence:
      - type: issue
        id: "<number>"
      - type: pull_request
        id: "<number>"
    required_tests:
      - <path/to/regression-test>
    expires_when:
      - <condition under which this decision no longer applies>
    owners:
      - <team-or-individual>
    
  3. Do not mark status: active unless a human has actually confirmed the property; if in doubt, leave it as a draft and ask.
  4. Link the contract's id back to the originating finding for traceability.
  5. If a decision is later superseded, set status: replaced or status: expired — do not delete the file; history matters as much for decisions as for code.

Anti-patterns to avoid

  • Auto-generating a rationale contract straight from an unconfirmed proposed finding.
  • Writing a vague must_preserve statement (e.g., "keep it safe") instead of a checkable invariant (e.g., "one idempotency key creates at most one order").
  • Omitting evidence — a contract without evidence IDs cannot be audited later.
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. 1mo ago First seen · 55 lines · 47 tokens per session scan A 83d83750b158

Subscribe to this mod's changes

create-rationale-contract is a skill published in the GitHub repository rosselps/whyguard (0 stars, last pushed 3mo ago), licensed MIT. It adds 47 tokens to every session and 551 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

code-review-php

Deep PHP-specific code review covering strict types, PHPStan compliance, PSR standards, domain modeling, and ORM boundary violations. Applied in addition to the generic code-review skill when PHP code is detected. Invoked when reviewing PHP PRs, Symfony/Laravel changes, or performing PHP-specific quality checks.

soulcodex/agentic · 66 tokens

svelte-vitals

Use when writing or reviewing SvelteKit routes/components — svelte-vitals rule knowledge (SEO, performance, correctness, security, architecture, accessibility) and how to run the scanner.

oekazuma/svelte-vitals · 42 tokens

find-simplifications

Use for a periodic repo-wide sweep of qwen-code for accumulated excess surface — dead components and files, orphaned locale keys, exports nothing consumes, added-then-removed scaffolding — filing candidates on a tracking issue and landing only what a maintainer has said yes to. Repo-wide and evidence-first; every…

QwenLM/qwen-code · 103 tokens

swarm-pr-review

Run a graph-guided, tool-augmented PR review using context packing, parallel exploration, mandatory repository-agnostic risk-family coverage with dispatch scaled to diff size and risk, independent reviewer validation, critic challenge, and metrics writeback. Use for deep pull request review with low false-positive…

ZaxbyHub/opencode-swarm · 91 tokens

code-review

You are a senior code reviewer. You receive diffs via stdin.

jrswab/axe · 0 tokens

include-test-files-that-assert-on-behavior-being-changed-in-decl

When delegating a task affected by this skill, include.

ZaxbyHub/opencode-swarm · 29 tokens