Security v1.0.0

folders

Index important directories and perform safe folder operations with proper security checks.

ivangdavila 更新于 2026-02-11 1 浏览
下载 SKILL

技能说明

Index important directories and perform safe folder operations with proper security checks.

使用场景

Index important directories and perform safe folder operations with proper security checks.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/folders
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

4 个文件 · 17 kB
SKILL.md text/markdown
---
name: Folders
description: Index important directories and perform safe folder operations with proper security checks.
metadata: {"clawdbot":{"emoji":"📂","os":["linux","darwin","win32"]}}
---

## Folder Index

Maintain a lightweight index at `~/.config/folder-index.json` to know where important things are without rescanning.

```json
{
  "folders": [
    {"path": "/Users/alex/projects/webapp", "type": "project", "note": "Main client project"}
  ]
}
```

When user asks "where is X" or "find my project Y", check the index first. If not found, do targeted discovery then offer to add the result.

## Discovery

When asked to find or index folders:
- Scan likely locations: ~/projects, ~/Documents, ~/code, ~/dev, ~/work
- Detect projects by markers: .git, package.json, pubspec.yaml, Cargo.toml, go.mod, pyproject.toml, *.sln
- Stop at first marker (don't recurse into node_modules, vendor, build)
- Propose what was found, don't auto-add: "Found 8 projects in ~/code. Add to index?"

## Path Security

- Canonicalize paths (resolve `~`, `..`, symlinks) before any operation
- Reject system paths: /, /etc, /var, /usr, /System, /Library, C:\Windows, C:\Program Files
- Skip symlinks during traversal, report them separately

## Destructive Operations

- Use OS trash instead of permanent delete
- State recoverability: "node_modules: recoverable with npm install"
- Build artifacts safe to delete: node_modules, __pycache__, .gradle, build/, target/, Pods/, .next/

## Platform Quirks

- **macOS:** .DS_Store alone = effectively empty. Treat .app as single item.
- **Windows:** Paths >260 chars need `\\?\` prefix.
- **Network drives:** Warn before bulk ops — may be slow or offline.

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。