Index of every page on this site: llms.txt
All skills
paulip114 avatar

/sre-data-reliability

@3f0545a
Run it yourself

Use when designing, operating or reviewing data pipelines, scheduled/cron jobs, backups and restores, or data integrity protections — pipeline SLOs, idempotency, handling stragglers and hot spots, distributed cron, defense in depth against data loss, and recovery testing. Based on Google SRE practice.

Use this Skill: https://skilld.dev/gh/paulip114/sre-practice-skills/sre-data-reliability

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈82 tokens for metadata: the name and description. ≈1.3k when used: this file.

Description uses 4.1% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈325 characters, or 4.1%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Data Pipelines, Scheduled Jobs and Data Integrity

Data integrity: what users need is restores, not backups

Users judge you by whether their data is there and correct when they ask for it. A backup that has never been restored is a hope, not a plan.

Threat model

Data loss comes from many combinations of:

  • Root cause: user error, application bugs, operator/automation error, infrastructure failure, malicious action, migration bugs.
  • Scope: wide (many entities) vs. narrow (one user/object).
  • Rate: sudden (big bang) vs. slow and creeping (a bug corrupting a little data each day for months).

Slow, creeping corruption is the most dangerous: by the time it's noticed, it's in every recent backup and replica.

Defense in depth

  1. First layer — soft deletion / undo: deleted data goes to a trash/tombstone state for a retention period (days to weeks) before purge; users and support can undo. Protects against user and application errors.
  2. Second layer — backups and recovery: versioned backups with retention long enough to catch slow corruption, stored in a separate failure domain and administrative domain (so the same bug or operator mistake can't delete both). Replication is not a backup — it faithfully replicates corruption and deletes.
  3. Third layer — early detection: continuous out-of-band validation that checks data invariants (referential integrity, counts, checksums, business rules) and alerts on drift. Detection time is what bounds how far back you need to restore.

Recovery

  • Define RPO (how much data loss is tolerable) and RTO (how fast you must recover) per dataset, and design backups to meet them.
  • Test restores continuously and automatically, end to end, from real backups; measure time to restore. Alert when a restore test fails.
  • Support partial/point restores (one user, one table, one time range), not just "restore everything".
  • Keep tooling and runbooks for recovery as production-grade as serving code.

Data pipelines

Design

  • Prefer continuous/streaming or frequent small batches over huge periodic batches when freshness matters; big periodic jobs create load spikes ("thundering herds") and long recovery after failure.
  • Make every stage idempotent and re-runnable; write outputs atomically (write then rename/commit).
  • Define pipeline SLOs: freshness, correctness, coverage/completeness, and end-to-end latency (sre-slos-and-error-budgets).
  • Handle stragglers and hot spots: split work into many small shards, rebalance dynamically, avoid skewed keys.
  • Schema changes and migrations: versioned schemas, backward/forward compatible readers, dual-writes and backfills staged and verified.
  • Isolate pipelines by priority so a large low-priority backfill can't starve a critical job.
  • Plan dependencies: know upstream sources, their SLOs, and what happens when they are late or bad; validate inputs and quarantine bad records instead of failing whole runs or silently passing garbage.

Operating

  • Monitor: freshness/lag at each stage, throughput, backlog, error/quarantine counts, data quality checks.
  • Alert on SLO (e.g. "data older than X for > Y% of reads"), not on every task failure.
  • Keep runbooks for: reprocessing a time range, skipping/quarantining poison inputs, backfills, and rolling back a bad output version.
  • Canary pipeline code and config changes on a subset of data and compare output against the previous version before full rollout.

Distributed cron / scheduled jobs

  • Run the scheduler itself redundantly with leader election via a consensus system, so one machine's failure doesn't skip or double-run jobs.
  • Persist launch state durably: record intent before launching and success after, so a new leader can tell whether a job ran.
  • Make jobs idempotent or have them check for prior completion; decide explicitly whether a missed run should be skipped or run late, and whether a double run is acceptable.
  • Spread start times (jitter, hashed minutes) to avoid everyone running at :00 and overloading shared systems.
  • Monitor for missed runs, overruns (job still running at next start), and failures.

Review checklist

  • RPO/RTO defined per dataset; backups meet them?
  • Backups in separate failure + administrative domain; retention covers slow corruption?
  • Soft-delete / undo for user-facing deletions?
  • Automated, end-to-end restore tests with alerting?
  • Out-of-band data validation running?
  • Pipeline stages idempotent, atomic outputs, freshness/correctness SLOs?
  • Scheduled jobs survive scheduler failure without skipping or double-running?

Sources

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    This skill is a collection of SRE best practices for data reliability and contains no executable code, network operations, or sensitive data access.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at 3f0545a. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated last month

README badge

README badge for paulip114/sre-practice-skills/sre-data-reliability