caching-and-incremental
Skill36 starsChanged 5 months agoMITView on GitHub
Always-on meta-skill — cache audit results per file by content hash so unchanged files aren't re-analyzed on subsequent runs. Activate on every /audit, /quick-scan, /audit-changes invocation.
In this repository44 other files it gives its agents.
- access-controlSkill
- approval-issuesSkill
- centralization-riskSkill
- confidence-scoringSkill
- cosmwasmSkill
- cross-chain-messagingSkill
- cross-contract-stateSkill
- delegatecall-risksSkill
- diamond-eip2535Skill
- dos-vectorsSkill
- erc1271-contract-signaturesSkill
- erc4337-account-abstractionSkill
- erc4626-inflationSkill
- false-positive-feedback-loopSkill
- fee-on-transferSkill
- flash-loan-attacksSkill
- initializationSkill
- inline-assemblySkill
- integer-issuesSkill
- intents-erc7683Skill
- known-good-comparisonSkill
- liquidation-cascadeSkill
- mev-frontrunningSkill
- mev-pbsSkill
- multi-pass-self-critiqueSkill
- oracle-manipulationSkill
- oracle-redundancySkill
- permit2-patternsSkill
- pragma-and-addressesSkill
- progress-and-streamingSkill
- reentrancySkill
- restaking-eigenlayerSkill
- selfdestruct-eip6780Skill
- signature-malleabilitySkill
- signature-replaySkill
- solana-anchorSkill
- storage-layoutSkill
- stylus-rustSkill
- token-compatibilitySkill
- tx-context-misuseSkill
- unchecked-callsSkill
- ve-lock-governanceSkill
- vyper-specificSkill
- zk-verifier-bugsSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Look up manifest[F] → cached_hash.
- Very specific: line 32
Verify skill-versions matches current skill set.
- Distinctive: line 33
If both match: return cached findings, mark file as cached in output.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Caching & incremental audit (meta-skill)
The first audit of a 50K-line codebase is slow. The second one shouldn't be. This skill governs cache reuse.
Cache layout
~/.cache/auditsentry/<repo-fingerprint>/
findings/
<sha256(file-content)>.json # findings for that exact file content
<sha256>.skill-versions # skill names + versions used to produce findings
manifest.json # mapping file-path → current sha256Repo fingerprint = sha256 of the absolute repo root path (so different checkouts don't collide).
Procedure (per file F to audit)
Step 1 — Compute current hash
current_hash = sha256(read F)
Step 2 — Check manifest
- Look up
manifest[F]→cached_hash. - If
cached_hash == current_hash:- Load
findings/<current_hash>.json. - Verify
skill-versionsmatches current skill set. - If both match: return cached findings, mark file as cached in output.
- Load
- Otherwise → audit fresh and write to cache.
Step 3 — Write fresh result
After audit completes:
write findings/<current_hash>.json- Update
manifest[F] = current_hash
Step 4 — Garbage collect
Periodically (e.g. weekly): drop findings/*.json not referenced from any current manifest.
Invalidation triggers
Re-audit even if hash matches when:
- The list of active skills has changed since the cached result
- A new vulnerability skill was added that may apply
- User passes
--no-cacheor--rerun .auditsentry.ymlconfig has changed (different severity threshold, profile, etc.)
Cache disable
RUGPROOF_NO_CACHE=1env varcache: falsein.auditsentry.yml--no-cacheflag on any audit commandRUGPROOF_OFFLINE=1does NOT disable the local cache (it's still local I/O)RUGPROOF_PRIVACY=1writes cache only to a temp dir that's wiped on exit
Output
In the audit summary, show:
Cache: 27 files cached (78%) · 8 files re-analyzed
Speedup: ~6.4× vs cold runThis builds trust that the cache is doing real work.
When NOT to cache
/audit-deep— too thorough; user wants fresh/audit-strict— same reason/audit-live— fork state changes; never cache/exploit*— exploit attempts must run fresh
Related
- [[false-positive-feedback-loop]] — dismissals are a separate cache
- [[multi-pass-self-critique]] — strict mode bypasses cache
- /audit, /quick-scan, /audit-changes — main consumers
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.

