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.
npx agentmods add skills/cdeust/session-optimizer/refinenpx skills add cdeust/session-optimizer --skill refinegit clone --depth 1 https://github.com/cdeust/session-optimizerWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00118 | $0.03577 |
| Opus 5 | $0.00059 | $0.01788 |
| Sonnet 5 | $0.00024 | $0.00715 |
| Haiku 4.5 | $0.00012 | $0.00358 |
Grade A, and why
refine 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 223 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Automation
On Claude Code, a UserPromptSubmit hook (hooks/refine_gate.py, wired by
this plugin's hooks/hooks.json) applies this skill automatically on two
tiers. Codex and Gemini load the same skill explicitly or by description;
their packages do not claim to install the Claude-specific hook.
- Tier 1 — reference markers: prior-artifact shorthand, "exactly as/like", repeat-failure phrasing → inject the full binding-table instruction naming the matched marker classes.
- Tier 2 — ungrounded work request (the generic net): the prompt asks for work (fix/build/improve/problem/bug/should/…) but contains NO concrete anchor — no file path, no commit sha, no line ref. Any named system/variable/concept ("the memory system", "the heat variable") must then be bound to its actual code artifact before reasoning. Prompts the user grounded themselves (a path in the prompt) pass through untouched.
Explicit /refine remains for prompts both heuristics miss.
Purpose
Communication failures cost more than code failures. A terse prompt like "it must work exactly as the SSE solution" carries a precise intent that the model can mis-bind to the wrong artifact and then build the wrong thing — correctly. This skill makes the binding explicit and cheap to correct BEFORE work starts, instead of expensive to redo after.
Procedure
1. Capture — never paraphrase away the original
Quote the raw prompt verbatim at the top of the contract. The user's exact words are evidence; frustration markers ("still", "again", "back to square one") signal a REPEATED failure — treat those as pointers to prior attempts that must be recalled, not as noise to sanitize away.
2. Bind every reference — the core move
Two reference classes need binding, and BOTH go in the table:
Deictic/temporal — "it", "the X solution", "like before", "the last release", "that file", "the same way": shorthand for prior work.
Domain-entity — "the memory system", "the wiki system", "the heat variable", "recall scores": names of systems, components, variables, and concepts. These feel concrete to the user but map to MANY possible code artifacts ("heat" alone: the memory row field, thermodynamics.py, decay_cycle.py, the WRRF heat signal, the viz heat display). Picking the wrong one solves the wrong problem correctly.
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.
- yesterday First seen · 223 lines · 118 tokens per session scan A 2e310374441c
refine is a skill published in the GitHub repository cdeust/session-optimizer (1 stars, last pushed 7d ago), licensed MIT. It adds 118 tokens to every session and 3,577 once invoked, about $0.0006 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.
Other skills, from other repositories
handoff-revive
Save a compact handoff checkpoint and resume work in a fresh session without replaying the entire transcript via --resume. SAVE trigger — the slash command /handoff-revive:save (carries forward still-relevant goal/decisions/lessons from any existing handoff, then runs a content-quality check). AUTO-SAVE trigger — when…
article-writing
Write articles, guides, blog posts, tutorials, newsletter issues, and other long-form content in a distinctive voice derived from supplied examples or brand guidance. Use when the user wants polished written content longer than a paragraph, especially when voice consistency, structure, and credibility matter.
a-evolve
Apply A-Evolve's agentic evolution methodology to improve AI agent performance across runs. Use when the user wants to diagnose agent failures, generate targeted skills from error patterns, evolve system prompts, or accumulate episodic knowledge. Works standalone or inside AutoResearchClaw pipelines. Triggers on…
hive.chart-creation-foundations
Required reading whenever any chart tool is available. Teaches the one-tool embedding contract (call chartrender → live chart appears in chat AND a downloadable PNG lands in the queen session dir), the ECharts (data viz) vs Mermaid (structural diagrams) decision, the BI/financial-grade aesthetic baseline (no…
📝 任务完成后归档
重要提醒: 每次完成复杂调试或开发任务后,主动执行此流程! 将学到的经验归档为 skill,供以后参考。不要等用户提醒。.
deck-course-module
暖纸背景 + Playfair, 左侧学习目标常驻, 含 MCQ 自测页.