speclock-guardrails

speclock-guardrails is a skill for Claude Code, Codex from sgroy10/speclock. It costs 63 tokens per session (336 once invoked), scanned A, original, MIT.

A set of project guardrails that checks planned agent actions against written constraints using SpecLock tools.

In plain words
What is it for?
Use it before changing protected files, altering architecture, running destructive commands, or committing in projects with instruction files or active locks.
Why use it?
It can warn about or block changes that conflict with project rules before files are edited, commands run, or commits are made.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Part of the speclock plugin — 1 skill, 1 hook, 1 MCP server 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 skills/sgroy10/speclock/speclock-guardrails
Any agent
npx skills add sgroy10/speclock --skill speclock-guardrails
Clone the repo
git clone --depth 1 https://github.com/sgroy10/speclock

Made for: Claude Code, Codex.

Or install speclock, the plugin that ships this one along with the rest of its 1 skill, 1 hook, 1 MCP server.

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 speclock-guardrails

README.md
[![agentmods](https://agentmods.dev/badge/skills/sgroy10/speclock/speclock-guardrails.svg)](https://agentmods.dev/skills/sgroy10/speclock/speclock-guardrails)
Your own site
<a href="https://agentmods.dev/skills/sgroy10/speclock/speclock-guardrails"><img src="https://agentmods.dev/badge/skills/sgroy10/speclock/speclock-guardrails.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 336 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.1 $0.00063 $0.00336
Opus 5 $0.00032 $0.00168
Sonnet 5 $0.00013 $0.00067
Haiku 4.5 $0.00006 $0.00034

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

Security

Grade A, and why

speclock-guardrails 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 6d 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/speclock/skills/speclock-guardrails/SKILL.md · 29 lines

What it actually says

SpecLock Guardrails

Use SpecLock as an action-verification layer. It complements memory, skills, reviews, and tests; it does not prove factual correctness or eliminate hallucinations.

Workflow

  1. Read the project briefing and active SpecLock constraints before changing files.
  2. Check the intended action, affected files, and commands for conflicts.
  3. Stop on a blocking violation. Proceed only when an authorized user explicitly identifies the constraint to amend or override; do not infer override permission from a conflicting implementation request.
  4. Check the resulting patch or diff before presenting or committing it.
  5. Record material constraint decisions when the project uses SpecLock decision history.
  6. Preserve Git or CI enforcement as the universal fallback when the client cannot intercept actions natively.

Boundaries

  • Treat MCP-only integrations as assisted verification, not guaranteed interception.
  • Never claim that SpecLock makes generated code correct or hallucination-free.
  • Do not weaken or delete locks without explicit authorization.
  • Do not send private project data to a remote service without consent.

Decision output

Report ALLOW, WARN, or BLOCK, followed by the relevant constraint, planned action, affected files or commands, reason, and safest next step. Direct contradiction with an active constraint is BLOCK; ask for clarification when a semantic match is uncertain.

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. 6d ago First seen · 29 lines · 63 tokens per session scan A 561f82a70eab

Subscribe to this mod's changes

speclock-guardrails is a skill published in the GitHub repository sgroy10/speclock (25 stars, last pushed 18d ago), licensed MIT. It adds 63 tokens to every session and 336 once invoked, about $0.0003 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-30.