text-tools

A text-processing toolkit for translation, rewriting, regular expressions, encoding and decoding, cleaning, counting, and formatting text. A regular expression is a pattern used to find matching text.

In plain words
What is it for?
Use it to clean text, find patterns, translate or rewrite content, convert URL or HTML encodings, encode or decode Base64, and count words or characters.
Why use it?
It avoids repeating small scripts for common text changes and searches. It also provides examples for handling URLs, dates, email addresses, HTML entities, and Base64 data.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/fuyuxiang/echo-agent/text-tools
Any agent
npx skills add fuyuxiang/echo-agent --skill text-tools
Clone the repo
git clone --depth 1 https://github.com/fuyuxiang/echo-agent

Made for: Claude Code, Codex.

Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 660 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00021 $0.00660
Opus 5 $0.00010 $0.00330
Sonnet 5 $0.00004 $0.00132
Haiku 4.5 $0.00002 $0.00066

Measured 2d ago against content hash 854091532184, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

text-tools scanned grade A with 1 finding 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_process.py), 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

from urllib.parse import quote, unquote
skills/utility/text-tools/SKILL.md · 87 lines

What it actually says

Text Tools

Text processing utilities powered by Python stdlib.

Text Cleaning

import re
# Strip HTML
clean = re.sub(r'<[^>]+>', '', html_text)
# Normalize whitespace
clean = ' '.join(text.split())
# Fix common encoding issues
text.encode('utf-8').decode('utf-8')

Regex Helpers

Pattern Matches
r'[\w.-]+@[\w.-]+' Email addresses
r'https?://\S+' URLs
r'1[3-9]\d{9}' Chinese phone numbers
r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}' IPv4
r'\d{4}-\d{2}-\d{2}' Dates (YYYY-MM-DD)
r'[一-鿿]+' Chinese characters

Encoding/Decoding

from urllib.parse import quote, unquote
import html, base64

# URL encode/decode
quote("你好世界")         # '%E4%BD%A0%E5%A5%BD%E4%B8%96%E7%95%8C'
unquote('%E4%BD%A0')     # '你'

# HTML entities
html.escape('<script>')  # '&lt;script&gt;'
html.unescape('&amp;')  # '&'

# Base64
base64.b64encode(b"hello").decode()  # 'aGVsbG8='
base64.b64decode("aGVsbG8=")         # b'hello'

Word/Character Count

text = "Hello 你好世界"
chars = len(text)           # 8
chars_no_space = len(text.replace(' ', ''))  # 7
words = len(text.split())  # 2
chinese = len(re.findall(r'[一-鿿]', text))  # 3

Text Diff

import difflib
diff = difflib.unified_diff(old.splitlines(), new.splitlines(), lineterm='')
print('\n'.join(diff))

Translation

For translation, use the agent's LLM capability directly — no external API needed. The agent can translate between any languages in-context.

Script

python3 scripts/text_process.py clean "  messy   text  "
python3 scripts/text_process.py count "your text here"
python3 scripts/text_process.py regex-extract "email" "Contact: [email protected]"
python3 scripts/text_process.py encode url "你好"
python3 scripts/text_process.py decode base64 "aGVsbG8="
Files

What ships with it

1 file 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 · 87 lines · 21 tokens per session scan A 854091532184

Subscribe to this mod's changes

text-tools is a skill published in the GitHub repository fuyuxiang/echo-agent (988 stars, last pushed 3d ago), licensed MIT. It adds 21 tokens to every session and 660 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories