Clear Skills Skill
Overview
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:
- - ✅ Smart Scanning: Only removes files/directories that actually exist. Platforms not installed or without rules won't be shown or removed
- ✅ Self-Protection: By default, this skill (clear-skills) is protected and won't be cleared, allowing safe cleanup of other platforms
- ✅ Auto Backup: Automatically backs up to desktop before deletion, allowing recovery anytime
- ✅ Preview Mode: Use
--dry-run to confirm which files will be deleted before actually removing them - ✅ Flexible Control: Supports filtering by platform, scope, project directory, and more
- ✅ Pure Python: Uses only Python 3 standard library, no external dependencies required
All Supported Platforms:
Mainstream AI IDE
Cursor · Windsurf(Codeium) · Cline · Trae IDE · Amazon Q · Continue.dev
Agent Framework / CLI
Claude Code · Codex CLI · GitHub Copilot · Gemini CLI · Aider · OpenCode
Emerging AI Tools
Amp · Goose · Kilo Code · Kiro (AWS) · Neovate · OpenHands · PI · Qoder · Roo Code · Zencoder
OpenClaw Ecosystem
OpenClaw · QClaw · CoPaw · EasyClaw · ArkClaw · LobsterAI · HiClaw · AutoClaw · AntiClaw
Other AI Agents
Manus · HappyCapy · QoderWork · Droid (Factory)
WorkBuddy
WorkBuddy / CodeBuddy
Usage
Step 1: Confirm User Intent
After receiving a cleanup request, confirm the following with the user (skip if already specified):
- 1. Cleanup Scope: Current project only (
project), global only (global), or both (all, default)? - Platform Scope: All platforms, or specific platforms only?
- Backup: Back up to desktop by default. Users can disable with
--no-backup (not recommended).
Step 2: Execute Script
Call scripts/clear_agent_rules.py. This script uses pure Python 3 standard library only, no additional dependencies needed.
Quick Start Examples
CODEBLOCK0
Clear only specified platforms
python scripts/clear
agentrules.py --platforms cursor,claude,copilot
Clear only OpenClaw ecosystem (including QClaw, CoPaw, etc.)
python scripts/clear
agentrules.py --platforms openclaw,qclaw,copaw
Clear only QoderWork skills
python scripts/clear
agentrules.py --platforms qoderwork
Clear only current project rules
python scripts/clear
agentrules.py --mode project
Clear only global rules
python scripts/clear
agentrules.py --mode global
Specify project directory
python scripts/clear
agentrules.py --project /path/to/myproject
No backup (dangerous, use with caution)
python scripts/clear
agentrules.py --no-backup
Non-interactive execution (skip YES confirmation, suitable for scripts/CI)
python scripts/clear
agentrules.py --yes
Clear all WorkBuddy skills including this one (dangerous)
python scripts/clear
agentrules.py --mode global --include-self
### Advanced Usage
bash
Clear only AI IDE platforms (Cursor, Windsurf, Cline, etc.)
python scripts/clear
agentrules.py --platforms cursor,windsurf,cline,trae,amazonq,continue
Clear only CLI tools (Claude Code, Copilot, Aider, etc.)
python scripts/clear
agentrules.py --platforms claude,copilot,aider,gemini,codex
Clear only project-level rules for specific platforms
python scripts/clear
agentrules.py --mode project --platforms cursor,copilot
Scan specific project directory
python scripts/clear
agentrules.py --project /path/to/specific/project
Export scan results without deleting (for manual review)
python scripts/clear
agentrules.py --dry-run > scan_results.txt
> **Note**: On Windows, `python` command might be `python3` or `py`, depending on your environment.
#### Parameter Reference
| Parameter | Description | Default |
|-----------|-------------|---------|
| `--mode` | `project` / `global` / `all` | `all` |
| `--project` | Project root directory path | Current working directory |
| `--platforms` | Specify platforms (comma-separated) | `all` |
| `--no-backup` | Disable backup | Disabled (backup by default) |
| `--dry-run` | Preview mode, don't actually delete | Disabled |
| `--yes` | Skip YES confirmation prompt | Disabled |
| `--include-self` | Don't protect this skill, will also clear clear-skills itself | Disabled (protected by default) |
**Available Platform Identifiers:**
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
``
---
## Platform Rule File Reference
For detailed paths, see references/platforms.md
.
### Project-Level Rules (relative to project root)
| Category | Platform | Main Files/Directories |
|----------|----------|----------------------|
| **AI IDE** | Cursor | .cursorrules
, .cursor/rules/
|
| | Windsurf | .windsurfrules
, .windsurf/rules/
|
| | Cline | .clinerules
, .clinerules/
|
| | Trae IDE | .trae/project
rules.md |
| | Amazon Q | .amazonq/rules/ |
| | Continue.dev | .continuerc.json, .continue/rules/ |
| **CLI** | Claude Code | CLAUDE.md |
| | Codex CLI | AGENTS.md |
| | GitHub Copilot | .github/copilot-instructions.md |
| | Gemini CLI | GEMINI.md |
| | Aider | .aider.conf.yml |
| | OpenCode | AGENTS.md, CLAUDE.md |
| **Emerging Tools** | Amp | AGENTS.md |
| | Goose | .goosehints, .goose/ |
| | Kilo Code | .kilocode/rules/ |
| | Kiro (AWS) | .kiro/steering/, .kiro/ |
| | Neovate | AGENTS.md |
| | OpenHands | config.toml, .openhands/ |
| | PI | .pi/settings.json, .pi/ |
| | Qoder | .qoder/rules/ |
| | Roo Code | .roo/rules/, .roorules |
| | Zencoder | .zencoder/rules/ |
| | Droid (Factory) | .droid/, AGENTS.md |
| **Others** | Antigravity | .antigravity/rules.md |
| | OpenClaw | .openclaw/ |
| | QoderWork | .qoderwork/skills/ |
| | WorkBuddy | .workbuddy/skills/ |
### Global-Level Rules (user home directory)
| Category | Platform | Path |
|----------|----------|------|
| **AI IDE** | Cursor | ~/.cursor/rules/ |
| | Cline | ~/Documents/Cline/Rules/ |
| | Trae IDE | ~/.trae/userrules.md
|
| | Continue.dev | ~/.continue/
|
| **CLI** | Claude Code | ~/.claude/
|
| | Gemini CLI | ~/.gemini/GEMINI.md
|
| | Aider | ~/.aider.conf.yml
|
| | OpenCode | ~/.config/opencode/
|
| **Emerging Tools** | Amp | ~/.factory/AGENTS.md
|
| | Goose | ~/.config/goose/
|
| | Kilo Code | ~/.kilocode/rules/
|
| | Kiro (AWS) | ~/.kiro/
|
| | Neovate | ~/.neovate/AGENTS.md
|
| | OpenHands | ~/.openhands/
|
| | PI | ~/.pi/agent/settings.json
|
| | Roo Code | ~/.roo/rules/
|
| | Droid (Factory) | ~/.factory/
|
| **OpenClaw Ecosystem** | OpenClaw/QClaw etc. | ~/.openclaw/
|
| | CoPaw | ~/.copaw/
|
| **Others** | Manus | ~/.manus/
|
| | HappyCapy | ~/.happycapy/
|
| | QoderWork | ~/.qoderwork/skills/
|
| | WorkBuddy | ~/.workbuddy/skills/
|
| **Note** | Qoder/Zencoder | Project-level only, no global config |
---
## Safety Mechanisms
- **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)**:
- When running --mode global
or --mode all
, this skill (clear-skills) is **protected by default** and won't be cleared.
- This allows safe cleanup of other platforms' rules without worrying about deleting the tool itself.
- If you truly need to delete this skill, use --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.
---
## FAQ
**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
agentrules.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.
---
## Troubleshooting
**Permission Denied Errors**
- If you encounter permission errors, try running the script with appropriate permissions (e.g., administrator/root)
- On Windows, some directories may require elevated privileges
**Large Backup Size**
- If the backup is too large, use --no-backup` (not recommended) or manually manage backup location
- - Consider cleaning up old backup folders from your desktop
Platform Not Found
- - If a platform isn't detected, it means the platform isn't installed or has no rule files
- This is normal behavior—the script only targets existing files
Clear Skills 技能
概述
扫描并清除您机器上所有主流 AI 编码平台的 AI 代理规则/技能文件。支持 50+ 平台,涵盖项目级和用户全局范围,可在 Windows · macOS · Linux 上运行。
核心功能:
- - ✅ 智能扫描:仅删除实际存在的文件/目录。未安装或无规则文件的平台不会显示或删除
- ✅ 自我保护:默认情况下,本技能(clear-skills)受到保护,不会被清除,可安全清理其他平台
- ✅ 自动备份:删除前自动备份到桌面,可随时恢复
- ✅ 预览模式:使用 --dry-run 在实际删除前确认将要删除的文件
- ✅ 灵活控制:支持按平台、范围、项目目录等进行筛选
- ✅ 纯 Python:仅使用 Python 3 标准库,无需外部依赖
所有支持的平台:
主流 AI IDE
Cursor · Windsurf(Codeium) · Cline · Trae IDE · Amazon Q · Continue.dev
代理框架/CLI
Claude Code · Codex CLI · GitHub Copilot · Gemini CLI · Aider · OpenCode
新兴 AI 工具
Amp · Goose · Kilo Code · Kiro (AWS) · Neovate · OpenHands · PI · Qoder · Roo Code · Zencoder
OpenClaw 生态系统
OpenClaw · QClaw · CoPaw · EasyClaw · ArkClaw · LobsterAI · HiClaw · AutoClaw · AntiClaw
其他 AI 代理
Manus · HappyCapy · QoderWork · Droid (Factory)
WorkBuddy
WorkBuddy / CodeBuddy
使用方法
步骤 1:确认用户意图
收到清理请求后,与用户确认以下内容(如果已指定则跳过):
- 1. 清理范围:仅当前项目(project)、仅全局(global)或两者(all,默认)?
- 平台范围:所有平台,还是仅特定平台?
- 备份:默认备份到桌面。用户可使用 --no-backup 禁用(不推荐)。
步骤 2:执行脚本
调用 scripts/clearagentrules.py。此脚本仅使用纯 Python 3 标准库,无需额外依赖。
快速入门示例
bash
预览模式(建议先查看将要删除的内容)
python scripts/clear
agentrules.py --dry-run
清除当前项目 + 全局,所有平台,自动备份(默认行为)
注意:本技能默认受保护,不会被清除
python scripts/clear
agentrules.py
仅清除指定平台
python scripts/clear
agentrules.py --platforms cursor,claude,copilot
仅清除 OpenClaw 生态系统(包括 QClaw、CoPaw 等)
python scripts/clear
agentrules.py --platforms openclaw,qclaw,copaw
仅清除 QoderWork 技能
python scripts/clear
agentrules.py --platforms qoderwork
仅清除当前项目规则
python scripts/clear
agentrules.py --mode project
仅清除全局规则
python scripts/clear
agentrules.py --mode global
指定项目目录
python scripts/clear
agentrules.py --project /path/to/myproject
不备份(危险,请谨慎使用)
python scripts/clear
agentrules.py --no-backup
非交互式执行(跳过 YES 确认,适用于脚本/CI)
python scripts/clear
agentrules.py --yes
清除所有 WorkBuddy 技能,包括本技能(危险)
python scripts/clear
agentrules.py --mode global --include-self
高级用法
bash
仅清除 AI IDE 平台(Cursor、Windsurf、Cline 等)
python scripts/clear
agentrules.py --platforms cursor,windsurf,cline,trae,amazonq,continue
仅清除 CLI 工具(Claude Code、Copilot、Aider 等)
python scripts/clear
agentrules.py --platforms claude,copilot,aider,gemini,codex
仅清除特定平台的项目级规则
python scripts/clear
agentrules.py --mode project --platforms cursor,copilot
扫描特定项目目录
python scripts/clear
agentrules.py --project /path/to/specific/project
导出扫描结果而不删除(供手动审查)
python scripts/clear
agentrules.py --dry-run > scan_results.txt
注意:在 Windows 上,python 命令可能是 python3 或 py,具体取决于您的环境。
参数参考
| 参数 | 描述 | 默认值 |
|---|
| --mode | project / global / all | all |
| --project |
项目根目录路径 | 当前工作目录 |
| --platforms | 指定平台(逗号分隔) | all |
| --no-backup | 禁用备份 | 禁用(默认备份) |
| --dry-run | 预览模式,不实际删除 | 禁用 |
| --yes | 跳过 YES 确认提示 | 禁用 |
| --include-self | 不保护本技能,也会清除 clear-skills 本身 | 禁用(默认受保护) |
可用的平台标识符:
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
平台规则文件参考
详细路径请参见 references/platforms.md。
项目级规则(相对于项目根目录)
| 类别 | 平台 | 主要文件/目录 |
|---|
| AI IDE | Cursor | .cursorrules, .cursor/rules/ |
|
Windsurf | .windsurfrules, .windsurf/rules/ |
| | Cline | .clinerules, .clinerules/ |
| | Trae IDE | .trae/project_rules.md |
| | Amazon Q | .amazonq/rules/ |
| | Continue.dev | .continuerc.json, .continue/rules/ |
|
CLI | Claude Code | CLAUDE.md |
| | Codex CLI | AGENTS.md |
| | GitHub Copilot | .github/copilot-instructions.md |
| | Gemini CLI | GEMINI.md |
| | Aider | .aider.conf.yml |
| | OpenCode | AGENTS.md, CLAUDE.md |
|
新兴工具 | Amp | AGENTS.md |
| | Goose | .goosehints, .goose/ |
| | Kilo Code | .kilocode/rules/ |
| | Kiro (AWS) | .kiro/steering/, .kiro/ |
| | Neovate | AGENTS.md |
| | OpenHands | config.toml, .openhands/ |
| | PI | .pi/settings.json, .pi/ |
| | Qoder | .qoder/rules/ |
| | Roo Code | .roo/rules/, .roorules |
| | Zencoder | .zencoder/rules/ |
| | Droid (Factory) | .droid/, AGENTS.md |
|
其他 | Antigravity | .antigravity/rules.md |
| | OpenClaw | .openclaw/ |
| | QoderWork | .qoderwork/skills/ |
| | WorkBuddy | .workbuddy/skills/ |
全局级规则(用户主目录)
| 类别 | 平台 | 路径 |
|---|
| AI IDE | Cursor | ~/.cursor/rules/ |
|
Cline | ~/Documents/Cline/Rules/ |
| | Trae IDE | ~/.trae/user_rules.md |
| | Continue.dev | ~/.continue/ |
|
CLI | Claude Code | ~/.claude/ |
| | Gemini CLI | ~/.gemini/GEMINI.md |
| | Aider | ~/.aider.conf.yml |
| | OpenCode | ~/.config/opencode/ |
|
新兴工具 | Amp | ~/.factory/AGENTS.md |
|