clear-skills
/install clear-skills
\r \r
Clear Skills Skill\r
\r
Overview\r
\r 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.\r \r Core Features:\r
- ✅ Smart Scanning: Only removes files/directories that actually exist. Platforms not installed or without rules won't be shown or removed\r
- ✅ Self-Protection: By default, this skill (clear-skills) is protected and won't be cleared, allowing safe cleanup of other platforms\r
- ✅ Auto Backup: Automatically backs up to desktop before deletion, allowing recovery anytime\r
- ✅ Preview Mode: Use
--dry-runto confirm which files will be deleted before actually removing them\r - ✅ Flexible Control: Supports filtering by platform, scope, project directory, and more\r
- ✅ Pure Python: Uses only Python 3 standard library, no external dependencies required\r \r All Supported Platforms:\r \r
Mainstream AI IDE\r
Cursor · Windsurf(Codeium) · Cline · Trae IDE · Amazon Q · Continue.dev\r \r
Agent Framework / CLI\r
Claude Code · Codex CLI · GitHub Copilot · Gemini CLI · Aider · OpenCode\r \r
Emerging AI Tools\r
Amp · Goose · Kilo Code · Kiro (AWS) · Neovate · OpenHands · PI · Qoder · Roo Code · Zencoder\r \r
OpenClaw Ecosystem\r
OpenClaw · QClaw · CoPaw · EasyClaw · ArkClaw · LobsterAI · HiClaw · AutoClaw · AntiClaw\r \r
Other AI Agents\r
Manus · HappyCapy · QoderWork · Droid (Factory)\r \r
WorkBuddy\r
WorkBuddy / CodeBuddy\r \r ---\r \r
Usage\r
\r
Step 1: Confirm User Intent\r
\r After receiving a cleanup request, confirm the following with the user (skip if already specified):\r \r
- Cleanup Scope: Current project only (
project), global only (global), or both (all, default)?\r - Platform Scope: All platforms, or specific platforms only?\r
- Backup: Back up to desktop by default. Users can disable with
--no-backup(not recommended).\r \r
Step 2: Execute Script\r
\r
Call scripts/clear_agent_rules.py. This script uses pure Python 3 standard library only, no additional dependencies needed.\r
\r
Quick Start Examples\r
\r
# Preview mode (recommended to see what will be deleted first)\r
python scripts/clear_agent_rules.py --dry-run\r
\r
# Clear current project + global, all platforms, auto backup (default behavior)\r
# Note: This skill is protected by default and won't be cleared\r
python scripts/clear_agent_rules.py\r
```\r
\r
# Clear only specified platforms\r
python scripts/clear_agent_rules.py --platforms cursor,claude,copilot\r
\r
# Clear only OpenClaw ecosystem (including QClaw, CoPaw, etc.)\r
python scripts/clear_agent_rules.py --platforms openclaw,qclaw,copaw\r
\r
# Clear only QoderWork skills\r
python scripts/clear_agent_rules.py --platforms qoderwork\r
\r
# Clear only current project rules\r
python scripts/clear_agent_rules.py --mode project\r
\r
# Clear only global rules\r
python scripts/clear_agent_rules.py --mode global\r
\r
# Specify project directory\r
python scripts/clear_agent_rules.py --project /path/to/myproject\r
\r
# No backup (dangerous, use with caution)\r
python scripts/clear_agent_rules.py --no-backup\r
\r
# Non-interactive execution (skip YES confirmation, suitable for scripts/CI)\r
python scripts/clear_agent_rules.py --yes\r
\r
# Clear all WorkBuddy skills including this one (dangerous)\r
python scripts/clear_agent_rules.py --mode global --include-self\r
```\r
\r
### Advanced Usage\r
\r
```bash\r
# Clear only AI IDE platforms (Cursor, Windsurf, Cline, etc.)\r
python scripts/clear_agent_rules.py --platforms cursor,windsurf,cline,trae,amazonq,continue\r
\r
# Clear only CLI tools (Claude Code, Copilot, Aider, etc.)\r
python scripts/clear_agent_rules.py --platforms claude,copilot,aider,gemini,codex\r
\r
# Clear only project-level rules for specific platforms\r
python scripts/clear_agent_rules.py --mode project --platforms cursor,copilot\r
\r
# Scan specific project directory\r
python scripts/clear_agent_rules.py --project /path/to/specific/project\r
\r
# Export scan results without deleting (for manual review)\r
python scripts/clear_agent_rules.py --dry-run > scan_results.txt\r
```\r
\r
> **Note**: On Windows, `python` command might be `python3` or `py`, depending on your environment.\r
\r
#### Parameter Reference\r
\r
| Parameter | Description | Default |\r
|-----------|-------------|---------|\r
| `--mode` | `project` / `global` / `all` | `all` |\r
| `--project` | Project root directory path | Current working directory |\r
| `--platforms` | Specify platforms (comma-separated) | `all` |\r
| `--no-backup` | Disable backup | Disabled (backup by default) |\r
| `--dry-run` | Preview mode, don't actually delete | Disabled |\r
| `--yes` | Skip YES confirmation prompt | Disabled |\r
| `--include-self` | Don't protect this skill, will also clear clear-skills itself | Disabled (protected by default) |\r
\r
**Available Platform Identifiers:**\r
```\r
cursor, windsurf, cline, trae, amazonq, continue,\r
claude, codex, copilot, gemini, aider, opencode,\r
amp, goose, kilocode, kiro, neovate, openhands, pi, qoder,\r
roocode, zencoder, droid,\r
openclaw, qclaw, copaw, easyclaw, arkclaw, lobsterai,\r
hiclaw, autoclaw, anticlaw, manus, happycapy,\r
qoderwork,\r
workbuddy\r
```\r
\r
---\r
\r
## Platform Rule File Reference\r
\r
For detailed paths, see `references/platforms.md`.\r
\r
### Project-Level Rules (relative to project root)\r
\r
| Category | Platform | Main Files/Directories |\r
|----------|----------|----------------------|\r
| **AI IDE** | Cursor | `.cursorrules`, `.cursor/rules/` |\r
| | Windsurf | `.windsurfrules`, `.windsurf/rules/` |\r
| | Cline | `.clinerules`, `.clinerules/` |\r
| | Trae IDE | `.trae/project_rules.md` |\r
| | Amazon Q | `.amazonq/rules/` |\r
| | Continue.dev | `.continuerc.json`, `.continue/rules/` |\r
| **CLI** | Claude Code | `CLAUDE.md` |\r
| | Codex CLI | `AGENTS.md` |\r
| | GitHub Copilot | `.github/copilot-instructions.md` |\r
| | Gemini CLI | `GEMINI.md` |\r
| | Aider | `.aider.conf.yml` |\r
| | OpenCode | `AGENTS.md`, `CLAUDE.md` |\r
| **Emerging Tools** | Amp | `AGENTS.md` |\r
| | Goose | `.goosehints`, `.goose/` |\r
| | Kilo Code | `.kilocode/rules/` |\r
| | Kiro (AWS) | `.kiro/steering/`, `.kiro/` |\r
| | Neovate | `AGENTS.md` |\r
| | OpenHands | `config.toml`, `.openhands/` |\r
| | PI | `.pi/settings.json`, `.pi/` |\r
| | Qoder | `.qoder/rules/` |\r
| | Roo Code | `.roo/rules/`, `.roorules` |\r
| | Zencoder | `.zencoder/rules/` |\r
| | Droid (Factory) | `.droid/`, `AGENTS.md` |\r
| **Others** | Antigravity | `.antigravity/rules.md` |\r
| | OpenClaw | `.openclaw/` |\r
| | QoderWork | `.qoderwork/skills/` |\r
| | WorkBuddy | `.workbuddy/skills/` |\r
\r
### Global-Level Rules (user home directory)\r
\r
| Category | Platform | Path |\r
|----------|----------|------|\r
| **AI IDE** | Cursor | `~/.cursor/rules/` |\r
| | Cline | `~/Documents/Cline/Rules/` |\r
| | Trae IDE | `~/.trae/user_rules.md` |\r
| | Continue.dev | `~/.continue/` |\r
| **CLI** | Claude Code | `~/.claude/` |\r
| | Gemini CLI | `~/.gemini/GEMINI.md` |\r
| | Aider | `~/.aider.conf.yml` |\r
| | OpenCode | `~/.config/opencode/` |\r
| **Emerging Tools** | Amp | `~/.factory/AGENTS.md` |\r
| | Goose | `~/.config/goose/` |\r
| | Kilo Code | `~/.kilocode/rules/` |\r
| | Kiro (AWS) | `~/.kiro/` |\r
| | Neovate | `~/.neovate/AGENTS.md` |\r
| | OpenHands | `~/.openhands/` |\r
| | PI | `~/.pi/agent/settings.json` |\r
| | Roo Code | `~/.roo/rules/` |\r
| | Droid (Factory) | `~/.factory/` |\r
| **OpenClaw Ecosystem** | OpenClaw/QClaw etc. | `~/.openclaw/` |\r
| | CoPaw | `~/.copaw/` |\r
| **Others** | Manus | `~/.manus/` |\r
| | HappyCapy | `~/.happycapy/` |\r
| | QoderWork | `~/.qoderwork/skills/` |\r
| | WorkBuddy | `~/.workbuddy/skills/` |\r
| **Note** | Qoder/Zencoder | Project-level only, no global config |\r
\r
---\r
\r
## Safety Mechanisms\r
\r
- **Default Backup**: Backs up all files to desktop before deletion (`~/Desktop/agent-rules-backup-timestamp/`), allowing recovery anytime.\r
- **Preview Mode**: Use `--dry-run` to confirm which files will be deleted before actually executing.\r
- **Confirmation Prompt**: Requires manual `YES` confirmation by default to prevent accidental operations.\r
- **Self-Protection (Enabled by Default)**:\r
- When running `--mode global` or `--mode all`, this skill (clear-skills) is **protected by default** and won't be cleared.\r
- This allows safe cleanup of other platforms' rules without worrying about deleting the tool itself.\r
- If you truly need to delete this skill, use `--include-self` to disable self-protection.\r
- **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.\r
\r
---\r
\r
## FAQ\r
\r
**Q: Will this delete my project code?**\r
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.\r
\r
**Q: Can I recover deleted files?**\r
A: Yes. All files are automatically backed up to your desktop before deletion. You can manually copy them back if needed.\r
\r
**Q: What if I only want to clear one platform?**\r
A: Use the `--platforms` parameter to specify which platforms to clean. Example: `python scripts/clear_agent_rules.py --platforms cursor,copilot`\r
\r
**Q: Why doesn't this skill get deleted when I clear global rules?**\r
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.\r
\r
**Q: Does this work on Windows/macOS/Linux?**\r
A: Yes. The script uses pure Python and handles all three operating systems automatically.\r
\r
**Q: Can I run this in a CI/CD pipeline?**\r
A: Yes. Use `--yes --no-backup` flags for non-interactive execution. Use with caution in automated environments.\r
\r
---\r
\r
## Troubleshooting\r
\r
**Permission Denied Errors**\r
- If you encounter permission errors, try running the script with appropriate permissions (e.g., administrator/root)\r
- On Windows, some directories may require elevated privileges\r
\r
**Large Backup Size**\r
- If the backup is too large, use `--no-backup` (not recommended) or manually manage backup location\r
- Consider cleaning up old backup folders from your desktop\r
\r
**Platform Not Found**\r
- If a platform isn't detected, it means the platform isn't installed or has no rule files\r
- This is normal behavior—the script only targets existing files\r
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install clear-skills - 安装完成后,直接呼叫该 Skill 的名称或使用
/clear-skills触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
clear-skills 是什么?
This skill should be used when the user wants to clear, remove, or clean up AI agent rules, skills, or instruction files from their coding environment. It su... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 152 次。
如何安装 clear-skills?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install clear-skills」即可一键安装,无需额外配置。
clear-skills 是免费的吗?
是的,clear-skills 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
clear-skills 支持哪些平台?
clear-skills 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 clear-skills?
由 andy-xiran(@subingshe)开发并维护,当前版本 v1.0.0。