Nuke
AGENTS.md8.7k starsChanged yesterdayMITView on GitHub
Image loading for Apple platforms. This file is for agents and people working on Nuke itself. To write an app that uses Nuke, read llms.txt instead. The modules depend on each other as NukeExtensions → NukeUI → Nuke, and NukeVideo → Nuke. NukeUI re-exports Nuke. make ci runs exactly what CI runs: .scripts/ci.sh is the single source of truth for the matrix, and .github/workflows/ci.yml only passes it a group name. New CI work goes in ci.sh. CI runs NukeVideoTests on…
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 38
Tests: use Swift Testing: @Test, #expect, and @Suite(.timeLimit(.minutes(5))).
- Distinctive: line 52
Before tagging a release:
- Very specific: line 54
Run make llms and commit the three files it writes, on their own, so the diff of the release shows what changed for agents.
- Very specific: line 55
Run make release-check, which fails if they are stale.
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 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
Nuke
Image loading for Apple platforms. This file is for agents and people working on Nuke itself. To write an app that uses Nuke, read llms.txt instead.
Layout
| Path | What's there |
Sources/Nuke | The core: ImagePipeline, ImageRequest, ImageTask, caches, decoders, processors, diagnostics |
Sources/NukeUI | LazyImage, LazyImageView, ImageLoader, FetchImage, and animated image playback |
Sources/NukeExtensions | Soft-deprecated UIImageView extensions |
Sources/NukeVideo | Short video decoding and playback |
Documentation | DocC catalogs and migration guides, with Documentation/Migrations/Nuke 14 Migration Guide.md updated as changes land |
Tests/DocumentationSnippets | The code samples from the DocC articles and the skills, verbatim, as a package of their own |
Demo | The NukeDemo app, run from Nuke.xcodeproj |
The modules depend on each other as NukeExtensions → NukeUI → Nuke, and NukeVideo → Nuke. NukeUI re-exports Nuke.
Commands
make test-one TEST=ImageRequestTests/testInit # One test or suite, on macOS, with a count of what ran
make test-one TEST=LazyImageTests SCHEME=NukeUI PLATFORM=iOS
make ci-macos # One CI group; `make ci-list` lists them
make snippets # Compile the documentation samples
make llms # Regenerate llms.txt, llms-full.txt, and llms-api.txt (at the release)
make release-check # Fail if those three are stale
make docs # Build the docs site in .build/docs. It deploys nothing
make lint # SwiftLintmake ci runs exactly what CI runs: .scripts/ci.sh is the single source of truth for the matrix, and .github/workflows/ci.yml only passes it a group name. New CI work goes in ci.sh.
CI runs NukeVideoTests on macOS and on iOS 27 only, so run the NukeVideo scheme on tvOS too when you change Sources/NukeVideo. The NukeTests and NukeThreadSafetyTests schemes run Thread Sanitizer, which erases dispatch QoS, so use the Nuke scheme for anything about QoS or timing.
Conventions
- Tests use Swift Testing:
@Test,#expect, and@Suite(.timeLimit(.minutes(5))). Mocks are inTests/Mocks, and helpers inTests/Helpers. - Comments explain why, not what. Match the density and the voice of the file you're in.
- Performance is not traded for cleanliness. If the only way to remove an
@unchecked Sendablecosts time, leave it. Don't add a lock to satisfy the checker: if a property is written once before it escapes, annotate it withnonisolated(unsafe). - Removed API stays as an
@available(*, unavailable)stub whose message names the replacement, in aDeprecated.swift. The message goes straight into the compiler error, so it's the migration guide for anyone who doesn't read one. See the comment at the top ofSources/Nuke/Pipeline/Deprecated.swift. - A source-breaking change gets a section in the migration guide with
// Nuke 13and// Nuke 14samples. If the compiler can't report it, or a default changes, add it toskills/nuke-migrate/SKILL.mdas well. - A code sample in an article is compiled: add it to
Tests/DocumentationSnippets, verbatim. Declare a delegate conformance in an extension, which is the only place the compiler warns about a method that nearly matches a requirement. llms.txt,llms-full.txt, andllms-api.txtare generated from the articles, the skills, and the sources, and only regenerated at the release: don't commit them in a pull request. Every change to an article, a skill, or a public API changes them, so regenerating in each pull request made all of them conflict with each other. CI still checks what can go wrong in a pull request: that a skill is valid, that its samples are compiled, and that the files can be generated. A new article goes inARTICLE_ORDERin.scripts/generate-llms.py.skills/is what an agent reads to speed up Nuke (nuke-optimize), and to upgrade to it (nuke-migrate). When the recommended way to do something changes, change it here too. Every sample has to be in aSkill*Snippets.swiftfile inTests/DocumentationSnippets/Snippets, which CI checks. Only the// Nuke 14half of a migration sample is. A delegate method has to matchImagePipeline+Delegate.swift, which CI also checks, because compiling proves nothing about those.- A number in
nuke-optimizecomes from a measurement: note what it was measured on, and rerun it rather than estimating. CHANGELOG.mdis updated by the maintainer, in terse entries, one line each, with no period at the end and the PR linked.- Commits and PRs carry no
Co-Authored-By, session, or "Generated with" lines.
Releasing
Before tagging a release:
- Run
make llmsand commit the three files it writes, on their own, so the diff of the release shows what changed for agents. - Run
make release-check, which fails if they are stale. The generator reads the sources it is run on, so run it on the commit you are going to tag.
The files are what a project that depends on Nuke has in its checkout, at the version it resolved, so a tag cut without this step ships documentation from the last release.
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 28,693 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 repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- nuke-migrateSkill
- nuke-optimizeSkill
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
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.

