detect-deployment-thrashing
Skill3 starsChanged 2 days agoApache-2.0View on GitHub
Use when an optimization campaign on Kubernetes involves infrastructure changes (pod restarts, StatefulSet recreations, image rebuilds) and the ratio of deployment operations to actual benchmark runs exceeds 2:1. Use when more than 10 minutes pass between benchmark results, or when kubectl operations dominate session activity.
In this repository37 other files it gives its agents.
- docs/manual/agents.mdAGENTS.md
- ablate-combined-changesSkill
- agent-supervisor-methodologySkill
- benchmark-comparisonSkill
- browser-vlm-acceptanceSkill
- claim-verificationSkill
- claude-code-best-practicesSkill
- code-attributionSkill
- comms-connectSkill
- condition-based-waitingSkill
- conference-intelligenceSkill
- deep-research-methodologySkill
- defense-in-depthSkill
- directory-cross-examinationSkill
- doc-freshness-auditorSkill
- eval-harnessSkill
- github-comment-managerSkill
- github-deep-researchSkill
- github-issue-responseSkill
- harness-setupSkill
- issue-closure-strategistSkill
- issue-quality-assessmentSkill
- k8s-configmap-runtime-patchSkill
- k8s-config-persistence-trapSkill
- maintainer-profilingSkill
- measure-before-theorizeSkill
- multi-phase-optimization-campaignSkill
- phase-trackerSkill
- pptx-slide-creationSkill
- pr-issue-scannerSkill
- public-root-reproducibilitySkill
- repo-organizerSkill
- root-cause-tracingSkill
- technique-versioning-workflowSkill
- wrong-layer-debuggingSkill
- wrong-theory-cascade-preventionSkill
- youtube-transcriberSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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 10
Measure your deployment:test ratio: If you spend more time restarting pods than running benchmarks, you are thrashing.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
Detect Deployment Thrashing
Overview
Measure your deployment:test ratio. If you spend more time restarting pods than running benchmarks, you are thrashing. Target: 5+ experiments per hour. Below 3/hour, stop and fix your experiment loop.
When to Use
- More than 10 minutes between benchmark results
- Doing
kubectl delete/applyinstead ofkubectl set env - Rebuilding Docker images for env var changes
- Session is 80%+ kubectl commands with <20% benchmark data
- Running the same experiment multiple times due to pod crashes
The Efficiency Ladder
| Method | Time to Change | When to Use |
kubectl set env statefulset/<name> VAR=VAL | ~60s (rolling restart) | Env var experiments (ALWAYS use this) |
kubectl patch configmap | ~30s (if pod watches) | Config file changes |
kubectl exec -- sed -i | ~5s (hot patch) | One-line code tweaks for testing |
kubectl delete sts && apply | ~5 min | Schema changes to StatefulSet |
| Docker rebuild + ECR push + redeploy | ~15-30 min | Source code changes, new libraries |
Self-Check: Am I Thrashing?
Count in last hour:
Benchmark results captured: ___
kubectl apply/delete/create: ___
Pod restarts observed: ___
RATIO = kubectl_ops / benchmark_results
Ratio < 2:1 → Healthy
Ratio 2-5:1 → Warning — simplify your loop
Ratio > 5:1 → STOP. Fix deployment method before continuing.Common Traps
| Trap | Waste | Fix |
| Recreate StatefulSet for env var change | 5 min instead of 60s | Use kubectl set env |
| Rebuild image for env var test | 15 min instead of 60s | Env vars go in StatefulSet spec, not Dockerfile |
| Delete pod to "clean state" | Triggers CrashLoopBackOff timing issues | Let rolling update handle it |
| Wait for ProcessGroup cleanup (600s) | Wasted 10 min | Capture results in the 600s window, then let it crash |
| Re-read documentation between every experiment | 65% of session on reading | Read once, make a checklist, execute |
Quick Protocol
1. Change ONE env var: kubectl -n <ns> set env sts/<name> VAR=VAL
2. Wait for rollout: kubectl rollout status sts/<name> --timeout=180s
3. Wait for benchmarks: watch for test_*.py to finish (~5-7 min)
4. Capture: grep results from /tmp/bench_ll.log
5. Record: append to CSV immediately
6. Revert: kubectl set env sts/<name> VAR=ORIGINAL
7. Repeat. Target: 5+ experiments/hour.<!-- imported on 2026-10-31 by tools/import-skills.py from a native Claude Code instance's skill library; the source site's names, ids, hosts and paths are scrubbed to <placeholders>; its other files were not copied -->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.

