Agent skill

Grounded Composition

by JetXu-LLM in 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.

Apache-2.0Auto-check passedKnowledge Management

Install Grounded Composition

skills CLI
$ npx skills add JetXu-LLM/DocMason --skill grounded-composition -a claude-code

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

GitHub CLI
$ gh skill install JetXu-LLM/DocMason grounded-composition --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/grounded-composition .claude/skills/grounded-composition && 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
grounded-composition
GitHub stars
147
Token cost
~2.7k tokens
SKILL.md length
1,383 words
Files
2
Skills in repo
15
Repo updated
First seen
Licence
Apache-2.0

At a glance

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

  • Works in 10 steps: Start from the canonical ask turn… → Treat the task as KB-first escalation → Start complex work with a visible method… → …
  • Tasks that involve Knowledge bases
  • SKILL.md covers Front-Door Precondition, Required Capabilities, Procedure and Escalation Rules, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Grounded Composition is an agent skill from 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.

Its SKILL.md is about 2.7k 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. 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

Example prompts

  • “/grounded-composition”

Workflow steps

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

  1. Start from the canonical ask turn metadata and answer-file path.
  2. Treat the task as KB-first escalation
  3. Start complex work with a visible method or plan summary before diving into the deeper evidence loop.
  4. Keep the work evidence-backed rather than speculative.
  5. For compare or synthesis tasks, keep an explicit support ledger while drafting
  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/.
  8. When structured drafting or research artifacts help, place them under runtime/agent-work///.
  9. Run final provenance tracing over the answer file when the result makes source-grounded claims.
  10. Return the main result plus any relevant bundle paths, support boundary, overall support basis, and next steps to the main agent.

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

Grounded Composition loads about 2.7k tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 1,383 words of instructions outside code blocks.

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

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). 1,383 words, ~2,688 tokens.

Download SKILL.mdSave it as .claude/skills/grounded-composition/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
grounded-composition
description
Produce evidence-backed research, planning, drafting, or composition output from the published DocMason knowledge base while preserving provenance and answer-file discipline.

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.
Show full SKILL.md (266 more words)Show less

Escalation Rules

  • Do not bypass retrieval and trace just because the task feels like writing rather than answering.
  • Do not flatten source-derived evidence and user-memory context together without surfacing source family and trust distinctions.
  • If style or visual constraints come from screenshots, preserve that boundary and inspect the stored attachments or renders before finalizing.
  • If the result still depends on unresolved design tradeoffs or weak evidence, qualify the output instead of presenting it as settled fact.
  • If source-reference resolution is only approximate or unresolved, keep that notice explicit in the composition boundary rather than pretending the cited source was matched exactly.
  • If visual or tabular claims are really artifact-level, do not cite only a loose source summary in your internal evidence notes. Carry the artifact grounding through the draft.
  • Treat trace grounding_reason_codes and coverage ratios as diagnostics for repair and explanation. They do not override the final answer_state.
  • Do not let composition become a catch-all for simple factual lookup. The user should still get the narrowest honest workflow and evidence basis.
  • Do not create a growing list of special composition subtypes for odd questions. Prefer the shared evidence-channel model and published affordance layer instead.

Completion Signal

  • The workflow is complete when the main result is written to the canonical answer path, any optional composition bundle artifacts are linked, and the support boundary remains explicit.

Notes

  • This is an inner agent-facing workflow behind ask. It is not a public docmason compose command.
  • Reconciliation-only or operator-direct evidence work does not satisfy this workflow's front-door precondition.
  • grounded-composition is for evidence-backed white-collar drafting and research, not freeform unsupported creative writing.

© 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/grounded-composition of JetXu-LLM/DocMason.

  • SKILL.md
  • workflow.json

Open the folder on GitHubat commit 362417b

Compare with similar skills

Grounded Composition 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.

Grounded Composition compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Grounded Composition this skillJetXu-LLM/DocMason147—~2.7kAutomated 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
  • 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
  • Operator Eval

    JetXu-LLM/DocMason

    Run the hidden operator-only evaluation loop over local runtime/eval artifacts without exposing that surface in normal first-contact workflows.

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

Questions about Grounded Composition

What does Grounded Composition do?

Produce evidence-backed research, planning, drafting, or composition output from the published DocMason knowledge base while preserving provenance and answer-file discipline. Grounded Composition is an agent skill from 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.

When should I use Grounded Composition?

Grounded Composition fits situations like: tasks that involve Knowledge bases.

How do I install Grounded Composition in Claude Code?

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

How do I install Grounded Composition in Codex?

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

Can I use Grounded Composition 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 grounded-composition -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/grounded-composition, .gemini/skills/grounded-composition, .github/skills/grounded-composition and .opencode/skills/grounded-composition in your project.

What does Grounded Composition need to run?

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

Does Grounded Composition 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 Grounded Composition 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 Grounded Composition use?

Grounded Composition 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 Grounded Composition use?

About 2.7k tokens (SKILL.md is roughly 11k 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 Grounded Composition?

Skills that share tags, products or a category with Grounded Composition: 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 Grounded Composition?

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.