text-stats

text-stats is a skill for Claude Code, Codex from iflytek/skillhub. It costs 22 tokens per session (272 once invoked), scanned A, original, Apache-2.0.

A text-file measurement tool that counts lines, words and characters, then reports the results as JSON, a structured format that software can read.

In plain words
What is it for?
Use it to measure plain-text files and save a machine-readable report.
Why use it?
It provides repeatable counts instead of manual estimates, making it easier to compare a document before and after editing.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to measure plain-text files and save a machine-readable report.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/iflytek/skillhub/skill-authoring
About the project

SkillHub is a self-hosted registry where organizations publish, discover, version, and manage reusable skills for AI agents. Teams use it to share governed skill packages privately, with namespaces, role-based access control, audit logs, and CLI installation; the catalogue entries are skills and related agent integrations that can be managed through it.

iflytek/skillhub · 5,505 stars · on GitHub · skill.xfyun.cn

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add iflytek/skillhub --skill skill-authoring
Clone the repo
git clone --depth 1 https://github.com/iflytek/skillhub

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for text-stats

README.md
[![agentmods](https://agentmods.dev/badge/skills/iflytek/skillhub/skill-authoring/github.svg)](https://agentmods.dev/skills/iflytek/skillhub/skill-authoring)
Your own site
<a href="https://agentmods.dev/skills/iflytek/skillhub/skill-authoring"><img src="https://agentmods.dev/badge/skills/iflytek/skillhub/skill-authoring/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for text-stats

Your own site · 80×15
<a href="https://agentmods.dev/skills/iflytek/skillhub/skill-authoring"><img src="https://agentmods.dev/badge/skills/iflytek/skillhub/skill-authoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 272 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.00272
Opus 5.5 $0.00009 $0.00109
Sonnet 5.5 $0.00004 $0.00054
Haiku 4.5 $0.00002 $0.00027

Measured 2d ago against content hash 9b92347cfffa, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

text-stats scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/text-stats.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

examples/skill-authoring/SKILL.md · 38 lines

What it actually says

text-stats

Overview

computes word, line, and character statistics for a text file and reports them as JSON. Agents use this skill whenever they need reproducible, machine-readable metrics about a piece of text — for example to compare a document before and after rewriting it.

Requirements

POSIX shell and Python 3. Run commands from the skill directory.

Usage

  1. Locate the text file to analyze. Any plain-text file in the workspace works; references/sample.txt is a ready-made fixture.

  2. Run the helper with the file path as the only argument:

    sh scripts/text-stats.sh references/sample.txt
    
  3. Read the single-line JSON object from stdout:

    {"input":"references/sample.txt","lines":2,"words":20,"characters":144}
    
  4. The same object is mirrored to artifacts/report.json when a persistent copy is needed.

Resources

  • references/metrics.md — how each counter is defined
  • references/sample.txt — sample input used by the validation cases
  • scripts/ — executable helpers invoked during task execution
Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 38 lines · 22 tokens per session scan A 9b92347cfffa

Subscribe to this mod's changes

text-stats is a skill published in the GitHub repository iflytek/skillhub (5,505 stars, last pushed today), licensed Apache-2.0. It adds 22 tokens to every session and 272 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-28.

Related

text-stats compared with skills from other repositories

text-stats next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
text-statsiflytek/skillhubSkill5.5ktodayApache-2.0A22Claude Code, Codex
openclaw-docstbdavid2019/openclaw-docs-skillSkill33yesterdayAGPL-3.0A80Codex
anysearchanysearch-ai/anysearch-skillSkill6.9k3d agoApache-2.0A24Claude Code, Codex
iflytek-hyper-ttsiflytek/iFly-SkillsSkill2175d agoApache-2.0A92Claude Code, Codex
iflytek-ocr-invoiceiflytek/iFly-SkillsSkill2175d agoApache-2.0A77Claude Code, Codex
iflytek-pdf-image-ocriflytek/iFly-SkillsSkill2175d agoApache-2.0A81Claude Code, Codex
animated-sketch-diagramiflytek/iFly-SkillsSkill2175d agoApache-2.0A182Claude Code, Codex