← 返回 Skills 市场
subingshe

clear-skills

作者 andy-xiran · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
152
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (SKILL.md)

\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-run to 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

  1. Cleanup Scope: Current project only (project), global only (global), or both (all, default)?\r
  2. Platform Scope: All platforms, or specific platforms only?\r
  3. 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
安全使用建议
This skill appears to do what it says: scanning and deleting local AI-agent rule/skill files. Before using it: (1) run python scripts/clear_agent_rules.py --dry-run to see exactly what would be removed, (2) keep the default backup (don't use --no-backup), (3) avoid non-interactive --yes unless you are certain, and (4) review the script source yourself (it appears to use only Python stdlib and no network calls). If you allow autonomous invocation, be aware an agent could run it with destructive flags; consider restricting autonomous execution or running the script manually in a safe environment first.
功能分析
Type: OpenClaw Skill Name: clear-skills Version: 1.0.0 The skill bundle contains a script (scripts/clear_agent_rules.py) designed to perform mass deletion of AI agent configuration files and directories across 50+ platforms. While the tool is transparent about its purpose and includes safety features—such as a dry-run mode, a mandatory backup of all deleted items to the user's desktop, and self-protection logic—it possesses high-risk capabilities. Specifically, it targets entire global configuration directories in the user's home folder (e.g., ~/.claude, ~/.continue, ~/.openhands), which may contain session history, local settings, or API configurations beyond the stated scope of 'rules' and 'skills.' There is no evidence of malicious intent, data exfiltration, or obfuscation, but the broad destructive potential warrants a suspicious classification.
能力评估
Purpose & Capability
The name/description (clear-skills) matches the provided files: SKILL.md documents scanning and removal of many agent rule files and scripts/clear_agent_rules.py implements that behavior. All requested resources are local filesystem paths (project/global rule locations) which are appropriate for a cleanup tool.
Instruction Scope
The SKILL.md explicitly instructs the agent to run the included Python script to scan and remove files across many project/global paths. This is in-scope for the stated purpose, but the instructions also include non-interactive flags (--yes, --no-backup, --include-self) which, if used, will cause destructive actions without further confirmation. The docs recommend --dry-run/backup; follow those safeguards before deleting.
Install Mechanism
No install spec — instruction-only with a bundled Python script. The script claims to use only the Python standard library (imports shown: argparse, os, platform, shutil, sys, datetime, pathlib). There are no downloads, external packages, or installers referenced.
Credentials
The skill declares no required environment variables, credentials, or config paths. The script reads standard local paths (HOME, Documents, USERPROFILE fallback) to find rule/config files; this is necessary for the cleanup task and is proportionate to the purpose.
Persistence & Privilege
always:false (normal). The skill can be invoked autonomously (disable-model-invocation:false), which is the platform default; combined with destructive flags (--yes, --no-backup) this increases risk of accidental deletion if the agent runs without user confirmation. The SKILL.md advocates confirming intent, but operators should be careful about allowing autonomous runs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install clear-skills
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /clear-skills 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
clear-skills v1.0.0 - Initial release of a cross-platform utility to clear AI agent rules and skill files on 50+ major coding platforms. - Supports both project-level and global scopes, with smart scanning and self-protection to prevent accidental deletion of the skill itself. - Features auto-backup (to desktop), preview (dry-run) mode, and flexible platform/scope filtering. - Runs with pure Python 3 standard library, no dependencies. - Compatible with Windows, macOS, and Linux.
元数据
Slug clear-skills
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

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。

💬 留言讨论