gate-semantic

gate-semantic is a skill for Claude Code, Codex from Obsidian-Owl/specwright. It costs 42 tokens per session (926 once invoked), scanned A, original, MIT.

A code-review check that looks for meaning-level bugs in changed source files, including problems on error paths that simple structural checks may miss.

In plain words
What is it for?
It helps verify changed code by scanning text patterns, code structure, and—when configured—data flowing across functions, then recording file-and-line evidence.
Why use it?
It catches issues that pattern matching and syntax checks can overlook. Findings are reported as warnings by default.

Skill for Claude CodeCodex

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/obsidian-owl/specwright/gate-semantic
Any agent
npx skills add Obsidian-Owl/specwright --skill gate-semantic
Clone the repo
git clone --depth 1 https://github.com/Obsidian-Owl/specwright

Made for: Claude Code, Codex.

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 gate-semantic

README.md
[![agentmods](https://agentmods.dev/badge/skills/obsidian-owl/specwright/gate-semantic.svg)](https://agentmods.dev/skills/obsidian-owl/specwright/gate-semantic)
Your own site
<a href="https://agentmods.dev/skills/obsidian-owl/specwright/gate-semantic"><img src="https://agentmods.dev/badge/skills/obsidian-owl/specwright/gate-semantic.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 926 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.00042 $0.00926
Opus 5 $0.00021 $0.00463
Sonnet 5 $0.00008 $0.00185
Haiku 4.5 $0.00004 $0.00093

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

Security

Grade A, and why

gate-semantic 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.

core/skills/gate-semantic/SKILL.md · 97 lines

How it starts

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

Gate: Semantic Analysis

Goal

Detect semantic bugs in changed code using symbolic pre-processing when available. For each candidate finding, localize it explicitly with premises, claims, and conclusion grounded in file:line evidence.

Inputs

  • config.json gates.semantic — categories, tools, optional rulesDir
  • {repoStateRoot}/work/{selectedWork.id}/workflow.json — selected work unit
  • Changed files via git diff --name-only $(git merge-base HEAD <baseBranch>)

Outputs

  • {workDir}/evidence/semantic-report.md
  • Gate status in the selected work's workflow.json

Constraints

Scope (MEDIUM freedom): Changed code files only. Skip markdown/JSON/YAML/config. No changed code → PASS.

Tool tiers (LOW freedom): Resolve from gates.semantic.tools config, fall back to PATH detection. Missing tools narrow scope — never FAIL or ERROR. Validate sg identity: sg --version 2>&1 | grep -iq 'ast-grep' (/usr/bin/sg from shadow-utils is a false positive).

Tier Tool Adds
0 rg Text-pattern extraction + LLM
1 ast-grep (sg) Structural JSON, metavariable capture
2 OpenGrep Cross-function taint (rules: config rulesDir or .opengrep/rules/)

Extraction (HIGH freedom): Extract structural facts using highest available tier's tool. Feed facts (not raw files) to LLM. Tier 1: sg scan <file> --json --rule <rule> or sg run --pattern '...' <file> --json (avoid --stdin). Tier 2: opengrep scan --config <rules-dir> --json <file>.

Categories (LOW freedom):

Category Tier Diagnostic question
error-path-cleanup 0+ Does any error path skip releasing an acquired resource?
unchecked-errors 0+ Is any error-producing call's return value discarded?
fail-open-handling (CWE-636) 1+ Does any catch block swallow, broaden, or ignore errors?
error-data-leakage (CWE-209) 1+ Does any error response expose internals to the caller?
resource-lifecycle 2+ Is any acquired resource not released on all exit paths?

Read the full file on GitHub · 97 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. 3d ago First seen · 97 lines · 42 tokens per session scan A f635d998e77f

Subscribe to this mod's changes

gate-semantic is a skill published in the GitHub repository Obsidian-Owl/specwright (9 stars, last pushed 4mo ago), licensed MIT. It adds 42 tokens to every session and 926 once invoked, about $0.0002 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

dslop

Dynamic AI Slop Index. Researches current AI slop patterns from the internet, builds a quantified slop index, then applies it to clean writing, code, design, and architecture output. Unlike static pattern lists, DSLOP self-updates by researching what the internet currently flags as AI-generated tells.

eddiebelaval/squire · 68 tokens

rust-skills

Rust best practices — 179 rules across 14 categories for idiomatic, optimized Rust code.

martineserios/thebrana · 23 tokens

release

Cut a sim-use release end-to-end. Use when the user runs /release or asks to "ship a release", "publish a version", "cut a release", or "release to homebrew". Drives scripts/local-release.sh; never reimplement its build/sign/tarball logic.

lycorp-jp/sim-use · 61 tokens

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…

hyhmrright/brooks-lint · 178 tokens

manage-schemas

Creates, views, edits, deletes, and validates note schemas for the MCP Task Orchestrator in .taskorchestrator/config.yaml — the templates that define which notes agents must fill at each workflow phase. Also recommends schema designs from a library of workflow patterns (autonomous coding loops, spec-driven teams…

jpicklyk/task-orchestrator · 212 tokens

bmad-dev-story

Execute story implementation following a context filled story spec file. Use when the user says "dev this story [story file]" or "implement the next story in the sprint plan".

LarsCowe/bmalph · 40 tokens