CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

content-hash-cache-pattern

使用SHA-256内容哈希缓存昂贵的文件处理结果——路径无关、自动失效、服务层分离。

Quality

67%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

Fix and improve this skill with Tessl

tessl review fix ./docs/zh-CN/skills/content-hash-cache-pattern/SKILL.md
SKILL.md
Quality
Evals
Security

Quality

Content

67%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A strong, well-structured pattern skill: executable code, explicit design rationale, anti-patterns, and clear applicability boundaries, with built-in graceful corruption handling. Its main weaknesses are redundancy between the activation/applicability sections and the undefined serialization helpers that keep the examples from being fully runnable.

Suggestions

Merge the duplicate "何时激活" and "适用场景" sections into one trigger section, and trim the "关键设计决策" table entries that restate inline rationale.

Provide minimal definitions (or a one-line sketch) for serialize_entry/deserialize_entry and note that extract_text/ExtractedDocument are the project's own pure function and result type, so the examples run as written.

Add a short numbered integration sequence (hash → read cache → extract → write cache, with the corruption-as-miss fallback) so the pattern can be assembled without stitching the four code snippets mentally.

DimensionReasoningScore

Conciseness

The body is mostly lean — code snippets are tight and it explains only pattern-specific rationale (e.g. "为什么使用内容哈希?文件重命名/移动 = 缓存命中") — but there is real redundancy: the "适用场景" section repeats nearly the same four bullets as "何时激活", and the "关键设计决策" table restates rationales already explained inline. This matches 'Mostly efficient but includes some unnecessary explanation or could be tightened'; not a 4 because the duplicated scenario/rationale sections are more than minor trims.

3 / 5

Actionability

The code is concrete and nearly copy-paste ready: chunked SHA-256 hashing, a frozen CacheEntry dataclass, write_cache/read_cache with corruption handling, and a complete extract_with_cache wrapper showing the full cache-check/extract/store flow. It falls short of 5 because serialize_entry/deserialize_entry, extract_text, ExtractedDocument, and logger are referenced but never defined, so the examples are not fully executable as-is.

4 / 5

Workflow Clarity

The service-layer wrapper embodies a clear sequence ("cache check -> extraction -> cache write") with an in-code validation checkpoint: read_cache catches JSONDecodeError/ValueError/KeyError and treats corruption as a cache miss, giving graceful degradation for the batch-reprocessing use case. Not a 5 because there is no explicit step-by-step checklist for integrating the pattern (readers must stitch four snippets together themselves), and not a 3 because corruption handling and logging provide the key checkpoints.

4 / 5

Progressive Disclosure

No bundle files exist (references/, scripts/, assets/ are absent) and none are needed for a single self-contained pattern; the body is well-organized with clear section headers (activation triggers, core pattern, design decisions, best practices, anti-patterns, applicable/non-applicable scenarios), matching 'Good structure; most content is appropriately placed'. Not a 5 because at ~160 lines with some duplicated scenario content, a tightened single overview plus clearly separated detail would navigate even more easily.

4 / 5

Total

15

/

20

Passed

Description

53%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

The description communicates a precise, distinctive technical pattern but reads more like a design summary than a skill description: it answers 'what' well and omits 'when' entirely. Adding an explicit use-when clause naming the concrete file-processing scenarios (PDF parsing, OCR, text extraction) would fix both the completeness cap and the thin trigger-term coverage.

Suggestions

Append an explicit trigger clause, e.g. 'Use when building file-processing pipelines (PDF parsing, OCR, text extraction) where the same files are processed repeatedly, or when adding a --cache/--no-cache option.'

Include the concrete processing targets from the body (PDF 解析、文本提取、图像分析) as trigger terms so users searching for those tasks find this skill.

State the capability in third-person voice ('缓存…' / 'Caches…') rather than the imperative '使用…' to match description conventions.

DimensionReasoningScore

Specificity

The description names a concrete mechanism — "使用SHA-256内容哈希缓存昂贵的文件处理结果" (cache expensive file-processing results via SHA-256 content hash) — plus properties ("路径无关、自动失效、服务层分离"), but lists only this single action without the concrete processing targets (PDF parsing, text extraction, image analysis) that the body covers, matching the anchor 'Names domain and 1-2 concrete actions, but not comprehensive'. It is not a 4 because 'path-independent / auto-invalidation / service-layer separation' are properties of one action rather than several distinct specific actions.

3 / 5

Completeness

The 'what' is clear (content-hash caching of expensive file-processing results), but there is no 'Use when...' clause or equivalent trigger guidance, which per the rubric caps completeness at 3 ('Has a clear what but when is missing or only weakly implied'). Not a 4 because no usage context is stated even implicitly.

3 / 5

Trigger Term Quality

Relevant keywords exist ("SHA-256", "内容哈希", "缓存", "文件处理"), but the natural phrases a user would say when needing this skill — PDF, 解析, 文本提取, 图像分析, .pdf, 命中/失效 as synonyms — are absent from the description even though they appear in the body. This matches 'Some relevant keywords but missing common variations or synonyms'; not a 2 because the terms present are specific to this niche rather than generic.

3 / 5

Distinctiveness Conflict Risk

"SHA-256内容哈希" + "服务层分离" carves out a clear, narrow niche (content-addressed caching) that is unlikely to fire for unrelated skills, matching 'Mostly distinct; minor overlap risk with closely related skills'. Not a 5 because the generic phrase "文件处理结果" could overlap with general file-processing or generic caching skills since no unique trigger phrases are given.

4 / 5

Total

13

/

20

Passed

Validation

93%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

frontmatter_unknown_keys

Unknown frontmatter key(s) found; consider removing or moving to metadata

Warning

Total

15

/

16

Passed

Repository

xu-xiang/everything-claude-code-zh

Path

docs/zh-CN/skills/content-hash-cache-pattern/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.