csstruth

csstruth is a skill for Claude Code, Codex from ikraamg/csstruth. It costs 129 tokens per session (2,100 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

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/ikraamg/csstruth/csstruth
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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 129 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,100 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.00129 $0.02100
Opus 5 $0.00064 $0.01050
Sonnet 5 $0.00026 $0.00420
Haiku 4.5 $0.00013 $0.00210

Measured 3d ago against content hash aba22c031528, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

skills/csstruth/SKILL.md · 151 lines

How it starts

The opening of the file, as written. The whole thing — 151 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 · 151 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 · 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 (0 stars, last pushed 1mo ago), licensed MIT. It adds 129 tokens to every session and 2,100 once invoked, about $0.0006 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

video-shot-demos

为视频/课程/解说文案制作"每镜头一个 HTML"的高完成度网页演示动画(分镜演示页、视频配套演示动画、录屏用动画网页、科普/技术/产品发布可视化镜头)。只要用户提到:给视频做演示动画网页、分镜 HTML、shot 页面、把口播稿/大纲做成动画、视频画面设计网页版、录一段网页动画、或要求改造升级一批已有演示页——就用本 Skill。核心是统一的电影化播放器机制 + 每页完全不同的视觉风格 + 镜头语言 + 同步音效 + 角色表情吐槽,内容完全开放不设限。.

Unclecheng-li/AI_Animation · 166 tokens

designlang-tokens

Use when styling UI for cal.com — references the extracted design system tokens instead of inventing colors, spacing, or typography.

Manavarya09/design-extract · 30 tokens

frame-liquid-bg-hero

WebGL-style fluid displacement background with a quote overlay, suited to video intros, landing heroes, or posters.

nexu-io/html-video · 28 tokens

frame-build-minimal

Luxury-minimal whitespace hero — single word reveals letter by letter, warm-gold hairline, breathing indicators.

nexu-io/html-video · 27 tokens

firefox-chrome

Ground truth for Firefox's internal chrome UI — the DOM structure (browser.xhtml) and built-in CSS that userChrome themes target. Use when writing or fixing textfox CSS and you need to know a real selector, element ID, attribute, or Firefox's own default styling — instead of guessing. Triggers: "what selector", "what…

adriankarlen/textfox · 130 tokens

animate

Build a web animation: whether it should animate at all, the purpose, the tool, the properties, the easing curve, the duration, interruption and exit. Writes the CSS or Motion code for dropdowns, modals, toasts, tooltips, accordions, press feedback, stagger and scroll reveals. Use to animate something or make a…

ericrisco/rsc-harness · 75 tokens