
content-hash-cache-pattern
Cache expensive file processing results using SHA-256 content hashes
by affaan-mFree
Description
content-hash-cache-pattern is an agent skill from the ECC collection by affaan-m, listed on skills.sh. It teaches a pattern for caching expensive file processing, such as PDF parsing, text extraction and image analysis, using a SHA-256 hash of the file's content as the cache key. Because the key is the content and not the path, cached results survive moves and renames, and they are invalidated automatically when the content changes. The skill includes how to add a --cache or --no-cache option to a CLI, and how to wrap existing pure functions with caching without changing them. A service-layer separation is part of the pattern. It applies when a pipeline reprocesses the same files and the processing cost is high. A skill is a SKILL.md file of instructions that an AI agent loads when a task calls for it. It is free and open source.…
Highlights
- SHA-256 content hash as cache key
- Survives file moves and renames
- Invalidates automatically on content change
- Adds --cache and --no-cache options
Ratings & Reviews
No ratings yet
Be the first to rate content-hash-cache-pattern.
People also visit
content-hash-cache-pattern FAQ
What does the content-hash-cache-pattern skill do?
It shows an agent how to cache slow file processing results by file content, so repeated work on the same files is skipped.
Why hash the content rather than the path?
Content hashes survive file moves and renames and update when the file's contents change, while path keys do not.
Which kinds of processing does it cover?
PDF parsing, text extraction and image analysis, as examples.
How do I install it?
Run: npx skills add https://github.com/affaan-m/ecc --skill content-hash-cache-pattern
Is it free?
Yes. It is free and open source.
Are there security findings?
The skills.sh listing shows Gen Agent Trust Hub, Socket and Snyk all passing.
What are the best content-hash-cache-pattern alternatives?
Popular alternatives to content-hash-cache-pattern include cache-strategist, netlify-caching and hivemind. See all content-hash-cache-pattern alternatives



















