env-stabilize
Keeps development environments stable and reproducible via drift detection and manifest locking.
Install
mkdir -p .claude/skills/env-stabilize && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18879" && unzip -o skill.zip -d .claude/skills/env-stabilize && rm skill.zipInstalls to .claude/skills/env-stabilize
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
How to keep the environment reproducible and drift-free — the detect/drift, doctor-diagnostic, and content-hashed lock discipline envctl uses, plus how the built-in agent-env engine (envctl agent) provisions and locks the agent config. Use when checking environment health, diagnosing drift, regenerating or verifying a lock, or making the agent environment reproducible. Triggers: 'is the environment stable', 'check for drift', 'run doctor', 'the lock is stale', 'make this reproducible', 'env is inconsistent', 'sync the agents'.Key capabilities
- →Detect drift in the agent environment
- →Run doctor diagnostics for environment health
- →Provision and lock agent configuration
- →Verify content-hashed lock files
- →Synchronize agent skills and MCP assets
How it works
The skill uses `envctl` and its built-in agent-env engine to detect environment drift, run diagnostics, and provision agent configurations, ensuring reproducibility through content-hashed lock files.
Inputs & outputs
When to use env-stabilize
- →Check environment stability
- →Detect configuration drift
- →Sync agent environment
- →Verify lock files
About this skill
Environment Stabilization (drift · doctor · lock)
A stable environment is fully declared and reproducible: every tool and every agent-config
file is described by a manifest/source and pinned by a content hash, so drift is detectable and
repair is mechanical. Three layers own it: the nix profile (lifeos-foundation-yzx, built
from the local yazelix checkout) owns every toolchain binary; envctl owns meta-local
components (manifest/*.toml, envctl.lock); the built-in agent-env engine
(crates/agent-env, driven by envctl agent) owns the .claude/.codex toolkit
(agent-env.yaml → agent-env.lock). kasetto was absorbed into crates/agent-env and the
external binary retired (TASK-0018/#98; files renamed kasetto.* → agent-env.*, TASK-0040) —
every kasetto verb is dead.
The Three Disciplines
1. Drift detection
Drift = live state diverges from declared state. For the agent environment, drift = installed
.claude/.codex skills/MCPs differ from agent-skills/ + agent-env.yaml. Detect before
trusting; never "fix" by editing live synced files (that hides drift) — fix the source and
re-sync. Drift gate: envctl agent lock --check --locked (read-only, zero-network, exit 1 on drift;
CI: ci/gates/agent-env.sh).
2. Doctor diagnostics
A doctor pass is a read-only health report: present / broken (detects-present, fails verify) /
missing / drifted. Run before and after any environment change: envctl doctor (box),
envctl agent lock --check --locked (agent layer), yzx doctor (yazelix runtime). Non-green doctor =
blocker, not warning.
3. Content-hashed lock
The lock is the manifest-of-record, committed and CI-gated. envctl commits envctl.lock
(components, content-hashed; gate lock --check). The agent layer commits agent-env.lock
(skills + MCP assets, hashes OS-normalized). The lock is authoritative: a plain
envctl agent sync installs exactly what the lock pins; only an explicit update re-resolves
moving sources.
envctl agent as the Stabilizer
- Source of truth:
agent-skills/+agent-env.yaml(project scope), targetingclaude-code+codex. Config override:ENVCTL_AGENT_CONFIG. envctl agent sync --applywrites skills into each agent dir, merges MCP servers additively into each agent's native format (Claude JSON, Codex TOML), records everything inagent-env.lock. Preview (no--apply) is the default — fail-closed, dry-run ethos.- Reproducibility test: a second sync is a no-op. If it is not, something drifted — investigate before proceeding.
- CI gate:
ci/gates/agent-env.shrunsenvctl agent lock --check --locked.
Layer table — compose, don't duplicate
| nix profile | envctl | envctl agent (agent-env) | |
|---|---|---|---|
| Manages | toolchain binaries and runtimes | meta-local components, wiring, daemons | the agent toolkit (skills · MCPs) |
| Targets | ~/.nix-profile / toolbin | $META_ROOT, manifest/*.toml surfaces | .claude/ + .codex/ |
| Lock / verbs | flake.lock; yzx update local_source, yzx doctor | envctl.lock; doctor/install/auto-fix/reset/lock --check | agent-env.lock; agent sync [--apply], agent lock --check --locked |
Rules that make it pay off:
- One source of truth — never hand-edit what the sync owns. Change
agent-skills/+agent-env.yaml, thenenvctl agent sync --apply; never touch the generated.claude/skills/<managed>/*,.mcp.json,.codex/config.toml. - Multi-agent parity for free. One config keeps
claude-codeandcodexconsistent. - Know what stays OUT of the sync. The hand-authored harness skills named in envctl
CLAUDE.md(the feature-forge family,env-install-loop,auto-provision,session-relay*) are git-tracked and edited in place — bespoke, fast-iterating orchestration. The sync is for the stable, locked baseline only. - Toolchain requests route to the owner. A missing binary is a nix-profile item
(yazelix flake →
yzx update local_source), not an ad-hoc install and usually not an envctl component.
Stabilization Workflow
envctl doctor+envctl agent lock --check --locked+yzx doctor→ baseline health.- Reconcile:
.claude/.codexmanaged surfaces come fromagent-skills/, nothing else. - Edit source →
envctl agent sync --apply→ commitagent-env.yaml+agent-env.lock. - Re-run sync → confirm no-op (proves reproducibility).
- From now on, changes go through the source + sync, never by hand-editing live agent files.
Why
Without lock + doctor + drift discipline the environment silently rots: someone edits a live
.claude file, a regen overwrites it, conventions drift, and agents act on stale config.
Locking makes the environment a committed, verifiable artifact.
When not to use it
- →When hand-editing generated `.claude`/`.codex` files directly
- →When installing missing binaries via ad-hoc methods instead of nix-profile
- →When needing to modify git-tracked harness skills
Limitations
- →Drift detection compares live state to declared state
- →Doctor diagnostics provide a read-only health report
- →The lock file is authoritative for `envctl agent sync` operations
How it compares
This skill enforces a content-hashed lock discipline for environment stability, ensuring reproducibility and detectable drift, unlike environments managed by manual edits or ad-hoc installations.
Compared to similar skills
env-stabilize side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| env-stabilize (this skill) | 0 | 14d | No flags | Advanced |
| ops | 0 | 19d | Review | Advanced |
| storage-networking | 6 | 6mo | Review | Advanced |
| kubernetes-architect | 6 | 3mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
ops
denniszielke
>
storage-networking
pluginagentmarketplace
Master Kubernetes storage management and networking architecture. Learn persistent storage, network policies, service discovery, and ingress routing.
kubernetes-architect
sickn33
Expert Kubernetes architect specializing in cloud-native infrastructure, advanced GitOps workflows (ArgoCD/Flux), and enterprise container orchestration. Masters EKS/AKS/GKE, service mesh (Istio/Linkerd), progressive delivery, multi-tenancy, and platform engineering. Handles security, observability, cost optimization, and developer experience. Use PROACTIVELY for K8s architecture, GitOps implementation, or cloud-native platform design.
senior-devops
davila7
Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup, infrastructure as code, deployment automation, and monitoring. Use when setting up pipelines, deploying applications, managing infrastructure, implementing monitoring, or optimizing deployment processes.
gitops-workflow
sickn33
Implement GitOps workflows with ArgoCD and Flux for automated, declarative Kubernetes deployments with continuous reconciliation. Use when implementing GitOps practices, automating Kubernetes deployments, or setting up declarative infrastructure management.
k8s-manifest-generator
wshobson
Create production-ready Kubernetes manifests for Deployments, Services, ConfigMaps, and Secrets following best practices and security standards. Use when generating Kubernetes YAML manifests, creating K8s resources, or implementing production-grade Kubernetes configurations.