About reset-agent-env
reset-agent-env is a Claude skill for inventorying and clearing global configuration across several agent harnesses. Its default dry run lists affected files, while confirmed apply mode backs them up for recovery or hard mode deletes them.
Key features
- 01Dry-run inventory grouped by agent
- 02Select agents with repeatable flags
- 03Reversible backup or hard deletion
- 04Surgical JSON configuration edits
Use cases
- 01Preview global agent configuration before cleanup
- 02Prepare a clean environment for testing
- 03Clear selected agent configurations before handoff
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ c0nant/ skills --skill reset-agent-envAfter installing, type/reset-agent-envin Claude Code to confirm it loaded.
Bundled filesscripts/reset-agent-env.sh
Details
From the project READMEReset Agent Environment
Wipe the global agent config on this machine: skills, hooks, rules, and MCP servers: across every agent harness, so you can test a from-scratch install or hand off a clean environment.
Destructive. The script defaults to a dry run; nothing is removed until you confirm a mode.
Process
1. Inventory (dry run)
Run the bundled script with no flags. It lists exactly what exists and would be removed, grouped by agent, and changes nothing:
bash ~/.claude/skills/reset-agent-env/scripts/reset-agent-env.sh
Show the user the output.
2. Confirm scope and mode
Ask the user two things:
- Which agents? All (default), or a subset via repeatable
--agent:claude·agents(the~/.agents/skillsstandard dir) ·cursor·windsurf·antigravity. - Backup or hard delete?
--apply(recommended): moves everything into~/.cache/agent-env-reset/<timestamp>/, so it's reversible.--hard: deletes outright, no backup.
3. Execute
Run with the chosen flags plus --yes (the user already confirmed):
# everything, reversible:
bash ~/.claude/skills/reset-agent-env/scripts/reset-agent-env.sh --apply --yes
# scoped + hard delete:
bash ~/.claude/skills/reset-agent-env/scripts/reset-agent-env.sh --hard --agent claude --agent cursor --yes
4. Report
Tell the user what was removed. For --apply, give the backup path and the
restore hint (move files back out of the backup dir).
This skill lives under ~/.claude/skills, so a full Claude Code reset removes
the skill itself: reinstall with npx skills@latest add C0nanT/skills before
using it again.
What it touches
| Agent | Targets |
|---|---|
| Claude Code | ~/.claude/skills, ~/.claude/hooks-lib, ~/.claude/hooks, ~/.claude/commands, ~/.claude/CLAUDE.md; surgically strips .hooks from settings.json / settings.local.json and .mcpServers from ~/.claude.json |
| Agent-Skills standard | ~/.agents/skills |
| Cursor | ~/.cursor/rules, ~/.cursor/mcp.json |
| Windsurf | ~/.codeium/windsurf/memories/global_rules.md, ~/.codeium/windsurf/mcp_config.json |
| Antigravity | ~/.antigravity, ~/.config/antigravity (best-effort) |
Notes
-
Coverage is complete for Claude Code and the
~/.agents/skillsdir; best-effort for Cursor / Windsurf / Antigravity: only paths that already exist are ever touched. -
JSON edits are surgical:
settings.jsonkeeps your model, theme, and other preferences; only the.hookskey is removed. -
The JSON steps need
jq. Without it, they're skipped with a warning (file-based removals still run). -
After resetting, reinstall to verify a clean setup:
npx skills@latest add C0nanT/skills npx @c0nant/claude-hooks install