grounded-composition

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

A workflow for producing research, plans, drafts, or other written output from DocMason’s published knowledge base while keeping track of sources. It is an internal step reached through DocMason’s standard question-answering entry point.

In plain words
What is it for?
Use it to prepare slide plans, summaries, outlines, wording proposals, or research bundles based on the knowledge base and its source records.
Why use it?
It helps keep composed work tied to the available evidence instead of mixing sourced information with unsupported claims.

Skill for Claude CodeCodex

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

Good fit Use it to prepare slide plans, summaries, outlines, wording proposals, or research bundles based on the knowledge base and its source records.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jetxu-llm/docmason/grounded-composition
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-composition
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-composition

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

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

Security

Grade A, and why

grounded-composition 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 7d 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-composition/SKILL.md · 133 lines

How it starts

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

Grounded Composition

Use this workflow when the user is not only asking for a direct answer, but is asking for evidence-backed drafting, planning, synthesis, or composition work such as:

  • slide or deck planning
  • executive summary drafting
  • outline design
  • wording proposals
  • research bundles for a later deliverable

This is an inner specialist workflow behind ask. Ordinary users should not need to name it explicitly before asking.

Front-Door Precondition

  • grounded-composition is never 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-composition.
  • 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 visual style, layout, or diagram detail matters

If the environment cannot inspect the required evidence, stop and explain the blocker instead of improvising weak output.

Procedure

  1. Start from the canonical ask turn metadata and answer-file path.
    • honor the ask-owned work_brief, resolved decisions, accepted scopes, and affected-output boundary; do not silently change the requested medium, method, storyline, or locked scope
    • honor ask-provided reference_resolution, source_scope_policy, semantic_analysis.evidence_requirements, and support_contract as the governing first-pass plan for this turn
    • begin with a short support ledger:
      • which source boundary must survive
      • which comparison sources must both survive
      • which published evidence channels are required
      • whether the one allowed contract-repair chance is still unused
  2. Treat the task as KB-first escalation:
    • run retrieval and trace first
    • for host-visible inspection, prefer docmason retrieve ... --json --compact and docmason trace ... --json --compact; if you truly need nested retrieve or trace detail, redirect full --json to a local file and inspect it selectively instead of loading the raw payload into the live chat context
    • treat compact retrieve and trace payloads as the stable host-facing projection; start from results, reference_resolution, source_scope_policy, answer_state, issue_codes, and recommended_hybrid_targets before opening nested JSON
    • do not build alternate compact schemas with ad hoc jq assumptions such as .matches
    • inspect reference_resolution when the user names a document or locator in user-native terms
    • inspect published text, render, structure, notes, or media artifacts first
    • treat those published artifacts as the primary working surface: draft from retrieved units and artifact sidecars first, inspect cited focus_render_assets when visual or tabular semantics matter, and reopen source files only after the published KB has been shown insufficient for the requested deliverable
    • for spreadsheet, chart, table, diagram, PDF-layout, or slide-structure work, read the compact artifact-aware payload first:
      • matched_artifact_ids
      • matched_unit_ids
    • focus_render_assets
    • recommended_hybrid_targets
    • when exact artifact metadata is required, inspect the published artifact sidecars or a file-first full retrieve capture rather than dumping the full nested payload into chat:
    • artifact_index.json
    • visual_layout/*.json
    • spreadsheet_workbook.json
    • spreadsheet_sheet/*.json
    • pdf_document.json
    • semantic_overlay/*.json when present
    • if the composition task still depends on unresolved hard-artifact semantics, the canonical path must enter the governed ask-time multimodal refresh before any source fallback
      • use recommended_hybrid_targets as the only legal narrowing entrypoint
      • write the current-turn hybrid_refresh_work.json
      • reuse a matching shared refresh result when the turn is a waiter
      • complete the selected source's current hybrid candidates, inspect listed render or focus-render assets when present and relevant to the deliverable, then rerun retrieve and trace before drafting the final synthesis
      • 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, stop with abstained + governed-boundary instead of improvising around the gap
    • inspect direct source files or rerender only when the published-artifact plan says the knowledge base is insufficient for style, visual structure, or low-level detail
    • bring in external verification or stable model knowledge only when the composition task genuinely needs it, and keep the support basis explicit
  3. Start complex work with a visible method or plan summary before diving into the deeper evidence loop.
    • for a high-cost multi-part artifact, lock the framework, storyline, scope ownership, and page or section responsibilities before bulk production
    • when the expression grammar is still unproven and batch rework would be expensive, create one representative sample and validate it before expanding the set
    • when the workflow enters repository-owned drafting work, record the phase honestly through the hidden run-phase helpers:
      • first drafting pass -> draft
      • answer text changed before a follow-on trace -> rewrite
      • a later trace over the updated draft -> retrace
      • shared confirmation or shared-job waiting -> retry_wait
  4. Keep the work evidence-backed rather than speculative.
  5. For compare or synthesis tasks, keep an explicit support ledger while drafting:
    • which source or unit supports each major claim
    • which artifact supports each visual, tabular, or layout-sensitive claim
    • whether the current support set still lacks balance across compared documents
    • when draft, rewrite, or retrace work creates more than one ask-owned retrieve session or more than one plausible final trace candidate, also keep an explicit artifact ledger:
      • preserve the selected ask-owned session_ids that support the final deliverable
      • preserve the selected trace_ids that bind the answer-file version you intend to commit
      • return those selected IDs to the main agent for finalize-time use instead of leaving ambiguity to complete_ask_turn()
  6. Do not route simple direct factual questions into composition just because the wording is polite or open-ended.
  7. Write the main user-facing result to the canonical answer file under runtime/answers/.
    • keep that canonical answer file for the final result only, not process chatter
  8. When structured drafting or research artifacts help, place them under runtime/agent-work/<conversation_id>/<turn_id>/.
    • keep a bundle manifest
    • keep at least one research-notes artifact
    • add draft artifacts when needed
  9. Run final provenance tracing over the answer file when the result makes source-grounded claims.
    • do not keep retracing the same unchanged answer text; if the answer-file digest did not change and no new trace or session is needed, stop or reuse the existing final trace instead of silently looping
    • 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, bundle linkage, 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 deliverable and workflow-owned support facts to ask, which alone decides whether a separate status line or boundary explanation is user-visible
  10. Return the main result plus any relevant bundle paths, support boundary, overall support basis, and next steps to the main agent.

Read the full file on GitHub · 133 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. 7d ago First seen · 133 lines · 33 tokens per session scan A d38fbb15829f

Subscribe to this mod's changes

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