agents/skills/injectable/l1/write-error-divergence/SKILL.md
L1 trigger - audits file/database write paths for metadata commits, cache updates, and success returns that diverge when writes fail.
npx skillsauth add plamentsv/plamen write-error-divergenceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
L1 trigger:
STORAGEorDATABASE_TXflag OR file/DB write APIs detected (write_all,fs::write,rename,flush,commit,put,insert,batch,transaction) Inject Into:depth-state-trace,depth-edge-caseLanguage: Go and Rust Finding prefix:[WED-N]
Node clients often pair durable writes with in-memory metadata, indexes, caches, or database transactions. If metadata advances before the durable write succeeds, restart or reorg behavior can diverge from the actual persisted state.
For each storage path, enumerate the logical write unit:
| Write Unit | Data Write | Metadata/Index Update | Error Check | Rollback/Cleanup | Verdict | |------------|------------|-----------------------|-------------|------------------|---------|
Include:
For each write unit:
Ok(()), HTTP success, or actor success messages must be returned only after the write and required flush/commit complete.Tag evidence as [WED-METADATA-BEFORE-DATA:{file}:{line}], [WED-COMMIT-BEFORE-CHECK:{file}:{line}], [WED-SUCCESS-BEFORE-WRITE:{file}:{line}], or [WED-RESTART-DIVERGE:{file}:{line}].
Do not report internal best-practice issues unless a failed write can produce stale reads, corrupted state, replay, permanent data loss, fork-choice divergence, or a liveness failure after restart.
Use normal finding format. If no finding exists, still emit the write-unit table with file:line evidence for each safe rollback or commit path.
data-ai
Trigger Pattern Always (run during recon TASK 0, not breadth) - Inject Into Recon agent only (meta_buffer.md enrichment)
data-ai
Trigger Pattern Always (run during recon TASK 0, not breadth) - Inject Into Recon agent only (meta_buffer.md enrichment)
data-ai
Trigger Pattern Always (run during recon TASK 0, not breadth) - Inject Into Recon agent only (meta_buffer.md enrichment)
data-ai
Trigger STABLESWAP_FORK flag (fork-ancestry detects Curve/StableSwap parent via get_d/get_y/ramp_a/StableSwap patterns) - Agent Type general-purpose (standalone niche agent, 1 budget slot)