css-noop-checker
AGENTS.md24 starsChanged 8 months agoMITView on GitHub
Human contributors: see CONTRIBUTING.md for the full contributor guide. This file provides context for AI coding agents (Cursor, Copilot, Windsurf, etc.) working in this repository. This is the most common type of contribution. Follow these steps: Add src/rules/<target>-no-<qualifier>.ts. The filename is the rule ID. Rule IDs follow Stylelint's thing-no-qualifier convention (e.g. inline-no-dimensions, container-no-gap). Add a side-effect import at the top of src/rules/engine.ts (keep alphabetical order): Add both "should warn" and "should NOT warn" cases. Sections are ordered alphabetically by rule…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository8 other files it gives its agents.
- .claude/skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- .claude/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- team-devSkill
- vercel-composition-patternsSkill
- vercel-react-best-practicesSkill
- verify-ruleSkill
- web-design-guidelinesSkill
The file
We split this AGENTS.md into the rules it gives an agent
10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Add src/rules/<target>-no-<qualifier>.ts.
- Very specific: line 52
Add a side-effect import at the top of src/rules/engine.ts (keep alphabetical order):
- Distinctive: line 60
Add both "should warn" and "should NOT warn" cases.
- Very specific: line 83
No changes to the extraction layer are needed — both the extension and MCP server dynamically read registry.ts for required CSS properties.
- Distinctive: line 95
Treat current Chromium behavior as the primary source of truth for whether a rule should warn.
- Very specific: line 96
Do not claim a rule is "definitely correct" just because unit tests pass.
- Very specific: line 97
When changing an existing rule or adding a nuanced rule, validate it with a real browser repro and update examples/test.html so Playwright …
- Distinctive: line 99
Prefer conservative warnings.
- Distinctive: line 100
If a rule still has known limitations or deliberate false negatives, document that trade-off in the rule file comments.
- Distinctive: line 108
Write everything in English
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AI Agent Instructions
Human contributors: see CONTRIBUTING.md for the full contributor guide.
This file provides context for AI coding agents (Cursor, Copilot, Windsurf, etc.) working in this repository.
Project Structure
src/
rules/ Detection rules + engine, registry, context, types
sidebar/ DevTools sidebar React UI (see src/sidebar/ for details)
devtools.ts Extension entrypoint — creates the sidebar pane
e2e/
helpers/ Playwright extraction helpers (shared with MCP server)
integration/ Browser integration tests against examples/test.html
mcp-server/ Standalone MCP server (separate package.json, pnpm workspace)
examples/
test.html Test cases for all rules — used by both manual testing and e2e
public/
manifest.json Chrome extension manifest (MV3)Adding a New Rule
This is the most common type of contribution. Follow these steps:
1. Create the rule file
Add src/rules/<target>-no-<qualifier>.ts. The filename is the rule ID.
Rule IDs follow Stylelint's thing-no-qualifier convention (e.g. inline-no-dimensions, container-no-gap).
import type { RuleContext, Warning } from './types.ts';
import { registerRule } from './registry.ts';
registerRule({
id: '<target>-no-<qualifier>',
label: '<short human-readable description>',
requiredProperties: ['<css-prop-1>', '<css-prop-2>'],
// requiredParentProperties: [], // optional, if parent styles are needed
check(ctx: RuleContext): Warning[] {
// Return warnings for properties that have no effect
return [];
},
});2. Register in engine.ts
Add a side-effect import at the top of src/rules/engine.ts (keep alphabetical order):
import './<target>-no-<qualifier>.ts';3. Add test cases to examples/test.html
Add both "should warn" and "should NOT warn" cases. Sections are ordered alphabetically by rule ID.
<!-- should warn -->
<div class="case expect-warn" data-rule="<rule-id>">
<div class="label label-warn"><rule-id> warn: description</div>
<div data-target style="...">example</div>
</div>
<!-- should NOT warn -->
<div class="case expect-ok" data-rule="<rule-id>">
<div class="label label-ok"><rule-id> ok: description</div>
<div data-target style="...">example</div>
</div>4. Run tests
pnpm test # unit tests
pnpm test:e2e # browser integration testsNo changes to the extraction layer are needed — both the extension and MCP server dynamically read registry.ts for required CSS properties.
Code Style
- ESM modules,
import typefor type-only imports (verbatimModuleSyntax) - No barrel exports — import directly from source modules
- File names use kebab-case (e.g.
static-no-offset.ts) - Tests follow
*.test.ts/*.test.tsxnaming, colocated in__tests__/directories - Format with Oxfmt (
singleQuote, trailing commas,printWidth: 100)
Rule Correctness Policy
- Treat current Chromium behavior as the primary source of truth for whether a rule should warn. This project is a Chrome DevTools extension, so browser behavior matters more than spec-only reasoning when they differ.
- Do not claim a rule is "definitely correct" just because unit tests pass. Unit tests in
src/rules/__tests__/are fast checks, not proof. - When changing an existing rule or adding a nuanced rule, validate it with a real browser repro and update
examples/test.htmlso Playwright covers the case. - Be careful with shorthands such as
place-items: a shorthand may be partially effective even when one longhand would be a no-op. Avoid warning unless the authored declaration is effectively useless in Chromium. - Prefer conservative warnings. If Chromium behavior is ambiguous or context-dependent, avoid introducing a likely false positive.
- If a rule still has known limitations or deliberate false negatives, document that trade-off in the rule file comments.
Commit & PR Guidelines
- Format:
<type>: <why-focused message>— types:feat,fix,refactor,chore,docs,test - One logical change per commit
- PR title: under 70 chars, format
<type>: <concise description> - PR body:
## Summary(bullet points) +## Test plan(checklist) - Write everything in English
Pre-PR Checklist
pnpm fmt # format
pnpm lint # lint
pnpm build # type-check + build
pnpm test # unit tests
pnpm test:e2e # integration testsDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

