← Back to Skills Marketplace
douduandou

Code Stats

by douduandou · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
866
Downloads
0
Stars
7
Active Installs
1
Versions
Install in OpenClaw
/install openclaw-code-stats
Description
分析代码仓库的统计信息(行数、文件数,语言分布)。用于了解项目规模和复杂度。当需要了解项目有多大、有多少代码时使用。
Usage Guidance
This skill is small and appears to do what it claims, but inspect and/or modify it before use: 1) The script is hard-coded to /home/duan/.openclaw/workspace (including a specific username). If you expect it to analyze a different folder, change WORKSPACE or add a command-line/path option. 2) It will recursively read all non-hidden files under that path — treat it as having broad read access to anything in your workspace; don't run it against a workspace containing secrets. 3) The walker does not guard against symlink cycles — a malicious or accidental cyclic symlink could cause excessive recursion. 4) If the repo is empty totalLines can be 0 and the percentage calculation will produce NaN — harmless but noisy. Recommended actions: run in a sandbox or on a copy of the workspace first, or edit the script to accept a path argument and to add cycle detection/limits. If you do not trust the code author, do not run it on sensitive data.
Capability Analysis
Type: OpenClaw Skill Name: openclaw-code-stats Version: 1.0.0 The skill 'openclaw-code-stats' is designed to analyze code repository statistics (file count, line count, language distribution). The `index.js` script implements this functionality using standard Node.js `fs` and `path` modules to read files and directories within the specified OpenClaw workspace. It does not perform any network requests, execute external commands, access sensitive data, or contain any prompt injection attempts in `SKILL.md`. The `package.json` also shows no external dependencies, indicating a low supply chain risk. All observed behaviors are directly aligned with the stated purpose.
Capability Assessment
Purpose & Capability
The code's functionality (recursively counting files and lines by extension) matches the skill description. However the implementation uses a fixed WORKSPACE path ('/home/duan/.openclaw/workspace') rather than acting on the current working directory or an explicitly provided path. The hard-coded home path with a specific username is unexpected and may not match the installing user's environment.
Instruction Scope
SKILL.md states it analyzes the 'current workspace' and instructs running node skills/code-stats/index.js, but the script always scans the fixed WORKSPACE path. The script will read every non-hidden file under that directory (subject to IGNORE_DIRS), which means it can access any file present in that workspace — this is consistent with the stated purpose but narrower/less flexible than the documentation implies and has privacy implications.
Install Mechanism
No install spec; the package is instruction + a small JS script with no external dependencies. Nothing is downloaded or written during install, which is low risk.
Credentials
The skill requests no environment variables or credentials, which is appropriate. Nonetheless it reads files from the user's workspace (a form of broad read access). That file-system access is inherent to its purpose but should be acknowledged as sensitive — there's no configuration to limit the scanned path.
Persistence & Privilege
The skill does not request persistent privileges. always is false and it does not modify system or other skills' configuration.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install openclaw-code-stats
  3. After installation, invoke the skill by name or use /openclaw-code-stats
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of code-stats skill: - Analyze code repositories for total file count, line count, and language distribution - Calculate language proportions within a project - Supports JavaScript/TypeScript, Python, JSON/YAML, Markdown, Shell/Bash, HTML/CSS - Designed for understanding project size and code complexity - Easy usage via CLI or integration with OpenClaw
Metadata
Slug openclaw-code-stats
Version 1.0.0
License
All-time Installs 7
Active Installs 7
Total Versions 1
Frequently Asked Questions

What is Code Stats?

分析代码仓库的统计信息(行数、文件数,语言分布)。用于了解项目规模和复杂度。当需要了解项目有多大、有多少代码时使用。 It is an AI Agent Skill for Claude Code / OpenClaw, with 866 downloads so far.

How do I install Code Stats?

Run "/install openclaw-code-stats" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Code Stats free?

Yes, Code Stats is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Code Stats support?

Code Stats is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Code Stats?

It is built and maintained by douduandou (@douduandou); the current version is v1.0.0.

💬 Comments