mcpField
R
reset-agent-env

reset-agent-env

github.com/c0nantAgent workflows336 installsUpdated 2w ago
Repository

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

  1. 01Dry-run inventory grouped by agent
  2. 02Select agents with repeatable flags
  3. 03Reversible backup or hard deletion
  4. 04Surgical JSON configuration edits

Use cases

  1. 01Preview global agent configuration before cleanup
  2. 02Prepare a clean environment for testing
  3. 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-env

After installing, type/reset-agent-envin Claude Code to confirm it loaded.

Bundled filesscripts/reset-agent-env.sh

Details

From the project README

Reset 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/skills standard 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

AgentTargets
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/skills dir; best-effort for Cursor / Windsurf / Antigravity: only paths that already exist are ever touched.

  • JSON edits are surgical: settings.json keeps your model, theme, and other preferences; only the .hooks key 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
    

Comments

Markdown supported