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.
npx skills add Obsidian-Owl/specwright --skill sw-guardgit clone --depth 1 https://github.com/Obsidian-Owl/specwrightWrote 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/obsidian-owl/specwright/sw-guard)<a href="https://agentmods.dev/skills/obsidian-owl/specwright/sw-guard"><img src="https://agentmods.dev/badge/skills/obsidian-owl/specwright/sw-guard/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/obsidian-owl/specwright/sw-guard"><img src="https://agentmods.dev/badge/skills/obsidian-owl/specwright/sw-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00033 | $0.01452 |
| Opus 5.5 | $0.00013 | $0.00581 |
| Sonnet 5.5 | $0.00007 | $0.00290 |
| Haiku 4.5 | $0.00003 | $0.00145 |
Grade A, and why
sw-guard 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.
How it starts
The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Specwright Guard
Goal
Detect the project's stack and interactively configure deterministic guardrails across four enforcement layers (session, commit, push, CI/CD). Each layer is independently approvable. Existing guardrails are preserved during re-runs.
Inputs
- The codebase (dependency manifests, config files, existing hooks)
{projectArtifactsRoot}/config.json-- project configuration (optional -- not required){projectArtifactsRoot}/CONSTITUTION.md-- practices to follow (if present)- Existing agent hooks, git hooks, CI workflows
Outputs
When complete, user-approved guardrails are configured. Artifacts may include:
.claude/settings.jsonor.claude/settings.local.json-- session-level hooks. User chooses destination (shareable vs gitignored).
.opencode/plugins/*.ts-- session-level plugin hooks.
- Pre-commit hook configurations (framework chosen by user)
- Pre-push hook configurations (test runner, coverage thresholds)
- CI/CD workflow files (backstop checks, integration tests, security scanning)
{projectArtifactsRoot}/config.json-- updated with detected tool commands (if present)
Note: CONSTITUTION.md is NOT modified. Constitutional updates are the responsibility of sw-learn.
Constraints
Detection (MEDIUM freedom):
- Follow
protocols/guardrails-detection.mdfor the three-step detection algorithm (manifest scan, config file scan, existing guardrail scan). - Detection scope includes traditional tools (linters, formatters, test runners) and
semantic analysis tools: ast-grep (
sg), OpenGrep (opengrep), and platform LSP (Claude Code.lsp.json, Opencode built-in,cli-lsp-clientstandalone). - If
{projectArtifactsRoot}/config.jsonexists, readcommands.*fields as authoritative; supplement with detection for unconfigured dimensions. - If
{projectArtifactsRoot}/config.jsondoes not exist, rely entirely on detection. Validate detected tools by running them (e.g.,--versioncheck). Present standalone recommendations with explicit "detected via heuristics" labeling. - When Git workflow config is present or inferred, seed or migrate
git.targetsandgit.freshnessfrom the detected Git workflow strategy without requiring users to define a custom branch DSL. - Detect or confirm target-role defaults, freshness checkpoints, runtime mode as an explicit Git policy choice, and any optional work-artifact publication mode as one explicit Git policy surface.
- Recommend
project-visiblefor Claude-oriented installs unless the user explicitly wantsgit-adminruntime roots. - Recommend a tracked work-artifact root under
.specwright/worksfor new interactive installs unless the user explicitly prefers clone-local-only auditable work artifacts. - When describing runtime policy, use the same operator vocabulary as the
adapters and status surfaces:
project-visibleroots under.specwright-local/for interactive installs,git-adminroots under.git/specwright/for compatibility,/sw-statusfor the current runtime view, and/sw-adoptfor explicit same-work adoption. - Keep runtime mode separately from tracked work-artifact publication and separately from clone-local runtime state.
- Treat
.specwright/config.jsonand the anchor docs as a shared project-level policy surface across developers and agent sessions, not as clone-local runtime state. - For unfamiliar stacks or niche tools, use WebSearch to identify tooling conventions.
- Detect existing guardrails before recommending. Show delta on re-runs.
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.
- 1mo ago First seen · 133 lines · 33 tokens per session scan A 6f371a081c18
sw-guard is a skill published in the GitHub repository Obsidian-Owl/specwright (10 stars, last pushed 6mo ago), licensed MIT. It adds 33 tokens to every session and 1,452 once invoked, about $0.0001 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.
Other skills, from other repositories
bmad-testarch-ci
Scaffold CI/CD quality pipeline with test execution. Use when the user says "lets setup CI pipeline" or "I want to create quality gates".
integration-e2e-testing
Defines integration/E2E skeleton annotations, lane and file contracts, and route-parity review criteria. Use when generating or consuming test skeletons or reviewing shared mutation routes.
brooks-sweep
Full-sweep mode: runs a unified analysis across all quality dimensions — code decay, architecture, tech debt, and test quality — then applies fixes directly to the codebase. Safe changes are auto-applied; risky changes are confirmed before execution. Drawing on twelve classic engineering books. Triggers when: user…
brooks-test
Test quality review drawing on twelve classic engineering books — with primary focus on xUnit Test Patterns, The Art of Unit Testing, How Google Tests Software, and Working Effectively with Legacy Code — that diagnoses structural problems in an existing test suite: brittleness, mock abuse, coverage illusions, slow…
recipe-add-integration-tests
Add integration/E2E tests to existing codebase using Design Docs.
testing-principles
Language-agnostic testing principles for choosing which tests a change needs, test quality, and proof ownership, with frontend and browser E2E implementation references. Use when writing tests, deciding test scope, or reviewing test quality.