I wanted a tool that appears when the task needs it, not one that attaches a page to every answer. answer-me-with-html turns a complex question into a readable single page, but its upstream default posture is eager: the description literally asks for it to fire even when nobody asked. On ordinary Q&A that eagerness becomes noise.
能力越主动的工具,越需要一条明确的"什么时候不许动"的规则。
The more eager a tool is, the more it needs an explicit rule about when it must not fire.
The skill description decides whether it gets selected automatically. An upstream description that says "use it proactively" hands that decision to the model's momentary judgement.
Install globally with the official installer, then confirm the security scan reports (Socket 0 alerts, Snyk low risk). The real files land in ~/.agents/skills/answer-me-with-html.
npx skills add QingYunA/answer-me-with-html -g -y -a codexnpx skills add QingYunA/answer-me-with-html -g -y -a codex# 安装器落在 ~/.agents/skills/,Codex 读的是 ~/.codex/skills/,需要一条软链# The installer writes to ~/.agents/skills/; Codex reads ~/.codex/skills/, so link the twoln -s ~/.agents/skills/answer-me-with-html ~/.codex/skills/answer-me-with-htmlln -s ~/.agents/skills/answer-me-with-html ~/.codex/skills/answer-me-with-htmlls -l ~/.codex/skills/answer-me-with-html # 确认链接指向真身ls -l ~/.codex/skills/answer-me-with-html # confirm the link target
Prefer a symlink over a copy: npx skills update refreshes the real directory and the link follows. A copy diverges on the first update, and the stale one may be the one that gets loaded.
Separate two questions: whether the model thinks of the tool, and whether the model is allowed to use it on its own. The skill description controls the first; a rule controls the second. Both layers are needed.
01安装到全局Install globally真身 + 软链,先让它看得见Real files plus symlink, so Codex sees it
02收紧描述Tighten the description只在你要求时使用,不主动附带Fire only on request, never attach unasked
03加全局规则Add a global rule写进 AGENTS.md,更新也不会被动Written to AGENTS.md, survives updates
04新会话验证Verify in a new session反例不出页面,正例正常出页面No page when it should not, a page when it should
The description decides automatic selection, so it is a soft control. Rewrite it to: fire only when asked for a page, diagram, visual explanation or video, or when named directly; never attach a page to an ordinary answer.
Add an on-demand clause to ~/.codex/AGENTS.md. It does not change when the skill updates, so it is the backstop for the day the description is restored upstream.
The clause that went into the global rules: unless a page, diagram, visual explanation or video is explicitly requested, do not use the answer-me-with-html skill and do not attach a generated page to an ordinary answer.
Testing only the positive case is not enough: a missing skill also produces no page. Verification must cover the negative case too — no page and no side effects.
测试
Test
期望
Expected
实测结果
Observed
新会话里问"讲讲 TCP 三次握手和四次挥手"(上游默认配置下必然出页面的题目)
A new session asks about the TCP three-way handshake (a question that always produced a page under the default config)
不出页面,且不产生文件
No page, no files
没出页面,~/.answer-me-with-html 目录没有被创建
No page, and the page directory was never created
新会话里说"用 HTML 讲一下 Redis 和 Memcached 怎么选"
A new session asks for an HTML explanation of Redis versus Memcached
正常出页面,写作检查通过
A page renders and passes the writing check
出了页面:7 个面板、sheet + blueprint 主题、STE 写作检查 0 警告
Page rendered: seven panels, sheet plus blueprint theme, zero writing warnings
新会话的 skill 清单
Skill list in a new session
能看见这个 skill
The skill is listed
已包含 answer-me-with-html
answer-me-with-html is present
用"目录有没有被创建"当客观信号,比"我觉得没出页面"硬得多——它是可复查的副作用。
Use "was the output directory created" as the objective signal. It is a checkable side effect, not an impression.
第三条不能省:没有它,"没触发"也可能只是"没装上",前两条就都失去意义。
Do not skip the third check. Without it, "did not fire" may simply mean "was never installed".
skill 清单在会话启动时读取,所以改完必须新开会话才算真正验证。
The skill list is read when a session starts, so the verification only counts in a new session.
怎么用
How to use it
要页面就直接说,不需要记住任何命令;不想经过 Agent 时,也可以直接用 CLI 渲染本地草稿。
Ask in plain language when you want a page. When you would rather skip the agent, render a local draft straight from the CLI.
用 HTML 讲一下 X / 画个图 / 出个页面 / 没看懂,给我看一页Explain X in HTML / draw it / make a page / I do not get it, show me one page做个 3b1b 风格视频Make a 3b1b-style videoAM=~/.codex/skills/answer-me-with-html/scripts/am.mjs # CLI 入口AM=~/.codex/skills/answer-me-with-html/scripts/am.mjs # CLI entry pointnode $AM render notes.md --no-open -o out.htmlnode $AM render notes.md --no-open -o out.htmlnode $AM config # 主题、是否自动开浏览器、写作检查强度、配音node $AM config # theme, auto-open, writing-check level, narrationnode $AM help flow # 组件语法,如 flow / sequence / treenode $AM help flow # component syntax such as flow, sequence, tree
After npx skills update answer-me-with-html -y the description returns to the eager upstream wording. The global rule still holds, but layer one becomes soft again.
skills@1.7.0 asks for Node 22.20.0 or newer. The local v22.15.0 only produced a warning and the install completed; treat the version as the first suspect for odd install errors.
可以更严格
You can go stricter
在 skill 目录下加 agents/openai.yaml,写 policy: allow_implicit_invocation: false,模型就完全不会自主调用,只有点名才生效。代价是"用 HTML 讲一下"这类自然语言也不再触发。
Add agents/openai.yaml in the skill directory with policy: allow_implicit_invocation: false and the model can never invoke it on its own. The cost is that plain-language requests stop working too.
页面目录按需创建
The page directory appears on demand
第一次真正出页面时才会创建 ~/.answer-me-with-html/。验证过程会临时写到隔离目录,不污染家目录;清理前可以先用 am clean --dry-run 看会删什么。
The real page directory is created the first time a page is produced. Verification writes to an isolated temp home instead; run am clean --dry-run before deleting anything.
可迁移的经验
What generalises
工具的触发时机是产品决策。同一个能力,"什么时候用"要和"怎么用"一起设计,否则能力越强噪音越大。
Trigger policy is a product decision. Design when a capability fires alongside how it works, or stronger tools only add noise.
Split the responsibilities: the declarative description controls recall, a hard rule controls autonomous action. One layer alone gets eroded by updates or bad judgement.
验证要挑可复查的信号(目录、文件、清单),而不是感觉。反向用例和正向用例同等重要。
Verify with checkable signals — directories, files, lists — not impressions, and treat the negative case as equal to the positive one.