agentleFS
CloudflareKnown publishercloudflare/workerd/.opencode/skills/iwyu/SKILL.md

iwyu

Skill9k starsChanged 8 months agoApache-2.0View on GitHub

Follow IWYU guidelines to improve build caching. This entails adding/removing C++

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Don't add #includes a file doesn't use or deps a target doesn't use.

    line 13
  2. Very specific:

    Put deps whose headers are included only from .c++ files in implementation_deps, so they don't propagate to dependents.

    line 15
  3. Distinctive:

    Prefer direct includes and deps over relying on transitive ones, but don't add a long list just to spell out what you already get …

    line 17
  4. Very specific:

    Keep each header in exactly one target, together with its .c++ if it has one.

    line 25
  5. Very specific:

    If splitting a pair out would create a dependency cycle, leave it in its combined target (e.g.

    line 28

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

IWYU FOR C++ TARGETS

Adapted from include-what-you-use. Small targets with accurate deps mean a change rebuilds and retests fewer targets.

  • Don't add #includes a file doesn't use or deps a target doesn't use. When a change removes the last use of a header, delete its #include, then the dep if it's now unused.
  • Put deps whose headers are included only from .c++ files in implementation_deps, so they don't propagate to dependents.
  • Prefer direct includes and deps over relying on transitive ones, but don't add a long list just to spell out what you already get transitively. For instance, most workerd C++ sources depend on KJ but we don't declare this dependency for each target separately, or include kj/common.h, kj/string.h and so on each time. Direct includes that are already present and being used should generally stay in place.
  • Give each .h/.c++ pair its own wd_cc_library, named after the file (e.g. :tracked-wasm-instance). A header without a .c++ gets its own target too, with the deps it needs to compile on its own.
  • Keep each header in exactly one target, together with its .c++ if it has one. Exposing a header from a target that doesn't build its .c++ lets code call its functions without depending on their definitions, which shows up later as undefined-symbol link errors.
  • If splitting a pair out would create a dependency cycle, leave it in its combined target (e.g. //src/workerd/io) instead of separating the header from its .c++. Don't add new files to such targets if they can have their own.

Download now (ZIP)

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 3 mentionsFeb 2026: 0 mentionsMar 2026: 2 mentionsApr 2026: 3 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 7 mentionsSep 2026: 5 mentionsOct 2026: 4 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the cloudflare/workerd repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about cloudflare/workerd

The biggest 5 of 40 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 40

Talked about on GitHub, Bluesky, Hacker News and Stack Overflow (40 times).

On GitHub · 33

28 more on GitHub

On Hacker News · 2

On Stack Overflow · 1

Does 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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.