uigraph-gate

uigraph-gate is a skill for Claude Code, Codex from kanetran29/uigraph. It costs 75 tokens per session (782 once invoked), scanned A, original, MIT.

A verification gate for UI changes that checks whether implementation matches written acceptance criteria. It uses code checks and, when configured, browser checks before declaring the change complete.

In plain words
What is it for?
Use it when implementing a UI feature or bug fix to create a contract, establish a baseline, run checks, and inspect a report when criteria fail.
Why use it?
It prevents an agent from claiming a UI ticket is done when the required behavior or code structure has not been proven.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node .uigraph/kit/gate.mjs baseline <app-dir>.

Good fit Use it when implementing a UI feature or bug fix to create a contract, establish a baseline, run checks, and inspect a report when criteria fail.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/kanetran29/uigraph
agentmods
npx agentmods add skills/kanetran29/uigraph/gate

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/kanetran29/uigraph/gate"><img src="https://agentmods.dev/badge/skills/kanetran29/uigraph/gate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 782 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.00075 $0.00782
Opus 5.5 $0.00030 $0.00313
Sonnet 5.5 $0.00015 $0.00156
Haiku 4.5 $0.00007 $0.00078

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

Security

Grade A, and why

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

kit/gate-skill.md · 60 lines

How it starts

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

uigraph verification gate

The gate (.uigraph/kit/gate.mjs) is the machine verifier that proves a UI change matches its ticket's acceptance criteria. Six verdict layers, fail-fast: check-cmd → ast-grep → impact containment → graph-match → verify → specs.

Invocation

node .uigraph/kit/gate.mjs baseline <app-dir>
node .uigraph/kit/gate.mjs check <app-dir> --contract <contract.json> \
  [--no-browser | --app-url http://localhost:PORT]

Prerequisites: Node >=22, uigraph on PATH (or set UIGRAPH_BIN), ast-grep on PATH, @playwright/test as a devDependency for the behavioral layer (structure layers run without it). --check-cmd "<cmd>" overrides verdict 1 (default pnpm check).

Exit: 0 GREEN · 1 an AC failed (read <app-dir>/.uigraph-gate/report.md) · 2 infrastructure problem — fix the environment; does NOT count as a failing round.

Protocol

  1. Baseline before touching code: gate.mjs baseline <app-dir> (pins the pre-code graph + git sha), once per ticket.
  2. Translate the ACs → a contract (contracts/<ticket>.json). Smoke-test every ast-grep pattern against a should-match scratch fixture first (forbid-mode fails open on a typo). STOP and get the human's approval of the contract — approval freezes the definition of done. You translate; you never grade.
  3. Code loop: implement → check → on exit 1 read the report and fix. Max 3 rounds; the same failing-verdict set 2 rounds in a row → stop early, escalate. Use --no-browser for fast mid-loop runs; the final proving run MUST use --app-url with the dev server up.
  4. GREEN → report to the human with the report file. Never claim a feature done on a red or skipped browser verdict.

Watch-outs

  • forbid-mode patterns fail OPEN on a typo. ast-grep silently matches nothing for a malformed pattern, so a mode: "forbid" rule with a typo never fires and the verdict stays green. Smoke-test each forbid pattern once against a scratch file that SHOULD match before trusting it.
  • ast-grep cannot see inside .vue SFCs. It skips .vue files while walking a directory, so a forbid-mode pattern goes red instead of silently trusting a clean 0-match run when the workspace has .vue files. Opt a pattern out — only when certain it concerns non-.vue code — with the [ts-only] tag: "pattern[ts-only]: setId($_)".
  • verify reds on pre-existing graph damage, not just this ticket. An unrelated unverified/refutable transition elsewhere in the graph can red the gate even though your change is correct. Keep the workspace's graph healthy rather than treating every red verify as your ticket's fault.

Read the full file on GitHub · 60 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 · 60 lines · 75 tokens per session scan A b618e57aa7f1

Subscribe to this mod's changes

uigraph-gate is a skill published in the GitHub repository kanetran29/uigraph (5 stars, last pushed 3d ago), licensed MIT. It adds 75 tokens to every session and 782 once invoked, about $0.0003 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-11-04.

Related

uigraph-gate compared with skills from other repositories

uigraph-gate next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
uigraph-gatekanetran29/uigraphSkill53d agoMITA75Claude Code, Codex
weavatrixWeavatrix/weavatrixSkill41mo agoMITA108Cursor
weavatrixWeavatrix/weavatrixSkill41mo agoMITA108Codex, Cursor
opik-diagnosecomet-ml/opik-mcpSkill2259d agoApache-2.0A187Claude Code
dcc-blender-assembly-pitfallsdcc-mcp/dcc-mcp-blenderSkill60yesterdayMITA153Claude Code
virality-analysismtarcure/claude-vibe-squadSkill2289d agoMITA56Claude Code, Codex
color-theorymtarcure/claude-vibe-squadSkill2289d agoMITA62Claude Code, Codex