
Content-Hash File Cache
Teaches the agent to cache costly file-processing results keyed by SHA-256 content hash
- Repository
- affaan-m/ECC
- Stars
- 295,127
- Licence
- MIT
- Files
- 1 file
What it does
This skill gives the agent a design pattern for speeding up file-processing code such as PDF parsing, text extraction, or image analysis. Results are stored under a fingerprint (SHA-256 hash) of the file's contents, so the same file is not reprocessed, even if it is moved or renamed, and a changed file automatically gets fresh results. The agent is guided to add this as a separate caching layer without altering the original processing functions.
Great for
- Developers building file ingestion pipelines (PDF, OCR, text extraction, image analysis)
- Engineers adding a --cache/--no-cache option to a command-line tool
- Teams running batch jobs where the same files recur across runs
Skip it if
- Data that must always be current, such as real-time feeds, where cached results could be stale
- Very large cached outputs, where the skill itself suggests streaming instead
- Results that depend on settings other than file contents (for example different extraction options), since the hash key would not capture them and could return wrong cached output
Try asking
- “Add a content-hash cache to my PDF text extraction pipeline so re-runs skip unchanged files”
- “Wrap my existing extract_text function with a cache layer that I can turn off with --no-cache”
- “Refactor my batch image-analysis script so repeated files are not reprocessed”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 1 original files, the MIT licence and an attribution note.
content-hash-cache-pattern.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip content-hash-cache-pattern.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip content-hash-cache-pattern.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Ask the agent to include extraction settings in the cache key if results vary by options, since the base pattern hashes only file contents
- Review the cache directory location and add it to .gitignore so cache files are not committed
- Check that the agent's code matches the documented pattern: hash in chunks, keep processing functions pure, and treat corrupt cache entries as misses
What's inside
- SKILL.md
Redistributed unmodified from affaan-m/ECC under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.