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.
npx skills add JetXu-LLM/DocMason --skill grounded-compositiongit clone --depth 1 https://github.com/JetXu-LLM/DocMasonWrote 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.
[](https://agentmods.dev/skills/jetxu-llm/docmason/grounded-composition)<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>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.
| Model | Per session | Once 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 |
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.
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-compositionis never a free-standing ordinary front door.- Start only from canonical ask turn metadata and canonical ask runtime ownership.
- Start only after canonical
askhas already handed the live turn here withstatus = executeandinner_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
- Start from the canonical
askturn 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, andsupport_contractas 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
- honor the ask-owned
- Treat the task as KB-first escalation:
- run retrieval and trace first
- for host-visible inspection, prefer
docmason retrieve ... --json --compactanddocmason trace ... --json --compact; if you truly need nested retrieve or trace detail, redirect full--jsonto 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, andrecommended_hybrid_targetsbefore opening nested JSON - do not build alternate compact schemas with ad hoc
jqassumptions such as.matches - inspect
reference_resolutionwhen 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_assetswhen 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_idsmatched_unit_ids
focus_render_assetsrecommended_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.jsonvisual_layout/*.jsonspreadsheet_workbook.jsonspreadsheet_sheet/*.jsonpdf_document.jsonsemantic_overlay/*.jsonwhen 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_targetsas 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_usedandinspected_render_assetswhen the work packet exposes visual assets - after one
coveredrefresh 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 withabstained + governed-boundaryinstead of improvising around the gap
- use
- 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
- 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
- first drafting pass ->
- Keep the work evidence-backed rather than speculative.
- 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_idsthat support the final deliverable - preserve the selected
trace_idsthat 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()
- preserve the selected ask-owned
- Do not route simple direct factual questions into composition just because the wording is polite or open-ended.
- 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
- 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
- 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 hiddenfinalize; prefer the structuredworkflow_outcomehandoff when the workflow already knows the correctsupport_basis, selected IDs, bundle linkage, or other finalize-owned facts - if finalize returns
status = executetogether with a repairablesupport_fulfillment, do one contract-aware rewrite and retrace on the same turn, then finalize once more - if finalize returns
status = executetogether withadmissibility_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
- Return the main result plus any relevant bundle paths, support boundary, overall support basis, and next steps to the main agent.
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.
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.
- 7d ago First seen · 133 lines · 33 tokens per session scan A d38fbb15829f
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.
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.
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.
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…
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.
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.
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.