Agent skill

Retrieval Workflow

by JetXu-LLM in JetXu-LLM/DocMason

Retrieve ranked evidence bundles from the published DocMason knowledge base.

Apache-2.0Auto-check passedKnowledge Management

Install Retrieval Workflow

skills CLI
$ npx skills add JetXu-LLM/DocMason --skill retrieval-workflow -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install JetXu-LLM/DocMason retrieval-workflow --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/JetXu-LLM/DocMason.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/canonical/retrieval-workflow .claude/skills/retrieval-workflow && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
retrieval-workflow
GitHub stars
147
Token cost
~1.6k tokens
SKILL.md length
857 words
Files
2
Skills in repo
15
Repo updated
First seen
Licence
Apache-2.0

At a glance

Retrieve ranked evidence bundles from the published DocMason knowledge base.

  • Works in 9 steps: Confirm that the published knowledge… → Run docmason retrieve "" --json… → Inspect → …
  • Tasks that involve Knowledge bases
  • SKILL.md covers Required Capabilities, Procedure, Escalation Rules and Completion Signal, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Retrieval Workflow is an agent skill from JetXu-LLM/DocMason. Retrieve ranked evidence bundles from the published DocMason knowledge base.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `workflow.json`).

It sits in Knowledge Management, covering Knowledge bases and Dispute resolution. The repository describes itself as: DocMason is a repo-native agent that turns your complex office files into a local LLM knowledge base and your second brain. The repo is the app. Codex is the runtime. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Knowledge bases
  • Tasks that involve Dispute resolution

Example prompts

  • “/retrieval-workflow”

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. Confirm that the published knowledge base exists with docmason status --json when needed.
  2. Run docmason retrieve "" --json --compact for host-visible inspection.
  3. Inspect
  4. Narrow or widen the query by
  5. If the strongest results are weak or empty, say so explicitly instead of pretending the query succeeded.
  6. For compare-style retrieval, verify that more than one source survives the top support set before calling the bundle comparison-ready.
  7. Open the cited source, unit, artifact, and render assets before claiming confidence on difficult evidence judgments.
  8. When the task is moving toward a final answer or deliverable draft, return retrieval bundles to the main agent for provenance tracing…
  9. If you need to export a scratch evidence note and the user did not specify a destination, place it under runtime/agent-work/.

What it can do on your machine

Read from SKILL.md and the folder at commit 362417b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Retrieval Workflow loads about 1.6k tokens when it runs. Until then it costs about 24 tokens; SKILL.md has 857 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~24
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from JetXu-LLM/DocMason at commit 362417b, republished under its Apache-2.0 licence (© JetXu-LLM). 857 words, ~1,639 tokens.

Download SKILL.mdSave it as .claude/skills/retrieval-workflow/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
retrieval-workflow
description
Retrieve ranked evidence bundles from the published DocMason knowledge base.

Retrieval Workflow

Use this skill when the task is to retrieve the strongest published evidence bundles for a question or topic.

This is an evidence-focused workflow. Use it directly for explicit evidence requests, or let ask route here automatically.

Direct public retrieve remains a legal operator evidence surface. It does not substitute for canonical ask when the user is really asking for ordinary answer completion.

Required Capabilities

  • local file access
  • shell or command execution
  • ability to inspect structured JSON output

If the agent cannot run local commands or inspect the published file-only knowledge base, stop and explain that reliable retrieval is not possible.

Procedure

  1. Confirm that the published knowledge base exists with docmason status --json when needed.
  2. Run docmason retrieve "<query>" --json --compact for host-visible inspection.
    • when full nested unit or artifact detail is genuinely required, rerun full --json to a local file and inspect it selectively instead of streaming the raw payload into the live chat context
    • keep user-native source references inside the freeform query rather than inventing internal source IDs when the user already knows a file name, path, page, slide, sheet, or heading
    • keep DocMason workspace commands sequential inside the same workspace session; do not overlap retrieve, trace, sync, status, or validate-kb while a lease-owning command is still active
  3. Inspect:
    • reference_resolution
    • ranked source bundles
    • compact bundle fields such as matched_unit_ids, matched_artifact_ids, matched_overlay_unit_ids, and collection counts
    • artifact-aware score details such as structure_context_bonus, semantic_overlay_bonus, and compare_coverage_bonus
    • when exact artifact fields such as section_path, caption_text, continuation_group_ids, procedure_hints, or semantic_labels matter, inspect a file-first full JSON capture or the published artifact sidecars rather than dumping the full raw payload into chat
    • focus_render_assets when present
    • recommended_hybrid_targets when the published artifact plan still reports a hard-artifact semantic gap
    • graph-expansion summary fields
    • render references when relevant
    • any published-evidence plan fields such as preferred channels, matched channels, and whether published artifacts already look sufficient
    • for image-only or scanned PDF questions, check whether page-image artifacts or unit semantic_gap_hints are present before assuming the KB has enough semantics already
  4. Narrow or widen the query by:
    • --document-type
    • --source-id
    • --top
    • --graph-hops
    • when reference_resolution.status is exact, expect the source filter and any exact unit targeting to have already narrowed the candidate set decisively
    • when reference_resolution.status is approximate but unit_match_status is exact, expect retrieval to narrow to the resolved source while still preserving the approximate notice
    • when reference_resolution.status is approximate or unresolved, preserve the notice boundary rather than pretending the narrowing was exact
    • for artifact-hint or compare-style questions, prefer reformulations that keep the named table, chart, diagram, caption, or compared objects explicit
  5. If the strongest results are weak or empty, say so explicitly instead of pretending the query succeeded.
  6. For compare-style retrieval, verify that more than one source survives the top support set before calling the bundle comparison-ready.
  7. Open the cited source, unit, artifact, and render assets before claiming confidence on difficult evidence judgments.
  8. When the task is moving toward a final answer or deliverable draft, return retrieval bundles to the main agent for provenance tracing, grounded-answer, or grounded-composition.
  9. If you need to export a scratch evidence note and the user did not specify a destination, place it under runtime/agent-work/.
Show full SKILL.md (329 more words)Show less

Escalation Rules

  • If retrieval returns no results, surface that boundary directly and consider narrower or alternate queries only when they remain faithful to the user intent.
  • If render references or low-confidence extraction suggest visual confirmation is required, escalate to render inspection or provenance trace before final synthesis.
  • If the retrieval result already shows that the preferred published evidence channels are sufficient, do not jump back to original_doc/ as a first move.
  • If the retrieval result says published artifacts are insufficient because of hard-artifact semantic gaps, prefer the workflow-level hybrid enrichment path before source-level fallback.
  • If recommended_hybrid_targets is non-empty, use that packet as the narrowed governed multimodal refresh starting point rather than inventing your own source or artifact subset.
  • If a soft document alias is present but richer artifact-bearing evidence ranks elsewhere, do not assume the alias should hard-filter the query. Check the reference_resolution notice and the actual ranked artifacts together.
  • Retrieval alone is not the grounded-answer contract. Do not present retrieval output as a fully supported final answer.
  • Public retrieve now does implicit source-reference parsing, but public trace still remains ID-first in this phase.

Completion Signal

  • The workflow is complete when the main agent has either a ranked grounded evidence bundle or an explicit no-results boundary with concrete next steps.

Notes

  • Retrieval runs over knowledge_base/current/ by default.
  • Phase 4 retrieval is deterministic lexical plus metadata plus graph expansion. It does not use embeddings yet.
  • Retrieval logs are stored locally under runtime/logs/.
  • --json output always includes a structured reference_resolution block, and normal CLI output echoes the resolution status plus any best-effort notice.
  • If the strongest evidence depends on renders or low-confidence text extraction, inspect the render assets before finalizing the answer.
  • Ordinary natural questions should usually begin at ask, not by requiring the user to name this workflow ID.
  • When direct operator retrieval runs inside an active native thread without canonical ask ownership, treat the result as operator evidence only rather than as proof that ordinary ask already executed legally.

© JetXu-LLM, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/canonical/retrieval-workflow of JetXu-LLM/DocMason.

  • SKILL.md
  • workflow.json

Open the folder on GitHubat commit 362417b

Compare with similar skills

Retrieval Workflow next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Retrieval Workflow compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Retrieval Workflow this skillJetXu-LLM/DocMason147—~1.6kAutomated safety check: PassApache-2.0
Capture Conversationoutline/outline41k—~474Automated safety check: PassCustom licence
Find And Citeoutline/outline41k—~537Automated safety check: PassCustom licence
Xhs Virtual Productchenjin-cmd/xhs-virtual-product726—~862Automated safety check: PassMIT
OpenkbVectifyAI/OpenKB4.8k1 repos~2kAutomated safety check: WarnApache-2.0
Learn From Materialsdmoshehun-prog/learn-from-materials937—~7.9kAutomated safety check: PassMIT

Similar skills

  • Capture Conversation

    outline/outline

    Save the current conversation, a decision, or a set of notes as a document in an Outline collection; use when the user wants to keep what was discussed in their knowledge base.

    41k GitHub stars~474 tokensUpdated today
    Knowledge ManagementAuto-check passed
  • Find And Cite

    outline/outline

    Answer questions from the Outline knowledge base with quotes and links to the source documents; use when the user asks what the team knows, documented, or decided about a topic.

    41k GitHub stars~537 tokensUpdated today
    Knowledge ManagementAuto-check passed
  • Xhs Virtual Product

    chenjin-cmd/xhs-virtual-product

    This skill helps plan, select, produce, and market Xiaohongshu (RED) virtual/digital products — templates, knowledge bases, test tools, study materials.

    726 GitHub stars~862 tokensUpdated 8 days ago
    Knowledge ManagementAuto-check passed
  • Openkb

    VectifyAI/OpenKB

    A skill your agent uses when the user asks about content in their OpenKB knowledge base — research topics, concepts compiled from their documents, cross-document synthesis — or mentions openkb, an…

    4.8k GitHub starsUsed in 1 repo~2k tokens
    Knowledge ManagementAuto-check: warnings
  • Learn From Materials

    dmoshehun-prog/learn-from-materials

    Turns books, PDFs, slides and web pages into a source-grounded knowledge base and an interactive learning page in English or Chinese, with quizzes, relationship maps and reusable methodology notes.

    937 GitHub stars~7.9k tokensUpdated 2 days ago
    Knowledge ManagementAuto-check passed
  • Onyx CLI

    onyx-dot-app/onyx

    Query the Onyx knowledge base using the onyx-cli command. An agent skill from onyx-dot-app/onyx.

    32k GitHub starsUsed in 1 repo~2.6k tokens
    Knowledge ManagementAuto-check passed

More from JetXu-LLM/DocMason

All 15 skills in this repo
  • Ask

    JetXu-LLM/DocMason

    Accept an ordinary user question inside a DocMason workspace, route it to the right inner workflow, and preserve conversation-native logs automatically.

    147 GitHub stars~7.1k tokensUpdated 9 days ago
    Auto-check passed
  • Adapter Sync

    JetXu-LLM/DocMason

    Generate or refresh the local Claude adapter surface for DocMason from canonical committed sources.

    147 GitHub stars~684 tokensUpdated 9 days ago
    Auto-check passed
  • Grounded Answer

    JetXu-LLM/DocMason

    Answer a user question through DocMason's canonical grounded workflow using retrieval, provenance tracing, render escalation, and a final answer-state check.

    147 GitHub stars~3.1k tokensUpdated 9 days ago
    Auto-check passed
  • Grounded Composition

    JetXu-LLM/DocMason

    Produce evidence-backed research, planning, drafting, or composition output from the published DocMason knowledge base while preserving provenance and answer-file discipline.

    147 GitHub stars~2.7k tokensUpdated 9 days ago
    Auto-check passed
  • Knowledge Base Sync

    JetXu-LLM/DocMason

    Stage, incrementally refresh, validate, and publish the DocMason knowledge base from the local source corpus.

    147 GitHub stars~1.5k tokensUpdated 9 days ago
    Auto-check passed
  • Knowledge Construction

    JetXu-LLM/DocMason

    Write bilingual Phase 3 knowledge objects for staged DocMason sources from rendered evidence and extracted structure.

    147 GitHub stars~1.8k tokensUpdated 9 days ago
    Auto-check passed

Questions about Retrieval Workflow

What does Retrieval Workflow do?

Retrieve ranked evidence bundles from the published DocMason knowledge base. Retrieval Workflow is an agent skill from JetXu-LLM/DocMason. Retrieve ranked evidence bundles from the published DocMason knowledge base.

When should I use Retrieval Workflow?

Retrieval Workflow fits situations like: tasks that involve Knowledge bases; tasks that involve Dispute resolution.

How do I install Retrieval Workflow in Claude Code?

Run `npx skills add JetXu-LLM/DocMason --skill retrieval-workflow -a claude-code`. Or copy the skill folder (skills/canonical/retrieval-workflow in JetXu-LLM/DocMason) into .claude/skills/retrieval-workflow in your project. Claude Code loads it when a task matches its description.

How do I install Retrieval Workflow in Codex?

Run `npx skills add JetXu-LLM/DocMason --skill retrieval-workflow -a codex`. Or copy the skill folder (skills/canonical/retrieval-workflow in JetXu-LLM/DocMason) into .agents/skills/retrieval-workflow in your project. Codex loads it when a task matches its description.

Can I use Retrieval Workflow in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add JetXu-LLM/DocMason --skill retrieval-workflow -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/retrieval-workflow, .gemini/skills/retrieval-workflow, .github/skills/retrieval-workflow and .opencode/skills/retrieval-workflow in your project.

What does Retrieval Workflow need to run?

SKILL.md names no scripts, command-line tools or credentials: Retrieval Workflow is instructions for the agent only.

Does Retrieval Workflow access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Retrieval Workflow safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Retrieval Workflow use?

Retrieval Workflow is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Retrieval Workflow use?

About 1.6k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Retrieval Workflow?

Skills that share tags, products or a category with Retrieval Workflow: Capture Conversation (outline/outline, 41k stars), Find And Cite (outline/outline, 41k stars), Xhs Virtual Product (chenjin-cmd/xhs-virtual-product, 726 stars) and Openkb (VectifyAI/OpenKB, 4.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Retrieval Workflow?

JetXu-LLM (a GitHub user) maintains it in JetXu-LLM/DocMason, which has 147 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on September 30, 2026.

Source: JetXu-LLM/DocMason on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.