refinement

refinement is a skill for Claude Code from HsuanYuLee/polaris. It costs 135 tokens per session (11,917 once invoked), scanned A, original, MIT.

A first-stage workflow for agreeing on a precise definition of success for a piece of work and recording it for later checks. It also creates a small starter record when related work appears during another task.

In plain words
What is it for?
Defining acceptance conditions, starting tracked work items, recording why they were created, and preparing them for later implementation and verification.
Why use it?
It prevents the team from changing what counts as finished halfway through implementation and separates new work from the task already in progress.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash .claude/skills/driving-work-to-done/scripts/spine-loop-state.sh init \.

Good fit Defining acceptance conditions, starting tracked work items, recording why they were created, and preparing them for later implementation and verification.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/HsuanYuLee/polaris
agentmods
npx agentmods add skills/hsuanyulee/polaris/refinement

Made for: Claude Code.

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 refinement

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/hsuanyulee/polaris/refinement"><img src="https://agentmods.dev/badge/skills/hsuanyulee/polaris/refinement.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 135 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 11,917 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00135 $0.11917
Opus 5.5 $0.00054 $0.04767
Sonnet 5.5 $0.00027 $0.02383
Haiku 4.5 $0.00014 $0.01192

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

Security

Grade A, and why

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

The scan reads SKILL.md. This mod also ships 14 executable files (evals/fixtures/blocking-question.sh, evals/fixtures/slug-ticket-true.sh, evals/fixtures/slug-ticket.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/skills/refinement/SKILL.md · 566 lines

How it starts

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

refinement — 第一關:凍結 assertion

這一站只做一件事:把成功的定義變成人簽得下去的 assertion,鎖起來。

鎖起來之後,做法怎麼變都不用回來問人;只有成功的定義本身錯了才需要回到這裡重簽。

要不要立案的判斷不在這裡,在 driving-work-to-done。走到這一站表示那個判斷已經做過 而且說出來了。

手上正在做別的事、但長出了一個不能消失的東西時,不要走完這一整站。 開一張種子單, 記下前因後果就好,然後回去做原本那張:

bash .claude/skills/refinement/scripts/open-seed-issue.sh \
  --issues issues --namespace <命名空間> --slug <名字> --note '<前因後果>'

它建目錄、寫下前因後果、記一個「還沒簽 assertion」的狀態、commit,然後就結束——不簽 assertion、 不決定領域、不開 worktree。那些是接手的人在這一站要做的事,而那時候才有人真的想過怎麼 算成功。種子單會出現在 next --across-issues 的答案裡(標成 seed:),所以它拿得給另一個 session 開工。

接手一張種子單就是從這一站的第一步開始走,走到 init——init 認得它身上那個種子狀態, 會把它升級成真的輪次並說出來,不需要先手動刪掉任何東西。

單的形狀

一張單是一個目錄:

issues/                              你自己的 git repo,框架 repo 忽略它
  {命名空間}/                        自己的框架工作、某家公司、某個專案——你決定怎麼分
    {格}/
      {單號}/
        index.md                     正文含凍結塊 fence,其餘是可以改的部分
        .spine/loop-state.json       輪次
        .spine/measurement-ledger.json 量測命令登錄
        .spine/placement.json        它現在該在哪一格——流程算出來寫在這裡,不搬目錄

命名空間叫什麼不影響任何判定——流程逐個走過去,不從名字推導行為。開一張新的單時, 放進它該屬於的命名空間;不確定放哪就開一個新的,命名空間本身沒有註冊表要維護。

issues/ 不歸框架版控。 它記的是你在做什麼、為什麼這樣定義成功;換一個人用同一套 框架,這裡的內容完全不一樣。空殼由這一站自己帶著——它在這支 skill 的 templates/issues/ 底下,跟 skill 一起搬走。第一次使用時:

R=.claude/skills/refinement
mkdir -p issues
cp $R/templates/issues/README.md issues/README.md
cp $R/templates/issues/gitignore.example issues/.gitignore
git -C issues init
git -C issues add . && git -C issues commit -m "issues: 開始"

它仍然必須是一個 git repo——理由見下方〈凍結 = commit〉。verify 從檔案自己的路徑解析 repo,會自動跟著 issues/ 進它自己的歷史,不需要告訴它。

凍結塊與可以改的那部分同檔——一個工作被迫產生的東西是這一份與 code,純文件類的只有這一份。這是 設計意圖,不是一個被量的門檻:那幾個檔案是流程自己寫的,數量恆定,對常數設門檻只會是儀式。 交付時被真的判定的是「舊層還撐著沒有」,見 verify-ac。

問出只有人知道的事

assertion 簽的是「怎麼算成功」。但有幾件事同樣只有人回答得出來,而且它們決定assertion 本身寫得對 不對:這一版到底要做什麼、什麼時候要、提出的人真正想解決什麼、拿什麼測。

單裡寫的「這一層不用改」「維持現狀」「out of scope」是待證主張,不是事實。 那是提單的 人當時的推測,而範圍抄錯的代價要到判定那一站才看得到。定範圍之前實跑一次去驗它——證實了就 寫進去並註明驗過,證偽了就把它拉回範圍內。直接抄進 assertion 等於把別人的假設簽成自己的定義。

Read the full file on GitHub · 566 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 Changed · +19 lines db4bd440afb4
  2. 5d ago Changed · +20 lines a45325637216
  3. 17d ago Changed · +3 lines b935aba6edbf
  4. 19d ago Changed · +49 lines 21dbc56d89b2
  5. 25d ago Changed · +29 lines cb4f0667eb56
  6. 26d ago Changed · +36 lines 95decea47e1e
  7. 1mo ago Changed · +45 lines f71e97e0130c
  8. 1mo ago Changed · +20 lines 1870a0a5db2c
  9. 1mo ago Changed 7f262f192a57
  10. 1mo ago First seen · 345 lines · 135 tokens per session scan A 55f0c6c21546

Subscribe to this mod's changes

refinement is a skill published in the GitHub repository HsuanYuLee/polaris (5 stars, last pushed 2d ago), licensed MIT. It adds 135 tokens to every session and 11,917 once invoked, about $0.0005 per session on Opus 5.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.

Related

Other skills, from other repositories

prd-to-issues

A planning skill that turns an existing product requirements document, or PRD, into small GitHub Issues that developers can implement and verify. It groups work into complete user-facing slices instead of separate front-end, back-end, testing, and documentation tasks.

PANGKAIFENG/ai-product-manager-skills · 147 tokens

project-context-steward

A project-documentation skill that scans a new project or several related code repositories and records their shared context in a PROJECT_CONTEXT.md file. It captures the product, users, workflows, architecture, repository boundaries, terminology, entry points, and known pitfalls.

PANGKAIFENG/ai-product-manager-skills · 115 tokens

stylework-requirement-planning

A planning skill for reviewing a batch of product or business requests from sources such as Excel, CSV files, screenshots, or work-management exports. It groups requests by theme and records duplicates, dependencies, unclear items, and planning assumptions.

PANGKAIFENG/ai-product-manager-skills · 154 tokens

stylework-yunxiao-requirement-sync

A workflow for exporting selected requirements from Yunxiao, a project-management service, into a new sheet in an existing DingTalk online spreadsheet. It formats the result into a fixed set of columns and groups it by iteration.

PANGKAIFENG/ai-product-manager-skills · 153 tokens

strategic-alignment

Cascades strategy from boardroom to individual contributor. Detects and fixes misalignment between company goals and team execution. Covers strategy articulation, cascade mapping, orphan goal detection, silo identification, communication gap analysis, and realignment protocols. Use when teams are pulling in different…

alirezarezvani/claude-skills · 92 tokens

process-mapper

Use when a BizOps lead, COO, or process-improvement owner needs to document an end-to-end business process (procurement, employee onboarding, incident handoff, customer-onboarding, claims adjudication) in BPMN-style notation, measure cycle times by stage, surface where work spends most of its time waiting vs. being…

alirezarezvani/claude-skills · 176 tokens