http-resume-integrity
Skill0 starsChanged 39 days agoMITView on GitHub
Use when interrupted or parallel HTTP downloads resume with corrupt bytes, a server ignores Range, or decompression and file offsets disagree.
In this repository66 other files it gives its agents.
- AGENTS.mdAGENTS.md
- postgres-locking-joinsSkill
- ai-bug-patternsSkill
- compressed-ndjson-boundariesSkill
- linux-io-latency-triageSkill
- macos-disk-space-recoverySkill
- minimal-sufficient-evidenceSkill
- modularize-large-filesSkill
- patch-reproducer-validitySkill
- prompt-cache-boundariesSkill
- proton-drive-selective-backupSkill
- transactional-outbox-deliverySkill
- conventional-commitsSkill
- git-advanced-mergingSkill
- git-bisect-forensicsSkill
- git-data-recoverySkill
- git-hooksSkill
- git-rerereSkill
- git-reset-mechanicsSkill
- git-revisions-syntaxSkill
- git-rewriting-historySkill
- git-submodulesSkill
- git-worktreesSkill
- github-ssh-keysSkill
- npm-publish-ci-pitfallsSkill
- sapling-stacked-pr-workflowSkill
- go-concurrency-patternsSkill
- go-data-idiomsSkill
- go-error-handlingSkill
- go-interfaces-embeddingSkill
- go-pprof-profilingSkill
- marketing-funnel-diagnosisSkill
- marketing-geo-experimentsSkill
- marketing-incrementalitySkill
- marketing-positioning-testsSkill
- python-descriptors-mroSkill
- python-logging-cookbookSkill
- python-scaling-regression-testsSkill
- python-unicode-gotchasSkill
- rust-compile-time-invariantsSkill
- rust-deterministic-concurrency-testsSkill
- rust-error-identity-boundariesSkill
- rust-regex-search-contractsSkill
- rust-runtime-bug-classesSkill
- rust-tokio-actor-deliverySkill
- rust-tokio-cancellation-safetySkill
- sales-discovery-qualificationSkill
- sales-mutual-action-plansSkill
- sales-pipeline-forecast-calibrationSkill
- sales-value-negotiationSkill
- ai-triage-evaluationSkill
- container-image-patchingSkill
- dependency-artifact-integritySkill
- dnssec-sentinel-diagnosticsSkill
- iam-policy-change-replaySkill
- rbvm-applicabilitySkill
- rbvm-asset-evidenceSkill
- rbvm-guarded-remediationSkill
- rbvm-priority-decisionsSkill
- rbvm-risk-exceptionsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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
- Distinctive: line 29
Before promoting the assembled artifact, check its expected total and independently trusted digest/signature when available.
- Distinctive: line 33
Run the original offline byte-splice fixture:
- Distinctive: line 46
Never disable TLS verification to make a resume succeed.
≈ “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
HTTP Resume Integrity
A checkpoint identifies a representation, not merely a URL and file length. Treat resumption as a conditional splice, not an append operation. Scope this recipe to sequential, single-range, identity-coded downloads.
Response gate
Send Range: bytes=N- with If-Range containing the saved strong ETag. A weak ETag is unsuitable. Byte offsets address the encoded representation; transparent decompression changes the coordinate system.
| Response | Local action before publishing bytes |
206 | Validate single-part byte range, start N, inclusive end, unchanged total, matching strong ETag, coding, and actual body length. A shorter valid interval needs another request. |
200 | Never append. Stage a new full transfer with new metadata; replace only after validation. |
416 | Reconcile metadata; bytes */L alone does not prove the local file is complete or correct. |
| Error, malformed range, changed identity | Preserve the last verified checkpoint; stop or restart under the download policy. |
These conservative gates intentionally reject some legal responses, including unknown totals and multipart ranges. Broader clients need separate handling, not relaxed checks.
Checkpoint recipe
- Persist effective resource identity, representation-selecting request context, ETag, total length, byte domain, and committed prefix together. Isolate destinations by job; do not store secrets in logs. Changes in redirect target or selection context invalidate this checkpoint unless equivalence is independently established.
- Request
Accept-Encoding: identity, then inspect the response. Requests automatically decompresses throughiter_content; a file length measured after decoding is not a safe resume offset. Verify the adapter exposes the intended bytes. - Stage each bounded response separately. Validate headers, count bytes, and require successful transfer completion before advancing the checkpoint. A timeout, short body, or exhausted retry budget leaves the prior prefix intact. Limit total bytes, response size, elapsed time, and attempts independently.
- Serialize checkpoint commits or compare generations before committing; two successful concurrent retries must not append the same suffix twice. File length alone does not establish contiguous coverage for parallel downloads.
- Before promoting the assembled artifact, check its expected total and independently trusted digest/signature when available. An ETag is not an authenticity guarantee. Follow dependency-artifact-integrity before executing downloaded packages.
Example: old bytes AAAA1111, new bytes BBBB2222; resuming after four bytes without identity checks produces AAAA2222. Its length is correct, but it belongs to neither version.
Run the original offline byte-splice fixture:
python3 skills/engineering/http-resume-integrity/reproduce.pySee primary sources and validation limits. No HTTP-client integration or production downloader is supplied.
Pitfalls
Accept-Rangesadvertises support, not a future response guarantee.curl -C -derives an offset from local files; that does not establish their provenance.- A matching length or clean transport exit cannot authenticate artifact bytes.
- Never disable TLS verification to make a resume succeed.
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.

