t

text-stats

作者:注册老炮@MedXpert I SynomosAIv6

文本统计器 — 文本/代码统计:字数/行数/词频TopN/阅读时长,支持目录批量汇总(零依赖) 适用场景:当需要文本统计器能力时使用本技能;触发词:text-stats。

下载量
282
点赞
70
价格
免费

技能文档

---
name: text-stats
description: 文本统计器 — 文本/代码统计:字数/行数/词频TopN/阅读时长,支持目录批量汇总(零依赖) 适用场景:当需要文本统计器能力时使用本技能;触发词:text-stats。
slug: text-stats
title: text-stats
version: 1.0.1
display_name: 文本统计器
display_name_en: Text Stats
agent_created: true
author: 诺声(Logos)@SynomosAI
license: MIT
license_scope: 代码(.py 文件)MIT;本 SKILL.md 与其中理论文本不在 MIT 覆盖范围内(见文末「License & attribution」)
allowed-tools: Read, Glob, Grep, Bash, Write
category: 效率工具
platforms: [windows, macos, linux, cli]
platform_compatibility: [windows, macos, linux]
copyright: SynomosAI
description_zh: "文本统计器 — 文本/代码统计:字数/行数/词频TopN/阅读时长,支持目录批量汇总(零依赖)"
description_en: "Text and code statistics: word and line counts, top-N word frequency, reading time, with directory batch summaries (zero-dependency)."
read_when:
  - 投稿限字数/稿费按字算/报告要篇幅时快速统计
  - 统计词频 TopN、估算阅读时长
  - 目录批量汇总(按扩展名过滤)
  - 机器可读 JSON 输出(--json)
classification:
  skillhub: ["productivity"]
  iso_25010: ["Maintainability", "Usability"]
risk_tier: medium
risk_rationale: "门禁批量补丁默认 medium(内部约定:本 skill 设计为中等风险):调用 API/读写文件/本地执行,最小权限,密钥走 Secret;若实际涉对外代执行(push/发布/发送/上架)须人工复评,改 high 并走负责人批准。"
tags: [text-stats, 效率工具]
ai_protocol: true
spec: usk/1.0
interface:
  type: cli
  entry_point: scripts/text_stats.py
  runtime: python3
  call_pattern: args
input_schema:
  file:
    type: string
    description: "file"
    required: false
  dir:
    type: string
    description: "dir"
    required: false
  ext:
    type: string
    description: "目录模式下的扩展名(逗号分隔)"
    required: false
  top:
    type: int
    description: "词频TopN"
    required: false
  cjk-chars:
    type: int
    description: "每分钟阅读字数"
    required: false
  json:
    type: bool
    description: "json"
    required: false
output_schema:
  stdout: 结构化 JSON IR(含 result / rc / error_code / warnings)
  exit_code: rc=0 正常 / rc=1 告警或从严推定 / rc=2 输入不足或非法
capabilities:
  - text
  - statistics
permissions:
  network: false
  filesystem: false
  subprocess: false
requirements:
  python_packages: []
  min_python: "3.8"
changelog: "1.0.1: Bilingual rewrite (full EN+ZH, English first); 1.0.0: initial upload (USK v3)"
---

> 凡自治之物 · LGD 治理学 · 创造术家族 | 评测协议:skill-quality-gate

## English

**text-stats** v1.0.1 · LGD-Powered productivity family · zero-dependency

### The pain
Submission word limits, per-word pay, report length requirements — count, recount, and still get it wrong.

### When to use
When the user needs text statistics.

### Usage
```bash
python scripts/text_stats.py --help
```
- Success → rc=0; findings → rc=1; usage error → rc=2
- `--json` for machine-readable output

### Workflow
1. Trigger: identify a text-stats task (see When to use).
2. Execute: run text_stats.py per Usage.
3. Verify: check output / exit code.
4. Deliver: present results.

### LGD-Powered
LGD Three-Laws productivity-family piece: high-frequency file operations made deterministic, traceable tools.

### Disclaimer
Efficiency aid only.

## 中文

**text-stats** v1.0.1 · LGD-Powered 效率工具家族 · 零依赖

### 痛点
投稿限字数、稿费按字算、报告要篇幅,数来数去还数错

### 何时用
- 当用户需要文本统计器相关能力时。

### 用法
```bash
python scripts/text_stats.py --help
```
- 成功 → rc=0;发现问题 → rc=1;用法错误 → rc=2
- 支持 `--json` 机器可读输出

### 流程
1. 触发:识别文本统计器相关任务(见「何时用」)。
2. 执行:按「用法」运行text_stats.py。
3. 校验:核对脚本输出/退出码是否符合预期。
4. 交付:向用户呈现结果/产物。

### 证据与安全声明
- 证据:TBD(暂无评测/徽章链接;产生后在此更新实际链接)
- 版本:1.0.1
- 安全:未做独立安全扫描(TBD),结论待补;补全前不作推荐背书。

### 免责
本工具为效率辅助。

使用说明

# 文本统计器 / Text Stats

[![LGD](https://img.shields.io/badge/LGD-Governance-blue)](https://github.com/zhaoxinghua09-cell/lgd-theory)

> `text-stats` v1.0.0 · LGD-Powered Utility Family · Zero-dependency

**中文**:投稿限字数、稿费按字算、报告要篇幅,数来数去还数错 一条命令搞定;默认 dry-run 预览、`--apply` 才执行、`--json` 机器可读;成功 rc=0 / 发现问题 rc=1 / 用法错误 rc=2。

**EN**: One command for daily file/text chores. Dry-run by default, `--apply` to execute, `--json` for machines. rc=0 ok / rc=1 findings / rc=2 usage.

## Usage / 用法
```bash
python scripts/text_stats.py --help
```

## Disclaimer / 免责
Efficiency aid only — back up important data before --apply. / 效率辅助,--apply 前请备份重要数据。

---

## License & attribution
**分层许可(务必并读;代码许可不覆盖文档与理论文本)**

- **代码**(本包 `.py` 文件):**MIT**
- **本 `README.md` / `SKILL.md` 及其中的理论文本、方法论与一切理论表述**:**不在 MIT 覆盖范围内**,保留所有权利(All rights reserved)

```
© 2026 SynomosAI. All rights reserved.
理论署名 (attribution) : LGD(Lifecycle Governance Doctrine / 全程治理论)— SynomosAI initiative
名称状态 (name status)  : "SynomosAI" — 未申请实体注册、未申请商标注册
                        (not a registered legal entity; no trademark registered)
生产参考部署 (production reference, self-reported) : 无(未声明外部生产参考部署)
                    ← 非认证、非背书、非监管认可(not a certification or endorsement)
代码许可 (code license) : 本包未附 LICENSE 文件(许可待定)
                    本文本与理论表述不在任何代码许可覆盖范围内
引用格式 (cite as)      : 本资产无 DOI
```
(上列为《LGD 对外表述规范》§3.2 统一块,**整体复制、未删改**;发布/重提前须照最新版本复核。)

如何安装此技能?

访问技能市场,点击「安装」按钮,按提示将技能包放入 AI 编程助手的 skills 目录即可。

浏览技能市场

支持平台:Qoder · QoderWork · Claude · Codex 等 AI 编程助手