grounded-answer

grounded-answer is a skill for Claude Code, Codex from JetXu-LLM/DocMason. It costs 32 tokens per session (2,535 once invoked), scanned A, original, Apache-2.0.

A workflow for answering questions using information from DocMason’s published knowledge base, with evidence and source tracking. It is an internal step reached through DocMason’s standard question-answering entry point.

In plain words
What is it for?
Use it to answer business questions from the published knowledge base, trace supporting evidence, inspect rendered evidence when needed, and produce a grounded answer.
Why use it?
It reduces the risk of answering from unsupported assumptions by checking retrieved information, its source, and the final answer state.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to answer business questions from the published knowledge base, trace supporting evidence, inspect rendered evidence when needed, and produce a grounded answer.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jetxu-llm/docmason/grounded-answer
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 JetXu-LLM/DocMason --skill grounded-answer
Clone the repo
git clone --depth 1 https://github.com/JetXu-LLM/DocMason

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 grounded-answer

README.md
[![agentmods](https://agentmods.dev/badge/skills/jetxu-llm/docmason/grounded-answer.svg)](https://agentmods.dev/skills/jetxu-llm/docmason/grounded-answer)
Your own site
<a href="https://agentmods.dev/skills/jetxu-llm/docmason/grounded-answer"><img src="https://agentmods.dev/badge/skills/jetxu-llm/docmason/grounded-answer.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,535 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.00032 $0.02535
Opus 5 $0.00016 $0.01267
Sonnet 5 $0.00006 $0.00507
Haiku 4.5 $0.00003 $0.00253

Measured 8d ago against content hash 765e5574fca5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

grounded-answer 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 8d 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.

skills/canonical/grounded-answer/SKILL.md · 143 lines

How it starts

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

Grounded Answer

Use this skill when the task is to answer a question from the published DocMason knowledge base rather than only retrieve evidence.

This is the inner specialist answer workflow behind the user-facing ask entry surface. Ordinary users should not need to name this workflow explicitly before asking business questions.

Front-Door Precondition

  • grounded-answer is not a free-standing ordinary front door.
  • Start only from canonical ask turn metadata and canonical ask runtime ownership.
  • Start only after canonical ask has already handed the live turn here with status = execute and inner_workflow_id = grounded-answer.
  • If the current turn is missing that ask-owned handoff, stop and route back to ask.

Required Capabilities

  • local file access
  • shell or command execution
  • ability to inspect structured JSON output
  • ability to inspect rendered images when the cited evidence requires visual confirmation

If the agent cannot inspect required rendered evidence, stop and explain that the environment is not capable enough for grounded answering.

Procedure

  1. Start from canonical ask turn metadata instead of assuming every direct answer is purely KB-grounded.
    • honor the ask-owned work_brief, resolved decisions, accepted scopes, and affected-output boundary; use them to preserve the intended medium and critical distinctions without reopening decisions this workflow does not own
    • treat answer_state as the top-level four-state answer contract
    • choose an explicit support_basis for the overall answer:
      • kb-grounded
      • external-source-verified
      • model-knowledge
      • mixed
    • honor ask-provided reference_resolution, source_scope_policy, evidence_requirements, and support_contract; when evidence_requirements is present, treat it as the canonical odd-question inspection contract before widening scope or changing evidence basis
    • write a short support ledger before drafting:
      • which source boundary must survive
      • which comparison sources must both survive
      • which published evidence channels are required
      • whether this turn still has the one allowed contract-repair chance
  2. Normalize the user question and decompose it only when that improves grounded retrieval.
  3. Run docmason retrieve "<query>" --json --compact for the initial question or sub-question when KB evidence is part of the answer path.
    • if you truly need the full nested retrieve payload, redirect full --json to a local file and inspect it selectively instead of streaming it into the live chat context
    • treat compact retrieve as the stable host-facing projection; inspect results, reference_resolution, source_scope_policy, and recommended_hybrid_targets before reaching for nested JSON
    • do not build alternate compact schemas with ad hoc jq assumptions such as .matches
    • prefer published affordance sidecars and already-published evidence channels over ad hoc source inspection
    • inspect reference_resolution first when the user has named a document or locator in user-native terms
    • keep DocMason workspace commands sequential inside the same live answer path; do not overlap retrieve, trace, sync, status, or validate-kb while a lease-owning step is still running
  4. Inspect the strongest evidence bundles, matched units, graph expansions, render references, and published-evidence sufficiency judgment.
    • when reference_resolution.status is exact, preserve that narrowing and do not let neighboring documents silently dilute it
    • when reference_resolution.status is approximate but unit_match_status is exact, preserve the approximate notice but still treat the resolved source narrowing as intentional
    • when reference_resolution.status is approximate or unresolved, keep the inline notice and answer wording honest about that boundary
    • when the question is artifact-sensitive, inspect compact retrieval fields first:
      • matched_artifact_ids
      • matched_unit_ids
      • matched_overlay_unit_ids
      • focus_render_assets
      • recommended_hybrid_targets
      • score details such as structure_context_bonus, semantic_overlay_bonus, and compare_coverage_bonus
    • when the answer boundary truly depends on exact artifact metadata such as section_path, caption_text, continuation_group_ids, procedure_hints, or semantic_labels, inspect a file-first full retrieve capture or the published artifact sidecars rather than pasting the nested payload into chat
    • treat those published payloads as an ordered evidence path: first decide whether retrieved text, structure, notes, or media already settle the claim, then inspect cited focus_render_assets, render refs, or page spans when visual confirmation would materially change the answer, and only then escalate
    • when published sufficiency fails because of hard-artifact semantic gaps, the grounded-answer path must enter the governed ask-time multimodal refresh before any raw source inspection
      • use recommended_hybrid_targets as the only legal query-aware narrowing entrypoint
      • if the turn becomes a waiter on that governed refresh, keep the same turn paused and reuse the shared result
      • once the governed refresh picks a source, complete that source's current hybrid candidates, inspect listed render or focus-render assets when present and answer-relevant, reretrieve, and retrace before treating the ask as ready to answer
      • record lightweight settlement audit fields such as render_inspection_used and inspected_render_assets when the work packet exposes visual assets
      • after one covered refresh and post-refresh retrieve/trace, close honestly with the remaining support boundary instead of starting a second same-turn refresh
      • if the governed refresh settles blocked, close the turn as abstained + governed-boundary
  5. Run provenance tracing for the strongest support when you need corroboration, contradiction checks, or answer-state clarification:
    • docmason trace --source-id <source_id> --json --compact
    • docmason trace --answer-file <path> --json --compact
    • docmason trace --session-id <session_id> --json --compact
    • if you truly need nested segment support objects, redirect full --json to a local file and inspect it selectively instead of loading the full raw trace payload into the live chat context
    • treat compact trace as the stable host-facing projection; inspect answer_state, reference_resolution, source_scope_policy, issue_codes, and recommended_hybrid_targets before reaching for nested JSON
    • when the same live turn creates more than one ask-owned retrieve session or more than one plausible final trace candidate, keep an explicit artifact ledger while you work:
      • preserve the selected ask-owned session_ids that support the final answer
      • preserve the selected trace_ids that bind the final answer-file version
      • return those selected IDs to the main agent for finalize-time use instead of leaving commit-time disambiguation to complete_ask_turn()
    • if the turn produced only one ask-owned retrieve session and one final trace, ordinary automatic hydration remains sufficient
  6. Inspect renders when:
    • the strongest support uses low-confidence extracted text
    • a cited unit has little or no text but does have rendered evidence
    • layout, tables, diagrams, screenshots, or visual style are part of the answer boundary
    • the odd-question plan explicitly prefers render or media
    • artifact supports expose render_page_span, bbox, or normalized_bbox that materially narrow what must be checked
    • artifact or segment supports expose focus_render_assets, which should be preferred over full-page renders when present
    • do not treat every multimodal source as a reason to reopen the raw file; render inspection is for questions whose answer boundary actually depends on visual semantics or a published render-only gap
  7. Draft the canonical answer file under runtime/answers/ when conversation context exists.
    • if you need auxiliary drafts or exported scratch artifacts and the user did not specify a path, place them under runtime/agent-work/
  8. When the answer is externally verified, persist the lightweight external support manifest before or alongside the final trace so the combined support contract stays machine-readable.
  9. Run docmason trace --answer-file <path> --json --compact as the final grounding check.
    • when the answer depends on artifact-level support, inspect compact trace fields first:
      • supporting_artifact_ids
      • segment supporting_artifact_ids
      • segment supporting_overlay_unit_ids
      • segment support-lane counts and compact support counts
    • when you genuinely need nested artifact_supports, semantic_supports, render refs, page spans, or region boxes, inspect a file-first full trace capture or the published artifact surfaces rather than streaming the nested trace payload into chat
    • hand the same answer-file path, plus any selected session_ids / trace_ids, back for hidden finalize; prefer the structured workflow_outcome handoff when the workflow already knows the correct support_basis, selected IDs, or other finalize-owned facts
    • if finalize returns status = execute together with a repairable support_fulfillment, do one contract-aware rewrite and retrace on the same turn, then finalize once more
    • if finalize returns status = execute together with admissibility_repair, use its issue codes and suggested action to rewrite the same answer file, rerun trace, and finalize once more
    • do not render terminal closure metadata yourself; return the exact business answer and workflow-owned support facts to ask, which alone decides whether a separate status line or boundary explanation is user-visible
  10. Emit one of these final answer states:
  • grounded
  • partially-grounded
  • unresolved
  • abstained
  1. Return the final answer, final answer_state, overall support_basis, support boundary, and next steps to the main agent.

Read the full file on GitHub · 143 lines

Files

What ships with it

1 file 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. 8d ago First seen · 143 lines · 32 tokens per session scan A 765e5574fca5

Subscribe to this mod's changes

grounded-answer is a skill published in the GitHub repository JetXu-LLM/DocMason (135 stars, last pushed 4d ago), licensed Apache-2.0. It adds 32 tokens to every session and 2,535 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-08-30.

Related

Other skills, from other repositories

openkb-deck-neon

A skill for creating a single-file HTML slide deck from content stored in OpenKB, a knowledge-base chat system. It defines a dark, high-tech visual style using neon colors, glow effects, and glass-like panels.

VectifyAI/OpenKB · 173 tokens

openkb-deck-editorial

A tool for creating a single-file HTML slide presentation from compiled knowledge-base content. Its visual style uses a warm cream background, serif typography, and brick-red accents.

VectifyAI/OpenKB · 117 tokens

openkb-html-critic

Use to review a generated HTML deck or single-page artifact for visual quality and structural correctness. Especially good at catching CSS specificity bugs where slide-modifier classes (.divider, .center, .q, .flow etc.) accidentally override the base .slide{display:none} and cause one slide to stack on top of every…

VectifyAI/OpenKB · 132 tokens

transformer-attention

Use when reasoning about Transformer self-attention, multi-head attention, positional encoding, masked decoder attention, or why attention replaced recurrence/convolutions in sequence models; not for generic NLP or unrelated attention topics.

VectifyAI/OpenKB · 46 tokens

release-sync

Syncs latest release content to NotebookLM and HQ Knowledge Base after version tagging. Reads CHANGELOG, CLAUDE.md, and hook README, updates notebook sources, and ingests release digest. Optionally generates podcast from updated knowledge base. Use after tagging a new version to propagate release knowledge.

yonatangross/orchestkit · 62 tokens

openlore

Query and publish to an OpenLore knowledge base over SSH using ordinary shell commands. Use when a task needs project documentation, runbooks, shared team knowledge, or a place to publish findings.

aakarim/OpenLore · 42 tokens