refine

refine is a skill for Claude Code, Codex from Snowflake-Labs/cocoplus. It costs 37 tokens per session (1,626 once invoked), scanned A, original, MIT.

A persistent library of tested prompt strategies for CocoBrew sessions. It stores strategies with evidence from evaluations or resolved review findings.

In plain words
What is it for?
Use it to search for relevant strategies, add new evidence-backed strategies, or manage their versions and deprecation status.
Why use it?
It lets future work reuse strategies that have supporting evidence instead of relying on unverified advice.

Skill for Claude CodeCodex

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 skills/snowflake-labs/cocoplus/refine
Any agent
npx skills add Snowflake-Labs/cocoplus --skill refine
Clone the repo
git clone --depth 1 https://github.com/Snowflake-Labs/cocoplus

Made for: Claude Code, Codex.

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 refine

README.md
[![agentmods](https://agentmods.dev/badge/skills/snowflake-labs/cocoplus/refine.svg)](https://agentmods.dev/skills/snowflake-labs/cocoplus/refine)
Your own site
<a href="https://agentmods.dev/skills/snowflake-labs/cocoplus/refine"><img src="https://agentmods.dev/badge/skills/snowflake-labs/cocoplus/refine.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,626 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.1 $0.00037 $0.01626
Opus 5 $0.00018 $0.00813
Sonnet 5 $0.00007 $0.00325
Haiku 4.5 $0.00004 $0.00163

Measured yesterday against content hash 3a7249b12500, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

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.

.cortex/skills/cocorefine/refine.skill.md · 100 lines

How it starts

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

Objective

You are executing a CocoRefine command. CocoRefine maintains the CocoStrategyBook at cocoplus/strategies/ — a version-controlled, evidence-attributed repository of proven prompt strategies. It exists to prevent the self-citation failure mode: a strategy store must never grow because an agent believes its own reasoning was sound. Every strategy's attribution must cite a recorded evaluation result — a CocoContract evidence record, a CocoSentinel verdict, or a resolved SecondEye finding — never the recording agent's self-assessment.

Before proceeding, verify that .cocoplus/ exists. If not, output: "CocoPlus is not initialized. Run $pod init first." Then stop.

Commands

$refine search [query]

Search cocoplus/strategies/*.yaml by task type, data characteristics, or keyword. Return matching strategies with their context fields and deprecation status. Exclude deprecated strategies from results unless --include-deprecated is passed.

$refine add

Interactively collect all required fields, then write a new strategy YAML to cocoplus/strategies/<strategy-id>.yaml:

  • Identity: strategy ID (slug), name, version (starts at 1), deprecation status (false)
  • Context: task type, data characteristics, quality constraint (correctness / performance / security / maintainability)
  • Strategy content: written in prescriptive, conditional-free form — no hedging language ("might help", "could improve", "in some cases")
  • Attribution: session ID, the CocoContract evidence record or quality-gate verdict that confirmed effectiveness, function version hash at attribution time
  • Degradation conditions: observed conditions where this strategy produced worse outcomes

Reject the add if:

  • The strategy content contains hedging language (scan for "might", "could", "may help", "in some cases", "possibly")
  • No evidence attribution record is provided — a self-authored justification ("I believe this works because...") is not sufficient

Read the full file on GitHub · 100 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. yesterday First seen · 100 lines · 37 tokens per session scan A 3a7249b12500

Subscribe to this mod's changes

refine is a skill published in the GitHub repository Snowflake-Labs/cocoplus (720 stars, last pushed 2d ago), licensed MIT. It adds 37 tokens to every session and 1,626 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-09-03.