Scans and removes AI agent rules/skills files from all major AI coding platforms on your machine. Supports 50+ platforms, covering both project-level and user-global scopes, running on Windows · macOS · Linux.
Core Features:
--dry-run to confirm which files will be deleted before actually removing themAll Supported Platforms:
Cursor · Windsurf(Codeium) · Cline · Trae IDE · Amazon Q · Continue.dev
Claude Code · Codex CLI · GitHub Copilot · Gemini CLI · Aider · OpenCode
Amp · Goose · Kilo Code · Kiro (AWS) · Neovate · OpenHands · PI · Qoder · Roo Code · Zencoder
OpenClaw · QClaw · CoPaw · EasyClaw · ArkClaw · LobsterAI · HiClaw · AutoClaw · AntiClaw
Manus · HappyCapy · QoderWork · Droid (Factory)
WorkBuddy / CodeBuddy
After receiving a cleanup request, confirm the following with the user (skip if already specified):
project), global only ( global), or both ( all, default)?--no-backup (not recommended).Call scripts/clear_agent_rules.py. This script uses pure Python 3 standard library only, no additional dependencies needed.
Quick Start Examples
bash
# Preview mode (recommended to see what will be deleted first)
python scripts/clear_agent_rules.py --dry-run
# Clear current project + global, all platforms, auto backup (default behavior)
# Note: This skill is protected by default and won't be cleared
python scripts/clear_agent_rules.py
python scripts/clear_agent_rules.py --platforms cursor,claude,copilot
python scripts/clear_agent_rules.py --platforms openclaw,qclaw,copaw
python scripts/clear_agent_rules.py --platforms qoderwork
python scripts/clear_agent_rules.py --mode project
python scripts/clear_agent_rules.py --mode global
python scripts/clear_agent_rules.py --project /path/to/myproject
python scripts/clear_agent_rules.py --no-backup
python scripts/clear_agent_rules.py --yes
python scripts/clear_agent_rules.py --mode global --include-self
text
### Advanced Usage
```bash
# Clear only AI IDE platforms (Cursor, Windsurf, Cline, etc.)
python scripts/clear_agent_rules.py --platforms cursor,windsurf,cline,trae,amazonq,continue
# Clear only CLI tools (Claude Code, Copilot, Aider, etc.)
python scripts/clear_agent_rules.py --platforms claude,copilot,aider,gemini,codex
# Clear only project-level rules for specific platforms
python scripts/clear_agent_rules.py --mode project --platforms cursor,copilot
# Scan specific project directory
python scripts/clear_agent_rules.py --project /path/to/specific/project
# Export scan results without deleting (for manual review)
python scripts/clear_agent_rules.py --dry-run > scan_results.txt
Note: On Windows,
pythoncommand might bepython3orpy, depending on your environment.
ParameterDescriptionDefault--mode``project / global / all``all``--projectProject root directory pathCurrent working directory--platformsSpecify platforms (comma-separated)all``--no-backupDisable backupDisabled (backup by default)--dry-runPreview mode, don't actually deleteDisabled--yesSkip YES confirmation promptDisabled--include-selfDon't protect this skill, will also clear clear-skills itselfDisabled (protected by default)
Available Platform Identifiers:
text
cursor, windsurf, cline, trae, amazonq, continue,
claude, codex, copilot, gemini, aider, opencode,
amp, goose, kilocode, kiro, neovate, openhands, pi, qoder,
roocode, zencoder, droid,
openclaw, qclaw, copaw, easyclaw, arkclaw, lobsterai,
hiclaw, autoclaw, anticlaw, manus, happycapy,
qoderwork,
workbuddy
For detailed paths, see references/platforms.md.
CategoryPlatformMain Files/DirectoriesAI IDECursor.cursorrules, .cursor/rules/Windsurf.windsurfrules, .windsurf/rules/Cline.clinerules, .clinerules/Trae IDE.trae/project_rules.mdAmazon Q.amazonq/rules/Continue.dev.continuerc.json, .continue/rules/CLIClaude CodeCLAUDE.mdCodex CLIAGENTS.mdGitHub Copilot.github/copilot-instructions.mdGemini CLIGEMINI.mdAider.aider.conf.ymlOpenCodeAGENTS.md, CLAUDE.mdEmerging ToolsAmpAGENTS.mdGoose.goosehints, .goose/Kilo Code.kilocode/rules/Kiro (AWS).kiro/steering/, .kiro/NeovateAGENTS.mdOpenHandsconfig.toml, .openhands/PI.pi/settings.json, .pi/Qoder.qoder/rules/Roo Code.roo/rules/, .roorulesZencoder.zencoder/rules/Droid (Factory).droid/, AGENTS.mdOthersAntigravity.antigravity/rules.mdOpenClaw.openclaw/QoderWork.qoderwork/skills/WorkBuddy.workbuddy/skills/
CategoryPlatformPathAI IDECursor~/.cursor/rules/Cline~/Documents/Cline/Rules/Trae IDE~/.trae/user_rules.mdContinue.dev~/.continue/CLIClaude Code~/.claude/Gemini CLI~/.gemini/GEMINI.mdAider~/.aider.conf.ymlOpenCode~/.config/opencode/Emerging ToolsAmp~/.factory/AGENTS.mdGoose~/.config/goose/Kilo Code~/.kilocode/rules/Kiro (AWS)~/.kiro/Neovate~/.neovate/AGENTS.mdOpenHands~/.openhands/PI~/.pi/agent/settings.jsonRoo Code~/.roo/rules/Droid (Factory)~/.factory/OpenClaw EcosystemOpenClaw/QClaw etc.~/.openclaw/CoPaw~/.copaw/OthersManus~/.manus/HappyCapy~/.happycapy/QoderWork~/.qoderwork/skills/WorkBuddy~/.workbuddy/skills/NoteQoder/ZencoderProject-level only, no global config
Default Backup: Backs up all files to desktop before deletion ( ~/Desktop/agent-rules-backup-timestamp/), allowing recovery anytime.
Preview Mode: Use --dry-run to confirm which files will be deleted before actually executing.
Confirmation Prompt: Requires manual YES confirmation by default to prevent accidental operations.
Self-Protection (Enabled by Default):
--mode global or --mode all, this skill (clear-skills) is protected by default and won't be cleared.--include-self to disable self-protection.Smart Scanning: The script only scans and deletes files/directories that actually exist. If certain platforms are not installed on your system or their rule files don't exist, those empty targets won't be shown or deleted.
Q: Will this delete my project code?
A: No. This tool only removes AI agent rule/skill files (e.g., .cursorrules, CLAUDE.md, .workbuddy/skills/). Your source code and other files are completely safe.
Q: Can I recover deleted files? A: Yes. All files are automatically backed up to your desktop before deletion. You can manually copy them back if needed.
Q: What if I only want to clear one platform?
A: Use the --platforms parameter to specify which platforms to clean. Example: python scripts/clear_agent_rules.py --platforms cursor,copilot
Q: Why doesn't this skill get deleted when I clear global rules?
A: This is an intentional self-protection feature. The skill needs to exist to be able to clear itself. Use --include-self if you really want to delete it too.
Q: Does this work on Windows/macOS/Linux? A: Yes. The script uses pure Python and handles all three operating systems automatically.
Q: Can I run this in a CI/CD pipeline?
A: Yes. Use --yes --no-backup flags for non-interactive execution. Use with caution in automated environments.
Permission Denied Errors
Large Backup Size
--no-backup (not recommended) or manually manage backup locationPlatform Not Found