skill

A workflow for extracting a reusable Agent Skill document from the current coding session. An Agent Skill is a saved set of instructions that an agent can use for a repeatable task later.

In plain words
What is it for?
Use it to create a structured SKILL.md with triggers, principles, steps, examples, and related skills, then review it before copying it into your local skills folder.
Why use it?
It preserves a proven problem-solving process instead of leaving it buried in one conversation. It also checks whether the session contains a genuinely reusable workflow rather than a one-off answer.

Command

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 commands/johnnywuj81/tokenknows/skill
Clone the repo
git clone --depth 1 https://github.com/johnnywuj81/tokenknows
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 275 The whole file, excluding the scripts and references it only reads on demand.
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.00037 $0.00275
Opus 5 $0.00018 $0.00138
Sonnet 5 $0.00007 $0.00055
Haiku 4.5 $0.00004 $0.00028

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

Security

Grade A, and why

skill 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.

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.

tokenknows-plugin/commands/skill.md · 24 lines

What it actually says

tokenknows:distill skill 的标准流程,把当前 session 蒸馏成 agent_skill:

适用场景:

  • session 中 Claude 解决了一个 可重复 的问题 (e.g. "如何修 React Flow MiniMap 白板")
  • 用户想把这次的解决过程沉淀成下次自动调用的 skill

蒸馏出来的 SKILL.md 结构:

  • frontmatter: description (含 trigger 关键词)
  • 适用场景
  • 核心原则
  • 关键步骤
  • 好例子 / 坏例子
  • 相关 skill
  1. session 必须有明确的 "可复用工作流"; 如果只是闲聊 / 一次性问题, 拒绝并建议用 weekly_report
  2. submit_session_events
  3. distill_document(document_type="agent_skill")
  4. 展示蒸馏出的 SKILL.md
  5. 询问用户是否要 cp~/.claude/skills/<name>/SKILL.md 立即生效
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 · 24 lines · 37 tokens per session scan A 958471e8c222

Subscribe to this mod's changes

skill is a command published in the GitHub repository johnnywuj81/tokenknows (4 stars, last pushed 14d ago), licensed MIT. It adds 37 tokens to every session and 275 once invoked, about $0.0002 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-31.