Agent skill · Code Review & Quality

deeprefine

Agent-native DeepRefine refinement loop — same control flow as DeepRefine.refine(), graphify search instead of FAISS, session LLM, dry-run review before approved graph writes.

HKUST-KnowCompgithub.com/HKUST-KnowCompGitHub ↗
claude-codeships scriptsMIT
Install
npx skills add HKUST-KnowComp/DeepRefine-Skill --skill deeprefine_skill --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 33
SKILL.md size: 16 KB
Bundled scripts: yes
Path: deeprefine_skill/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 89
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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: ```bash 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`; `dee

What's inside
Steps it walks through
  1. Default safety policy: dry-run only
  2. FORBIDDEN (hard stop)
  3. Constants (match refinerunner.py / DeepRefine)
  4. Mandatory artifact
  5. Query queue selection (default behavior of /deeprefine)
  6. Control flow (must match DeepRefine.refine())
  7. Evidence-aware review rules
  8. LLM prompts (verbatim — do not paraphrase)
  9. Judgement (answerablejudgement)
  10. Error abduction (errorabduction) — only if len(interactionhistory) > 1
  11. KG refinement actions (kgrefinementaction) — only if len(interactionhistory) > 1
  12. Per-query checklist (report in chat)
  13. Commands (in order)
  14. looptrace.json schema
Ships with 24 files
  • SKILL_COPILOT.md
  • SKILL_OPENCODE.md
  • __init__.py
  • action_review.py
  • adapter_graphify.py
  • agent_graph.py
  • agent_loop.py
  • agent_prompts.py
  • claude_skill/SKILL.md
  • claude_skill/references/deeprefine-workflow.md
  • claude_skill/references/llm-prompts.md
  • claude_skill/references/trace-and-commands.md
  • cli.py
  • codex_skill/SKILL.md
  • codex_skill/agents/openai.yaml
  • codex_skill/references/deeprefine-workflow.md
  • codex_skill/references/llm-prompts.md
  • codex_skill/references/trace-and-commands.md
  • commands/opencode/deeprefine-apply.md
  • commands/opencode/deeprefine-review.md
  • commands/opencode/deeprefine.md
  • gemini_extension/GEMINI.md
  • gemini_extension/commands/deeprefine.toml
  • gemini_extension/commands/deeprefine/apply.toml
first 24 of 33
Commands it runs
deeprefine apply --refresh-wiki --trace-file ... --refinement-file ...
deeprefine loop finish --trace-file ... --refinement-file ...
deeprefine loop init --query "<exact question>"
deeprefine review --trace-file graphify-out/.deeprefine/loop_trace_<id>.json --refinement-file graphify-out/.deeprefine/refinement_actions_<id>.txt
mkdir -p graphify-out/.deeprefine
cp graphify-out/graph.json graphify-out/.deeprefine/graph.json.bak
deeprefine history sync-memory
deeprefine history list --pending
deeprefine loop init --query "<question>"
deeprefine loop validate --trace-file graphify-out/.deeprefine/loop_trace_<id>.json
More from DeepRefine-Skill
All skills →
About this skill
What does the deeprefine skill do?

Agent-native DeepRefine refinement loop — same control flow as DeepRefine.refine(), graphify search instead of FAISS, session LLM, dry-run review before approved graph writes.

How do I install it?

Run `npx skills add HKUST-KnowComp/DeepRefine-Skill --skill deeprefine_skill --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From HKUST-KnowComp/DeepRefine-Skill, a repository with 89 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going