---
id: 260415-nfi
slug: remove-env-setup
date: 2026-04-15
---

# Quick: Remove env-setup skill + subcommand

## Motivation

`env-setup` is a relic from v1.0 owl (skills-only, pre-plugin). In the plugin
era the SessionStart hook (`plugin-session-start`) handles env injection via
`CLAUDE_ENV_FILE` automatically. `env-setup` is redundant when the hook fires,
and actively harmful when it doesn't: its `settings.json` fallback pins the
binary path by version, which overrides the hook's dynamic injection on
upgrades and caused the Phase 18.1 "wrong binary" failure mode earlier this
session. Correct recovery is "restart the session" — not "run env-setup".

## Scope

Delete the skill, delete the subcommand, and purge the "run /spt:env-setup"
guidance from all skill files, doctor output, and DEPLOY.md. Rebuild,
redeploy, commit.

## Tasks

1. **Delete the skill directory** `plugin/spt/skills/env-setup/` (in-repo).
2. **Delete the Rust module** `src/owl/env_setup.rs`.
3. **Remove `mod env_setup;`** from `src/owl/mod.rs` (line 13).
4. **Remove the `Commands::EnvSetup` dispatch arm** from `src/owl/mod.rs`
   (lines 112-114).
5. **Remove the `EnvSetup` variant** from `src/cli.rs` (lines 120-121, plus
   the preceding doc comment).
6. **Update `src/owl/doctor.rs` line 105**: change
   `"missing: {} (run env-setup or restart Claude Code)"` →
   `"missing: {} (restart Claude Code to re-run the SessionStart hook)"`.
7. **Purge the `/spt:env-setup` guidance line** from every skill SKILL.md that
   contains it (18 skill files under `plugin/spt/skills/`). Replace the
   sentence `If commands fail with "command not found", run `/spt:env-setup`.`
   with `If commands fail with "command not found", restart the Claude Code
   session so the SessionStart hook re-runs.`.
8. **Update `docs/DEPLOY.md` line 142**: rewrite the "If env vars are missing"
   paragraph to say the recovery is to restart the session; remove the
   `/spt:env-setup` reference.
9. **Rebuild**: `cargo build --release` — must succeed cleanly.
10. **Test**: `cargo test --release` — all tests pass.
11. **Deploy** (per the DEPLOY.md flow updated in commit 4c5ee76):
    - Bump version in `plugin/spt/.claude-plugin/plugin.json`: `1.7.0` → `1.7.1`.
    - Copy binary into `plugin/spt/owl.exe`.
    - Sync to marketplace `~/.claude/plugins/marketplaces/cplugs/plugins/spt/`.
    - Wipe `~/.claude/plugins/cache/cplugs/spt/` and rebuild cache for 1.7.1.
    - Refresh active install at `~/.claude/plugins/spt/`.
12. **Commit** in-repo: `plugin/spt/skills/*/SKILL.md`, `plugin/spt/owl.exe`,
    `plugin/spt/.claude-plugin/plugin.json`, `src/`, `docs/DEPLOY.md`, and the
    quick task planning files.
13. **Commit + push** in marketplace repo
    (`~/.claude/plugins/marketplaces/cplugs/`).
14. **Verify** final audit: the five binary hashes (build / in-repo /
    marketplace / cache / active) all match, and `grep -rn "env-setup\|EnvSetup"
    src/ plugin/ docs/` returns nothing.

## Out of Scope

- `/spt:env-setup` slash command visibility in Claude Code's own slash command
  index — that updates when the marketplace is re-synced and `/reload-plugins`
  runs. No special action needed.
- Backward compat for users who had `env.OWL` / `env.LIVE` pinned in their
  `settings.json` — those still work as raw env vars, they just no longer get
  rewritten by any spt command. The stale-pin warning in DEPLOY.md line 143
  stays as-is.
