plugin/skills/env-analyze/SKILL.md
Use this skill when troubleshooting a deployment, debugging CI flakes, validating an environment before deployment, or when local diagnostics need to span more than just Docker — the multi-scope environment diagnostic covering Kubernetes, CI runner, network, resource usage, and a cross-scope drift snapshot for baselining across runs, with optional `--auto-fix` for container-level safe actions. For Docker-only local triage use `/analyze-local`. Not for code bugs (use /bugfix) or application-level diagnostics (use /spike).
npx skillsauth add avav25/ai-assets env-analyzeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Read-only diagnostic that produces a structured ENV-REPORT.md for the current environment. Optional --auto-fix applies ONLY container-level safe actions; anything outside that scope requires manual escalation.
/bugfix/spike/analyze-prod (carried) + on-call/env-analyze
/env-analyze --scope local
/env-analyze --scope docker --auto-fix
/env-analyze --scope ci
| Flag | Default | Effect |
|---|---|---|
| --scope | auto-detect | local (Docker/K8s detected), docker, kubernetes, ci |
| --auto-fix | off | Apply container-level safe fixes only — see scope below |
--auto-fix scope (explicit boundary)In scope (safe):
Out of scope (manual escalation only):
<repo>/.ai-skills-memory/env-reports/<run-id>/ENV-REPORT.md with tables:
If --auto-fix: list of actions taken + per-action success/failure outcome.
| Agent | Model | Effort | Tools | Role |
|---|---|---|---|---|
| sre-engineer | inherit | high | Bash, Read, Grep, Glob | Docker/K8s diagnostics, log analysis |
| devops-engineer | inherit | high | Bash, Read, Grep, Glob | CI/CD environment diagnostics |
┌─ Scope detection: check for docker-compose.yml, k8s config, CI runner config
│
├─ SRE + DevOps in parallel (Wave 1):
│ ├─ sre-engineer:
│ │ - docker inspect, docker logs, docker stats (or kubectl get pods/nodes/logs)
│ │ → SRE-REPORT.md (containers, logs, resource usage)
│ │
│ └─ devops-engineer:
│ - CI runner health (GitHub Actions, GitLab CI, etc.)
│ → DEVOPS-REPORT.md (job queue, runner status, cache age)
│
├─ Lead consolidates → ENV-REPORT.md (merged view + anomaly list)
│
├─ If --auto-fix:
│ │ Per safe action: oracle = post-action health check
│ │ Out-of-scope items flagged as "manual: <reason>"
│ └─ Report action outcomes
│
└─ Memory write: L4 environment baseline snapshot for drift detection
No RALF — diagnostic is pass-once. Each --auto-fix action has its own per-action oracle (the post-action health check).
Bash output from docker inspect, kubectl logs, docker stats etc. is normalized by tool-output-normalize.py hook (G2) when > 2000 tokens — large log dumps become envelope metadata + extracted top-k errors rather than raw bytes.
Pointer: plugin/eval/judge-rubrics/env-analyze.md (B10).
Dimensions:
Pass: avg ≥ 4.0, no dimension < 3.
| Layer | When | Shape |
|---|---|---|
| L4 | After analysis | .ai-skills-memory/env-reports/<run-id>/baseline.json — container states, resource usage, timestamps (for drift detection across runs) |
workflow_start — env-analyze + scopeagent_spawned × 2 (sre, devops)auto_fix_action — per action if --auto-fix enabledworkflow_end — COMPLETE with anomaly countsre-engineer, devops-engineer (both with Bash + Read + Grep + Glob)plugin/schemas/spawn-payload.schema.json (G7 spawn payloads)tool-output-normalize.py (G2 on large bash output), subagent-start-budget.py (G7 validation + budget)/bugfix Step 2 (local-Docker diagnostic), /team-bugfix (optional pre-pipeline context-gathering), /migrate (pre-flight env check)/analyze-local (Docker-only triage)development
Use this skill when running the recurring (daily) knowledge-base rescan for a repo that already has knowledge/.knowledge-sync.yml — the main-thread dispatcher that reads the config, computes the git delta since last_scanned_sha, maps changed paths to affected doc areas, early-exits cheaply when nothing changed, then fans out one Agent(content-writer) per affected area, applies the propose/direct update policy, advances the baseline only on success, and writes an L4 run log — all with the G1 untrusted-content choke-point, secret-scan, deny-list, and budget controls woven in. For first-time setup use /knowledge-sync-init.
development
Use this skill when bootstrapping scheduled knowledge-base sync for a repo that has no knowledge/.knowledge-sync.yml yet — to run one-time setup that detects the knowledge_root from CLAUDE.md/AGENTS.md, maps doc areas to source globs, records opt-in external sources (Linear/Notion/WebFetch, all disabled by default), captures a baseline last_scanned_sha, sets the per-area update policy, generates or seeds knowledge/CONVENTIONS.md, provisions the L4 memory dir, and offers to register the daily routine. Routes ongoing recurring sync operations to /knowledge-sync.
tools
Use this skill when bootstrapping a target repository to be ai-skills-aware — on the first run of any ai-skills workflow in a fresh repo, when adopting the ai-skills plugin in an existing repo, or after upgrading to a plugin version that adds new memory paths or templates, including when the user does not say "init" but asks to "set up" or "onboard" the repo — to detect codebase type, create CLAUDE.md + AGENTS.md scaffolding, initialize the .ai-skills-memory/ directory tree from L1 templates, and configure .gitignore. Idempotent — safe to re-run. Accepts `--codebase-type <type>` and `--overwrite`. Not for re-initializing only memory — use `/memory-init` instead.
tools
Use this skill when extending, repairing, or improving plugin assets, when ingesting a `/feedback` report as a fix-cycle backlog, or when you do not remember which lower-level command is right for the job — the umbrella workflow for ai-skills plugin-asset authoring and maintenance: creating, auditing, fixing, improving, refactoring, and migrating skills, agents, rules, hooks, prompts, schemas, and rubrics inside the plugin. Auto-classifies the request, loads the right knowledge skills (`@prompt-engineering`, `@context-engineering`, `@team-protocols`), and spawns the right subagents (`prompt-engineer`, `system-architect`, `python-engineer`, `software-engineer`, `qa-engineer`, `eval-judge`) via the `Agent` tool.