agentleFS
ViviBeriViviBeri/webcraft-pro/skills/network-caching/SKILL.md

network-caching

Skill11 starsChanged 10 days agoMITView on GitHub

Improve network delivery when repeated requests, slow origins, large responses or poor cache policies affect page performance.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when origin latency, asset transfer, cache misses or inefficient resource discovery affect user journeys.

    line 8
  2. Distinctive:

    Use ETag or Last-Modified validators where they improve revalidation.

    line 19
  3. Distinctive:

    Use preload, preconnect or other resource hints only for resources proven critical and known early.

    line 21
  4. Distinctive:

    Verify cold-cache correctness, warm-cache speed, deployment freshness and privacy boundaries.

    line 22
  5. Distinctive:

    Never publicly cache user-specific responses or secrets.

    line 26
  6. Distinctive:

    Avoid long cache lifetimes for mutable HTML and unversioned assets.

    line 28
  7. Distinctive:

    Do not add resource hints speculatively.

    line 29
  8. Distinctive:

    Treat service workers as application code with lifecycle, update and stale-content risks.

    line 30
  9. Distinctive:

    Document waterfall evidence, cache policy by resource class, compression, CDN behavior, privacy considerations and deployment verification.

    line 36

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Network and Caching Performance

Use this skill when origin latency, asset transfer, cache misses or inefficient resource discovery affect user journeys.

Workflow

  1. Capture a network waterfall for cold and warm cache conditions.
  2. Separate origin response time, connection setup, redirects, transfer time and client processing.
  3. Reduce avoidable requests and payload bytes. Enable Brotli or gzip where supported and appropriate.
  4. Set explicit cache policies by resource type:
    • Fingerprinted static assets can use long-lived public caching and immutable semantics.
    • HTML and mutable entry documents should revalidate so deployments remain fresh.
    • Personalized or sensitive responses must not be shared through public caches.
  5. Use ETag or Last-Modified validators where they improve revalidation.
  6. Evaluate CDN placement, cache hit ratio, origin shielding and invalidation behavior.
  7. Use preload, preconnect or other resource hints only for resources proven critical and known early.
  8. Verify cold-cache correctness, warm-cache speed, deployment freshness and privacy boundaries.

Engineering rules

  • Never publicly cache user-specific responses or secrets.
  • Pair long-lived immutable caching with content-hashed or versioned URLs.
  • Avoid long cache lifetimes for mutable HTML and unversioned assets.
  • Do not add resource hints speculatively; each hint consumes connection or bandwidth resources.
  • Treat service workers as application code with lifecycle, update and stale-content risks.
  • Preserve correct Vary behavior and content negotiation.
  • Validate headers at the deployed edge, not only in local configuration.

Deliverables

Document waterfall evidence, cache policy by resource class, compression, CDN behavior, privacy considerations and deployment verification.

Common AI failure mode

Failure: An agent adds aggressive CDN, browser, or service-worker caching to improve performance but fails to separate public assets from user-specific or authorization-dependent responses, or fails to invalidate cached data when identity and permissions change.

Why it matters: A shared cache can serve one user's private response to another user, while a browser or service worker can display stale account data after logout, role changes, or tenant switching. The result can be a confidentiality breach or a misleading authorization state even when origin-side access control is correct.

Prevention: Classify responses by sensitivity and identity dependence before setting cache policy. Use private/no-store behavior for sensitive personalized responses unless a reviewed design proves a safe alternative; never rely on a cache key that omits relevant authorization or variation dimensions. Define explicit invalidation and service-worker update behavior for logout, account/tenant changes, and permission changes. Verify deployed CDN and browser headers with two distinct users, role changes, cold/warm caches, and service-worker-controlled reloads; confirm no private response crosses identities.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.