csstruth

csstruth is a skill for Claude Code, Codex from ikraamg/csstruth. It costs 0 tokens per session (2,138 once invoked), scanned A, original, MIT.

A workflow for checking a web page's actual browser layout with the csstruth tools. CSS controls the page's visual style and layout, while these checks report what the browser really rendered.

In plain words
What is it for?
Use it to inspect layout trees and individual elements, diagnose box-model and stacking issues, explain likely CSS causes, save baselines, check load stability, and verify fixes at different screen sizes.
Why use it?
It replaces guesses about positioning, sizing, and responsive behaviour with measurements from the rendered page before and after a change.

Skill for Claude CodeCodex

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

Good fit Use it to inspect layout trees and individual elements, diagnose box-model and stacking issues, explain likely CSS causes, save baselines, check load stability, and verify fixes at different screen sizes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ikraamg/csstruth/csstruth
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.

Any agent
npx skills add ikraamg/csstruth --skill csstruth
Clone the repo
git clone --depth 1 https://github.com/ikraamg/csstruth

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 csstruth

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/ikraamg/csstruth/csstruth"><img src="https://agentmods.dev/badge/skills/ikraamg/csstruth/csstruth.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,138 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.00000 $0.02138
Opus 5.5 $0.00000 $0.00855
Sonnet 5.5 $0.00000 $0.00428
Haiku 4.5 $0.00000 $0.00214

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

Security

Grade A, and why

csstruth 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.

skills/csstruth/SKILL.md · 153 lines

How it starts

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

csstruth: CSS ground truth for agents

csstruth extracts the browser's ACTUAL rendered layout as deterministic text. Eleven tools — six inspectors, one composite verdict (verify), one baseline writer (baseline), one load-time stability report (stability) — as MCP tools (mcp__csstruth__*) or the csstruth CLI.

The one hard rule

Never claim anything about what renders without reading it from csstruth. No guessing from source, no "this should now be centered". Diagnose with the tool, edit the source, re-verify with the tool.

Workflow

1. Before touching any CSS on a working page — lock the good state: snapshot with a name and an ABSOLUTE dir (e.g. <project>/.csstruth). Relative dirs resolve against the MCP server's cwd, not the project. For responsive work snapshot with viewports so diffs exist per breakpoint.

2. Diagnose (in this order):

  • layout — the whole rendered tree: positions (x,y WxH), flex/grid facts, inline ⚠ warnings. Scope with selector/depth on big pages.
  • inspect — one element in depth: box model, non-default styles, stacking context, why it has its width/height.
  • explain — REQUIRED before editing any rule you didn't write: which declaration wins (file:line, source-mapped), which lost and why, and what layout constraint overrides the declared value (flex-basis, min/max, grid). Fix the rule explain names — not the first plausible one in the source.

3. After every edit: diff against your snapshot. It reports exact moves/ resizes in px. (no layout changes) + your intended change = success. Unrelated movement = your edit had side effects; explain them before proceeding.

Editing for a while? Start watch instead of re-running diff. CLI only (csstruth watch <url>, no MCP tool — a streaming daemon doesn't fit request/response): start it once in a background shell, then read its stream as you edit instead of re-running diff/check after every change. It prints the layout delta and any NEW/RESOLVED violations under a [HH:MM:SS] block on each real change, and stays quiet otherwise — no need to re-invoke a tool per edit. Stop it (Ctrl+C / kill the background job) when you're done.

Read the full file on GitHub · 153 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. 1mo ago Changed · +2 lines 445434964624
  2. 1mo ago First seen · 151 lines · 0 tokens per session scan A aba22c031528

Subscribe to this mod's changes

csstruth is a skill published in the GitHub repository ikraamg/csstruth (2 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,138 tokens. 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