policy-tester

policy-tester is an agent for coding agents from spacelift-io/claude-plugins. It costs 19 tokens per session (279 once invoked), scanned A, original, MIT.

An agent that tests Spacelift policies by simulating them with sample inputs. It checks both a scenario that should trigger the policy and one that should not.

In plain words
What is it for?
Testing policies of types such as access, approval, plan, task, notification, and trigger, then reporting the sample inputs, decisions, language modes, and errors.
Why use it?
It helps reveal invalid input paths, parsing problems, and decisions that do not match the policy's intended behavior. It can compare the two supported Rego language modes when appropriate.

Agent

Part of the spacelift plugin — 2 skills, 2 agents shipped together

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.

agentmods
npx agentmods add agents/spacelift-io/claude-plugins/tester
Clone the repo
git clone --depth 1 https://github.com/spacelift-io/claude-plugins

Or install spacelift, the plugin that ships this one along with the rest of its 2 skills, 2 agents.

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 policy-tester

README.md
[![agentmods](https://agentmods.dev/badge/agents/spacelift-io/claude-plugins/tester.svg)](https://agentmods.dev/agents/spacelift-io/claude-plugins/tester)
Your own site
<a href="https://agentmods.dev/agents/spacelift-io/claude-plugins/tester"><img src="https://agentmods.dev/badge/agents/spacelift-io/claude-plugins/tester.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 279 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00019 $0.00279
Opus 5 $0.00010 $0.00139
Sonnet 5 $0.00004 $0.00056
Haiku 4.5 $0.00002 $0.00028

Measured 3d ago against content hash 26b1e78ebfa1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

policy-tester 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 3d 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/spacelift/skills/spacelift-policy-writer/agents/tester.md · 14 lines

What it actually says

You test Spacelift policies. You are given a policy body and its type (ACCESS, APPROVAL, GIT_PUSH, LOGIN, NOTIFICATION, PLAN, TASK, or TRIGGER).

Method:

  1. Read references/policy-contract.md for the type's input paths, then synthesize a minimal representative sample input JSON - only fields the policy touches, correct nesting (e.g. PLAN uses input.spacelift.*). Never invent field names.
  2. Run the policySimulatev2 mutation via the Spacelift MCP mutate tool with { body, input, type, engineType }. Choose REGO_V1 if rule heads use if/contains or future.keywords imports, REGO_V0 for bare v0 heads; run both for portable policies.
  3. Read the decision JSON (deny, warn, allow, etc.). If it contradicts intent or errors, tweak the input or policy and re-simulate. Cover both a triggering and a non-triggering scenario.
  4. Report: engine(s) used, each sample input in one line, the decision per scenario (deny/warn/allow/send/...), and any parse errors.
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. 3d ago First seen · 14 lines · 19 tokens per session scan A 26b1e78ebfa1

Subscribe to this mod's changes

policy-tester is an agent published in the GitHub repository spacelift-io/claude-plugins (2 stars, last pushed 1mo ago), licensed MIT. It adds 19 tokens to every session and 279 once invoked, about $0.0001 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.