refine

refine is a command for Claude Code from Connectry-io/connectrylab-architect-cert-mcp. It costs 0 tokens per session (513 once invoked), scanned A, original, MIT.

A guided refinement workflow for improving a specification, prompt, or code pattern through several rounds of questions and examples.

In plain words
What is it for?
It is for interviewing the requester, showing sample inputs and outputs, and refining the result around edge cases such as invalid data or duplicate records.
Why use it?
It reduces ambiguity by first clarifying the intended use, audience, constraints, and examples before producing a final version.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit It is for interviewing the requester, showing sample inputs and outputs, and refining the result around edge cases such as invalid data or duplicate records.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/connectry-io/connectrylab-architect-cert-mcp/refine
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.

Clone the repo
git clone --depth 1 https://github.com/Connectry-io/connectrylab-architect-cert-mcp

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 refine

README.md
[![agentmods](https://agentmods.dev/badge/commands/connectry-io/connectrylab-architect-cert-mcp/refine/github.svg)](https://agentmods.dev/commands/connectry-io/connectrylab-architect-cert-mcp/refine)
Your own site
<a href="https://agentmods.dev/commands/connectry-io/connectrylab-architect-cert-mcp/refine"><img src="https://agentmods.dev/badge/commands/connectry-io/connectrylab-architect-cert-mcp/refine/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 refine

Your own site · 80×15
<a href="https://agentmods.dev/commands/connectry-io/connectrylab-architect-cert-mcp/refine"><img src="https://agentmods.dev/badge/commands/connectry-io/connectrylab-architect-cert-mcp/refine.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 513 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.
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.00000 $0.00513
Opus 5 $0.00000 $0.00257
Sonnet 5 $0.00000 $0.00103
Haiku 4.5 $0.00000 $0.00051

Measured 9d ago against content hash 654a258784fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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.

projects/d3-config/.claude/commands/refine.md · 68 lines

What it actually says

Iterative Refinement

Collaboratively refine a specification, prompt, or code pattern through structured conversation rounds.

Topic

$ARGUMENTS

Process — The Interview Pattern

Round 1: Understand Intent

Ask 3-5 clarifying questions before generating anything. Example questions:

  • What is the primary use case for this?
  • Who is the audience (developers, end users, CI system)?
  • Are there existing patterns in the codebase to match?
  • What are the constraints (performance, compatibility, size)?
  • Can you show me an example of what "good" looks like?

Round 2: Show Input/Output Examples

Present 2-3 concrete input/output pairs that demonstrate your understanding:

--- Example 1 ---
Input:  createUser({ name: "Alice", email: "[email protected]" })
Output: { ok: true, data: { id: "usr_abc", name: "Alice", email: "[email protected]" } }

--- Example 2 ---
Input:  createUser({ name: "", email: "invalid" })
Output: { ok: false, error: "Validation failed: name is required, email is invalid" }

--- Example 3 (edge case) ---
Input:  createUser({ name: "Bob", email: "[email protected]" })  // email already exists
Output: { ok: false, error: "A user with this email already exists" }

Ask: "Do these examples match your expectations? What would you change?"

Round 3: Generate Draft

Produce a first draft based on confirmed understanding. Mark uncertain decisions with [DECISION NEEDED] tags so the user can resolve them.

Round 4: Refine

Incorporate feedback. Repeat until the user confirms the output is correct.

Guidelines

  • Never assume; always ask when ambiguous
  • Show concrete examples rather than abstract descriptions
  • Keep each round focused on one concern
  • Track decisions made in earlier rounds; do not revisit unless asked
  • Converge toward a final artifact within 3-4 rounds
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. 9d ago First seen · 68 lines · 0 tokens per session scan A 654a258784fc

Subscribe to this mod's changes

refine is a command published in the GitHub repository Connectry-io/connectrylab-architect-cert-mcp (33 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 513 tokens. 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-30.