naiemk/vibed-infra/persist-logs
Claude Code and agent skill by naiemk/vibed-infra
- community
Checking that the SKILL.md file is still in the repository.
Design recoverable apps on vibed-infra using append-only persist logs (local WAL + batched R2/S3 ship). Use when an app must rebuild state from events without relying on a database.
Install
npx vskill@latest install naiemk/vibed-infra/persist-logsSKILL.md
The same SKILL.md was published earlier as naiemk/vibed-infra/persist-logs.
Persist logs (event WAL)
Goal
Each service writes domain events to a durable local log. After DB loss (or with no DB), replay rebuilds state. Shipping to R2/S3 is batched so small apps stay near $0.
Paths
- Machine config (credentials + host cron leftover):
~/services/vibed-infra/persist-logs/(one-timeinstall-persist-logs.sh) - Per deployment: Docker named volume
${DOCKER_NAME}-persistmounted at/persist-logs(default). SetPERSIST_LOGS=0to disable. Bind escape:PERSIST_LOG_BIND=1+PERSIST_LOG_DIR=…. - Ship sidecar
${DOCKER_NAME}-persist-shipshares only that persist volume (no Docker socket, no app/data). Uses machine.envfor R2/S3; app container does not get those secrets. - Object keys:
{machine}/{PERSIST_SHIP_PREFIX}/{rel}(prefix defaults to the app container name).
Algorithm
- Append NDJSON to
wal.ndjsonwith fsync (fast, free). - Seal →
seg-NNNN.ndjson.gzat ~8 MiB or ~60s. - Ship sealed segments with one PUT each (
PERSIST_SHIP=1+ R2/S3 env). DefaultPERSIST_SHIP=0(local only). Sidecar prefers stdlib SigV4; host cron may useawsCLI. - Replay sealed + wal in order.
Python: lib/persistlog — append, seal, iter_events, replay.
Inspect on the VPS
Event schema
Log these
- State transitions: created, succeeded, failed
- Money/balance-affecting facts (wallet in/out)
- Job lifecycle, note creates (hello example)
Do not log
- Secrets, raw passwords, full card data
- Huge blobs (store object key instead)
- Noisy HTTP access logs (use docker logs)
Recovery
Cost
Prefer Cloudflare R2 (free tier ~10 GB + 1M Class A ops/month, zero egress). Batch seals — never per-event PUT.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/persist-logs/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/naiemk/vibed-infra/persist-logs)