vaquarkhan/data-engineering-agent-skills/spark-serverless-reliability-and-state-management
Claude Code and agent skill by vaquarkhan/data-engineering-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Enforces timeout-aware rollbacks, resumable checkpoints, and orphan cleanup for serverless Spark workloads on AWS Lambda, Glue, and similar runtimes. Use when writing or reviewing Spark jobs in serverless environments, S3 checkpoint patterns, partial-failure recovery, or IceGuard-style state management.
Install
npx vskill@latest install vaquarkhan/data-engineering-agent-skills/spark-serverless-reliability-and-state-managementSKILL.md
The same SKILL.md was published earlier as vaquarkhan/data-engineering-agent-skills/spark-serverless-reliability-and-state-management.
Spark Serverless Reliability And State Management
Overview
Serverless Spark hides cluster failures behind short-lived runtimes and opaque retries. Silent partial writes, orphaned checkpoints, and timeout-induced corruption are common when agents treat serverless Spark like a long-running cluster job. This skill forces explicit state boundaries, resumable progress, and cleanup before any publish path opens.
When to Use
- implementing or reviewing Spark on
AWS Lambda,AWS Glueserverless, or comparable short-lived runtimes - designing S3-backed checkpoints, progress markers, or staged write paths
- recovering from timeout, OOM, or mid-batch partial failure without double-counting
- translating IceGuard-style checkpoint and rollback patterns into agent workflows
- hardening batch Spark that must survive cold starts, memory limits, and hard execution ceilings
Do not use this for always-on EMR or Databricks clusters unless the job also runs in a serverless path with hard time limits.
Workflow
- Classify execution risk before coding.
Document:
- maximum runtime and memory ceiling
- input cardinality and partition fan-out
- whether output is append, merge, or overwrite
- downstream consumers that would see partial data
- whether the job is restartable from a known offset or partition set
- Design a resumable checkpoint contract.
Require:
- durable progress markers in object storage (for example
s3://.../checkpoints/{run_id}/) - explicit run identifiers tied to orchestration metadata
- idempotent write semantics at the target grain
- a manifest or
_SUCCESS-style gate before publish - separation between staging prefixes and publish prefixes
Load references/spark-serverless-reliability-patterns.md for checkpoint layout and orphan-detection patterns.
- Implement timeout-aware rollback.
Before any publish:
- detect incomplete partitions or missing manifest files
- roll back staged outputs when the runtime approaches its ceiling
- persist last-good checkpoint state for resume
- block downstream publish when rollback is incomplete
- emit structured failure context (run id, partition range, bytes written)
- Plan orphan and zombie cleanup.
Include:
- TTL or lifecycle rules for abandoned staging prefixes
- a reconciliation job or hook that lists orphaned checkpoints older than N hours
- explicit ownership for cleanup automation
- guardrails against deleting in-flight runs
- Pair with observability before production.
Load mcp-data-observability-integration when live execution plans, stage metrics, or cluster signals are needed to diagnose OOM or skew before rollout.
- Prove recovery paths in a bounded slice.
Validate:
- forced timeout mid-batch resumes without duplicate publish
- rerun from checkpoint produces identical contract-compliant output
- orphan cleanup does not remove active runs
Common Rationalizations
| Rationalization | Reality | |
|---|---|---|
| "Lambda will just retry the whole function." | Retries can duplicate writes, leave orphaned staging data, and publish partial partitions. | |
| "We can write directly to the final table path." | Serverless timeouts make direct writes dangerous without staging and manifest gates. | |
| "Checkpointing is only for streaming." | Any resumable batch with hard runtime limits needs durable progress markers. | |
| "Glue handles cleanup automatically." | Managed runtimes do not guarantee orphan cleanup or rollback of partial lake writes. |
Red Flags
- writes go directly to publish paths with no staging boundary
- no run id or checkpoint manifest exists
- timeout handling is undefined
- partial S3 prefixes have no orphan detection or TTL policy
- resume logic cannot distinguish completed versus in-flight partitions
- agents scale partitions without checking memory ceiling per task
Verification
- [ ] Runtime limits, write mode, and idempotency grain are documented
- [ ] Checkpoint and staging layout support safe resume
- [ ] Timeout rollback and publish gating are explicit
- [ ] Orphan cleanup ownership and detection exist
- [ ] Recovery was proven on a bounded partition slice before full rollout
Security
- Security scanPassed, 95 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/spark-serverless-reliability-and-state-management/SKILL.md
Popularity
- Repository stars
- 48
- Repository forks
- 5
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. 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/vaquarkhan/data-engineering-agent-skills/spark-serverless-reliability-and-state-management)