About cache-expert
cache-expert is a skill for investigating and debugging caching in the Dagger Engine, whose GraphQL API runs workflows as DAGs of immutable operations. It points to current reference guidance and includes a Go script for analyzing cache snapshot dumps offline.
Key features
- 01Dagger cache architecture overview
- 02Reference guidance for cache investigations
- 03Debugging and CI trace instructions
- 04Offline cache snapshot analysis script
Use cases
- 01Investigating retained cache roots and closures
- 02Debugging cache behavior in Dagger
- 03Analyzing a cache snapshot dump offline
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ dagger/ dagger --skill cache-expertAfter installing, type/cache-expertin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/cache_persistence.mdcache_pruning.mdcachebasics.mddagqltypes.mddebugging.mddynamicinputs.mdegraph.mdfilesync.mdlazy_evaluation.mdmutablecache.mdsession_resources.mdtypedefs.mdwritingcoreapis.mdscripts/dagql-cache-analyzer.goDetails
From the project READMECache Expert
High-Level Architecture
The Dagger Engine serves a GraphQL-based API for building and executing DAG workflows.
Each operation takes immutable objects/scalar values as inputs and produces an immutable object/scalar value as output. "Mutability" is simulated as a DAG of these operations on immutable values, similar to functional programming.
This enables caching: since inputs are immutable and operations are deterministic, cache keys can be derived from the operation and its inputs.
DAGs of operations can be serialized as IDs, which have associated digests that serve as the operations' cache keys.
The reference docs in references/ are up to date and should be treated as current guidance for understanding the cache, persistence, pruning, lazy evaluation, session resources, filesync, typedefs, and e-graph behavior. The code remains the final source of truth, but the reference docs are expected to match the current implementation.
Always read the relevant reference docs for the cache area being debugged. For broad cache investigations, read all of them. references/debugging.md has critical instructions on running tests, replaying CI traces, and debugging generally.
Scripts
-
scripts/dagql-cache-analyzer.goAnalyze/debug/dagql/cachesnapshot dumps offline and summarize retained roots, result categories, and approximate cumulative closures.Usage:
go run ./skills/cache-expert/scripts/dagql-cache-analyzer.go /tmp/dagql.cache.1