deeprefine

deeprefine is a skill for Claude Code, Codex from HKUST-KnowComp/DeepRefine-Skill. It costs 42 tokens per session (4,737 once invoked), scanned A, original, MIT.

An agent-native workflow for refining a Graphify knowledge graph with the DeepRefine process. It proposes changes and produces a review before any graph data is written.

In plain words
What is it for?
Use it with /deeprefine to query graph context, generate refinement actions, validate them, review their risk levels, and apply approved changes.
Why use it?
The dry-run step lets you inspect proposed changes and approve them explicitly before they modify the graph.

Skill for Claude CodeCodex

Written for Claude Code and Codex: disable-model-invocation in frontmatter, but also agents/openai.yaml present.

Good fit Use it with /deeprefine to query graph context, generate refinement actions, validate them, review their risk levels, and apply approved changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hkust-knowcomp/deeprefine-skill/deeprefine_skill
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.

Any agent
npx skills add HKUST-KnowComp/DeepRefine-Skill --skill deeprefine_skill
Clone the repo
git clone --depth 1 https://github.com/HKUST-KnowComp/DeepRefine-Skill

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 deeprefine

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/hkust-knowcomp/deeprefine-skill/deeprefine_skill"><img src="https://agentmods.dev/badge/skills/hkust-knowcomp/deeprefine-skill/deeprefine_skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,737 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.00042 $0.04737
Opus 5.5 $0.00017 $0.01895
Sonnet 5.5 $0.00008 $0.00947
Haiku 4.5 $0.00004 $0.00474

Measured 1mo ago against content hash 2d3bf1019872, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

deeprefine 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 1mo ago.

The scan reads SKILL.md. This mod also ships 16 executable files (__init__.py, action_review.py, adapter_graphify.py, …), 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

deeprefine_skill/SKILL.md · 477 lines

How it starts

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

DeepRefine — Agent refinement loop (strict)

Default safety policy: dry-run only

A normal /deeprefine invocation MUST NEVER call deeprefine apply.

The default /deeprefine workflow must stop after:

  1. deeprefine loop validate
  2. deeprefine review
  3. showing the proposed actions and HIGH/MEDIUM/LOW review report to the user

Then ask the user for explicit approval.

Only if the user's next message explicitly says to approve/apply/write the graph may you run:

deeprefine apply --refresh-wiki --trace-file ... --refinement-file ...
deeprefine loop finish --trace-file ... --refinement-file ...

Do not treat generation of <refinement> actions as approval. Do not treat a valid trace as approval. Do not apply in the same /deeprefine turn.


You MUST implement the same control flow as DeepRefine.refine() in DeepRefine (autorefiner/src/deeprefine.py).

Component Agent mode CLI deeprefine refine
Retrieval graphify query + k-hop from graph.json FAISS retriever
LLM Your session model External API / vLLM
Graph writes Dry-run proposal + deeprefine review; deeprefine apply only after user approval Dry-run by default; --apply persists

FORBIDDEN (hard stop)

Do NOT:

  1. Run deeprefine refine (unless the user explicitly asks for CLI/FAISS mode).
  2. Call deeprefine apply without a valid loop_trace_<query_id>.json (CLI will reject).
  3. Call deeprefine apply before running deeprefine review and receiving explicit user approval.
  4. Ignore LOW-confidence review warnings unless the user explicitly requests --allow-low-confidence.
  5. Skip any hop’s <judge>Yes</judge> / <judge>No</judge> judgement.
  6. Skip error abduction when len(interaction_history) > 1.
  7. Write <refinement> before abduction when refinement is required.
  8. Hand-edit graph.json with Python or ad-hoc JSON patches.
  9. Ignore pending history and refine only one latest query when unrefined queries already exist.
  10. Invent a shorter pipeline (“read file → write refinement → apply”).

Read the full file on GitHub · 477 lines

Files

What ships with it

40 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 477 lines · 42 tokens per session scan A 2d3bf1019872

Subscribe to this mod's changes

deeprefine is a skill published in the GitHub repository HKUST-KnowComp/DeepRefine-Skill (93 stars, last pushed 1mo ago), licensed MIT. It adds 42 tokens to every session and 4,737 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

llm-wiki

Build and maintain a persistent, interlinked Obsidian-compatible markdown wiki using Karpathy's LLM Wiki pattern. Extension-backed with auto-generated metadata, guardrails, and 14 custom tools (+3 opt-in agent-trajectory tools).

zosmaai/pi-llm-wiki · 52 tokens

binder-import

Import external data into a Binder workspace. Handles CSV, JSON, YAML, Markdown files, and directories of Markdown. Use when asked to "import data", "load records from a file", "ingest documents", "migrate data into binder", or bulk-create records from an external source.

mpazik/Binder · 62 tokens

ml_inference_optimization

This document describes the Leeroopedia MCP tools available during the with-KB benchmark run. It is a standalone reference and is not fed to the agents automatically.

Leeroo-AI/leeroopedia-mcp · 0 tokens

customer_support_agent

You have access to Leeroopedia, a curated ML/AI knowledge base, via MCP tools. These are real MCP tools registered in your environment -- call them directly like any other tool. They contain framework-specific docs, code examples, API references, and best practices.

Leeroo-AI/leeroopedia-mcp · 0 tokens

leeroopedia-mcp

Use Leeroopedia MCP to fetch grounded ML/AI best practices, build and review ML plans, debug failures, verify code/math correctness, and expand KB citations via getpage.

Leeroo-AI/leeroopedia-mcp · 42 tokens

self_evolve_rag

This document describes how to use the Leeroopedia MCP tools for the Self-Evolving RAG task. It is kept as a reference and is NOT included in the agent prompt.

Leeroo-AI/leeroopedia-mcp · 0 tokens