← 返回 Skills 市场
xjkvbnwe

folder-counter

作者 xjkvbnwe · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
88
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install folder-counter
功能描述
统计指定文件夹下的文件数量和文件类型分布。当用户需要了解某个目录包含多少文件、或者在建立索引前需要评估文件规模时使用。触发场景:「帮我数一下这个文件夹有多少文件」「这个目录有多少东西」「统计一下这个路径的文件」
使用说明 (SKILL.md)

Folder Counter - 文件数量统计

功能

快速统计指定文件夹的文件数量和类型分布,用于在执行 GNO 索引前评估规模。

使用方式

快速统计(只计总数,快)

C:\Users\41049\.openclaw\workspace\skills\folder-counter\scripts\count_files.ps1 -Path "D:\项目作品" -Fast

完整统计(计总数 + 文件类型分布)

C:\Users\41049\.openclaw\workspace\skills\folder-counter\scripts\count_files.ps1 -Path "D:\项目作品"

输出示例

=== 文件统计结果 ===
路径: D:\项目作品
总文件数: 1523

=== 文件类型分布(前20)===
.pdf: 450
.docx: 320
.jpg: 280
.png: 150
.md: 120
.doc: 80
.xlsx: 50
(无扩展名): 40
...

决策参考

文件数量 GNO 索引建议
\x3C 1万 ✅ 直接索引
1万 ~ 10万 ⚠️ 可索引,需告知耗时
10万 ~ 50万 🚨 需确认,可考虑daemon后台
> 50万 ❌ 建议过滤类型或缩小范围

注意事项

  • 使用 -Fast 参数可以显著提升速度(不扫描扩展名)
  • 大文件夹统计可能需要较长时间,请耐心等待
  • 统计结果可作为选择索引策略的依据
安全使用建议
This skill's purpose (counting files) is reasonable, but the SKILL.md expects you to run a local PowerShell script that is not present in the package. Before installing or invoking it: (1) ask the publisher for the missing scripts or the script source and review the code — do not run unknown PowerShell scripts; (2) if you must run it, inspect the script locally to ensure it only enumerates files and does not execute other commands or exfiltrate data; (3) test on a non-sensitive sample folder first and avoid running as administrator; (4) if the author cannot provide the script or a trustworthy source, treat the skill as incomplete and do not run it.
功能分析
Type: OpenClaw Skill Name: folder-counter Version: 1.0.0 The skill bundle contains a significant configuration flaw in SKILL.md, which instructs the agent to execute a PowerShell script using a hardcoded absolute path tied to a specific local user account (C:\Users\41049\...). This is a vulnerability that breaks portability and could be exploited if an attacker can control files at that specific location. Furthermore, the actual logic of the script (count_files.ps1) is missing from the provided files, preventing a full verification of its behavior.
能力评估
Purpose & Capability
The name/description (count files and report types) align with the actions shown in SKILL.md. However, the instructions assume a bundled PowerShell script at C:\Users\41049\.openclaw\workspace\skills\folder-counter\scripts\count_files.ps1 even though no code files are present in the skill bundle. The hard-coded example path with a specific username is also unusual and suggests the examples were exported from a single-dev environment.
Instruction Scope
SKILL.md tells the agent (or user) to execute a local PowerShell script to perform counting. Because the skill package contains no scripts, the instructions either: (a) expect a pre-existing local script outside the bundle, or (b) omitted packaging the script. In either case, instructing execution of a local script gives the agent the ability to run arbitrary commands from disk — acceptable for a file-counter only if you can inspect the script beforehand. The instructions do not provide the script contents or a safe fallback; they also reference scanning arbitrary user paths (e.g., D:\项目作品), which is within scope but emphasizes the need to review the actual script.
Install Mechanism
This is an instruction-only skill with no install spec, so nothing is written to disk by the skill itself. That lowers supply-chain risk. The inconsistency is that SKILL.md references a script that isn't packaged — a missing artifact rather than a risky installer.
Credentials
The skill requests no environment variables, no credentials, and no config paths. That is proportionate for a local folder-counting task.
Persistence & Privilege
always is false and the skill is user-invocable / can be autonomously invoked (the platform default). The skill does not request persistent presence or modify other skills. No additional privilege concerns in the manifest.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install folder-counter
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /folder-counter 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of Folder Counter. - Quickly count the number of files in a specified folder. - Optionally analyze and display the distribution of file types. - Provides both fast (total count only) and detailed (type breakdown) modes. indexing strategies based on file counts. - Includes tips for performance and usage scenarios.
元数据
Slug folder-counter
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

folder-counter 是什么?

统计指定文件夹下的文件数量和文件类型分布。当用户需要了解某个目录包含多少文件、或者在建立索引前需要评估文件规模时使用。触发场景:「帮我数一下这个文件夹有多少文件」「这个目录有多少东西」「统计一下这个路径的文件」. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 88 次。

如何安装 folder-counter?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install folder-counter」即可一键安装,无需额外配置。

folder-counter 是免费的吗?

是的,folder-counter 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

folder-counter 支持哪些平台?

folder-counter 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 folder-counter?

由 xjkvbnwe(@xjkvbnwe)开发并维护,当前版本 v1.0.0。

💬 留言讨论