tighten

tighten is a skill for Claude Code, Codex from scandnavik/writing-harness. It costs 86 tokens per session (1,764 once invoked), scanned A, original, MIT.

A Markdown editing tool that finds common unnecessary words, repeated headings, and padded explanations, then rewrites the marked sections with a language model. Markdown is a plain-text format commonly used for documentation.

In plain words
What is it for?
Use it to scan Markdown files or file patterns, identify ten listed types of verbosity, and tighten the sections that need editing.
Why use it?
It helps reduce long, repetitive documentation while using the language model only where rewriting is needed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions subagents.

Good fit Use it to scan Markdown files or file patterns, identify ten listed types of verbosity, and tighten the sections that need editing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/scandnavik/writing-harness/tighten
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 scandnavik/writing-harness --skill tighten
Clone the repo
git clone --depth 1 https://github.com/scandnavik/writing-harness

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 tighten

README.md
[![agentmods](https://agentmods.dev/badge/skills/scandnavik/writing-harness/tighten/github.svg)](https://agentmods.dev/skills/scandnavik/writing-harness/tighten)
Your own site
<a href="https://agentmods.dev/skills/scandnavik/writing-harness/tighten"><img src="https://agentmods.dev/badge/skills/scandnavik/writing-harness/tighten/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 tighten

Your own site · 80×15
<a href="https://agentmods.dev/skills/scandnavik/writing-harness/tighten"><img src="https://agentmods.dev/badge/skills/scandnavik/writing-harness/tighten.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,764 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.00086 $0.01764
Opus 5 $0.00043 $0.00882
Sonnet 5 $0.00017 $0.00353
Haiku 4.5 $0.00009 $0.00176

Measured 10d ago against content hash 5ac14aeb58ff, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

tighten 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 10d ago.

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.

skill/tighten/SKILL.md · 138 lines

How it starts

The opening of the file, as written. The whole thing — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Tighten

Markdown 精簡管線,目的是省 token。分工是這樣:偵測交給腳本(不花 LLM),只有重寫才動用 LLM,避免把便宜的偵測工作浪費在昂貴的模型上。

bloat(填充詞、無用前綴、重複框架、description 回聲)是 AI slop 的另一張臉:不是寫錯,是寫太多、講太繞。這支 skill 把「偵測」交給純 regex(零 LLM),只把「重寫」交給 LLM,最省 token。

預設行為

輸入 預設掃描路徑
無參數 **/*.md(排除你指定的 index/生成檔)
單一路徑 該檔或該 glob
多路徑 全部納入

建議絕不碰:結構敏感的索引檔(手工維護的目錄)、機器生成的 yaml、工具腳本目錄。把這些路徑加進你自己的排除清單。

10 條規則(詳見 scripts/verbosity-check.py)

# 規則 一句話
1 frontmatter-description-echo description 重複 name 字詞 >60%
2 dated-parenthetical body 中「(YYYY-MM-DD 補)」冗贅
3 marker-prefix 結論 / 教訓 / 策略 等無用前綴
4 meta-blockquote H1 後首段 > 分類原則/說明/規則
5 numbered-code-comments code block ≥3 個 # N. 編號註解
6 filler-words 其實/當然/基本上/事實上...
7 dual-preamble 情境+Pattern方案+做法
8 h1-h2-echo H1 後立刻 H2 同名
9 list-prefix-bloat list 以「這是/這段是/這個方案/這個功能」開頭
10 dup-pros-apply 同節 優點 + 適用 雙 bullet 列

執行流程

Step 1 — 執行偵測腳本

python ~/.claude/skills/writing-harness/scripts/verbosity-check.py <paths> --format=markdown

讀 exit code:

  • 0 → 回報「檔案已足夠精簡」,退出
  • 1 → 繼續 Step 2
  • 2 → 回報錯誤,退出

Step 2 — 呈現 report 並問核准

把 markdown report 貼給用戶,附一行摘要:

共 N 處命中、散佈在 M 個檔案。各規則命中次數:<rule>: <count>, ...
要重寫嗎?(y / n / 指定檔案子集)

等待用戶回應。

Step 3 — 派 sonnet sub-agent 重寫

對每一個有 findings 的檔案(依用戶選的子集),spawn 一個 general-purpose agent(model: sonnet)。

Agent prompt 模板

你是精簡寫手。下方 .md 檔的特定段落被標記為冗贅(偵測規則、行號、snippet)。

任務:只修 flagged 段落,其餘原封不動。

硬性約束:
1. 不動 frontmatter 的 name / type / 任何系統欄位
2. frontmatter 的 description 可改(若被 flagged 為 description-echo)
3. 保留所有 markdown links `[text](path)`、code blocks、table 結構
4. 不新增段落、不改 H1 標題
5. 語意等價:每條資訊都要留,只砍表達
6. 不確定時 → 保留原文(寧願 under-cut 不要 over-cut)

規則對照:
- marker-prefix:刪掉「**結論**:」「**教訓**:」等前綴,保留後面的內容
- dated-parenthetical:刪掉「(YYYY-MM-DD 補)」這類標記
- filler-words:刪「其實/當然/基本上」等空泛修飾
- meta-blockquote:刪掉整行 `> 分類原則:...`
- dual-preamble:兩段合併為一句開場
- h1-h2-echo:刪掉重複的 H2 或改成細節標題
- list-prefix-bloat:刪「- 這是 / - 這段是」開頭的冗贅
- numbered-code-comments:code 內 `# 1. # 2. # 3.` 保留 1-2 個關鍵註解即可
- dup-pros-apply:flag 即可,若語意真的重疊才合併;否則保留
- frontmatter-description-echo:重寫 description 講「這份文件提供什麼」(不重複 name)

輸出:直接用 Edit/Write 改檔,不要回文字報告。改完後用一句話說「<file> 已精簡」。

檔案路徑:<path>
Findings:
<list of findings with line + rule + snippet>

Read the full file on GitHub · 138 lines

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. 10d ago First seen · 138 lines · 86 tokens per session scan A 5ac14aeb58ff

Subscribe to this mod's changes

tighten is a skill published in the GitHub repository scandnavik/writing-harness (23 stars, last pushed 2mo ago), licensed MIT. It adds 86 tokens to every session and 1,764 once invoked, about $0.0004 per session on Opus 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-08-30.

Related

Other skills, from other repositories

writing

Draft, revise, audit, or transform human-facing prose: articles, blogs, documentation, criticism, essays, email, marketing and SEO copy, summaries, scripts, application materials, and UI text. Excludes code comments, commit messages, and private notes.

Anbeeld/WRITING.md · 54 tokens

happiness-skill

A Chinese-language guide to happiness based on reducing unmet wants, focusing on the present, and treating happiness as a trainable skill.

kangarooking/cangjie-skill · 136 tokens

setup-matt-pocock-skills

A setup skill that configures engineering skills for a repository, including its issue tracker, labels, and documentation layout. A repository is the project folder managed by version control.

devcxl/mattpocock-skills-zh · 43 tokens

frontend-design

A design guide for building polished web interfaces such as pages, dashboards, forms, navigation, and reusable UI components. It covers HTML, CSS, JavaScript, and common frontend frameworks.

AnastasiyaW/codex-claude-code-config · 264 tokens

alterlab-cobrapy

Build and analyze genome-scale constraint-based metabolic models with COBRApy — flux balance analysis (FBA), flux variability analysis (FVA), gene and reaction knockouts, flux sampling, and SBML model I/O. Use when simulating metabolic networks, predicting growth or knockout phenotypes, or running systems-biology and…

AlterLab-IEU/AlterLab-Academic-Skills · 91 tokens

alterlab-depmap

Query the Cancer Dependency Map (DepMap) for cancer cell line gene dependency scores (CRISPR Chronos), drug sensitivity data, and gene effect profiles. Use when identifying cancer-specific genetic vulnerabilities, finding synthetic lethal interactions, checking whether a gene is essential in given cell lines, or…

AlterLab-IEU/AlterLab-Academic-Skills · 77 tokens