html-tools CLAUDE.md

A set of Chinese-language Claude Code instructions for WebUtils, a collection of small browser-based tools delivered as separate HTML pages.

In plain words
What is it for?
It helps with adding or changing tools, synchronizing catalogue data, building the distribution files, testing, linting, formatting, and maintaining the homepage.
Why use it?
It explains the project's source-of-truth data, build process, shared files, testing, and which parts are generated automatically.

Instructions file

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 instructions/chicogong/html-tools/claude-md
Clone the repo
git clone --depth 1 https://github.com/chicogong/html-tools
Per session 1,118 This file is loaded in full into every session.
When invoked 1,118 The same file — it is already loaded in full.
Security scan A 0 findings. 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.01118 $0.01118
Opus 5 $0.00559 $0.00559
Sonnet 5 $0.00224 $0.00224
Haiku 4.5 $0.00112 $0.00112

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

Security

Grade A, and why

html-tools CLAUDE.md 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 3d 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.

CLAUDE.md · 97 lines

How it starts

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

CLAUDE.md

本文件说明 WebUtils 仓库的工程约定。事实以当前 package.jsontools.json 和 CI 工作流为准。

项目概述

WebUtils 是静态优先的浏览器工具集。每个工具以独立 HTML 页面交付,源码共享 tool-base.csstool-chrome.js,发布时通过构建脚本生成 dist/

多数格式化、计算和生成任务在浏览器本地处理;网络客户端、公共 API、CDN、字体和图片等功能会连接页面标明或用户选择的第三方。不要对全部工具统一承诺“完全离线”或“绝不联网”。

开发命令

npm ci                    # 按锁文件安装依赖
npm run dev               # 本地开发服务器
npm run build             # 同步数据并生成 dist/
npm test                  # 结构、数据、同步、工具页、重定向和共享能力测试
npm run lint              # HTMLHint + Stylelint + ESLint
npm run format:check      # Prettier 只读检查
npm run format            # Prettier 写入格式化
npm run sync:tools        # 同步 tools.json 到生成内容
npm run check:version     # 校验版本元数据

提交前至少运行:

npm run build
npm test
npm run lint
npm run format:check
git status --short

数据与生成边界

tools.json 是工具目录的单一事实源。tools 是以连续数字字符串为 key 的对象,不是数组。

npm run sync:tools 会更新:

  • index.html 内联的分类、工具、计数和 SEO 信息;
  • README.mdsitemap.xmlmanifest.jsonllms.txt
  • i18n/*.json 的工具数;
  • tools/<分类>/index.html 分类落地页。

修改 tools.json 后必须同步并检查生成差异。不要手工修改会被同步脚本覆盖的数据区块。

首页架构

  • index.html:语义结构、产品文案和内联工具数据;
  • assets/css/main.css:首页 token、布局和组件;
  • assets/js/main.js:搜索、分类、收藏、URL 状态和卡片渲染;
  • assets/js/recent-tools.js:最近使用过滤;
  • assets/js/tool-chrome.js:主题初始化、最近访问记录、工具页外壳和 Service Worker。

首页控制器依赖 .tool-carddata-categorydata-keywords 等属性。调整卡片结构或选择器前,必须同时检查搜索、分类、收藏与最近使用逻辑。

工具页与共享设计层

所有存量工具共享:

  • assets/css/tool-base.css:设计 token、兼容变量、基础组件、焦点/动效规则;
  • assets/js/tool-chrome.js:返回首页、主题切换、最近访问和 fallback 样式。

工具内联 CSS 只实现任务特有布局。新增颜色、间距或通用控件前,先判断是否应进入共享层。视觉与无障碍标准见 docs/design-system.md

新工具推荐以 tools/calculator/tip-calculator.html 为结构参考,并确保:

  • 一个非空 <h1> 和一个 <main>
  • 标签、键盘操作、可见焦点和移动触控目标完整;
  • 隐私、联网和离线能力描述准确;
  • 使用共享 token,不复制新的全局主题;
  • 不使用 transition: all,支持 prefers-reduced-motion

添加工具

  1. tools/<category>/ 创建 HTML 文件。
  2. tools.json.tools 中使用下一个连续数字 key 注册完整元数据。
  3. 运行 npm run sync:tools
  4. 运行完整本地门禁并检查生成差异。

项目已有 1000+ 工具,默认优先修复和打磨高价值工具,不以继续增加数量为目标。

Read the full file on GitHub · 97 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. 3d ago First seen · 97 lines · 1,118 tokens per session scan A d2b187aee255

Subscribe to this mod's changes

html-tools CLAUDE.md is an instructions file published in the GitHub repository chicogong/html-tools (138 stars, last pushed 4d ago), licensed MIT. It adds 1,118 tokens to every session, about $0.0056 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.