knowledge-construction

knowledge-construction is a skill for Claude Code, Codex from JetXu-LLM/DocMason. It costs 24 tokens per session (1,494 once invoked), scanned A, original, Apache-2.0.

A workflow for writing bilingual knowledge records for DocMason sources using rendered evidence and extracted structure. Knowledge records are organized files that describe and connect source information.

In plain words
What is it for?
It helps create knowledge.json, summary.md, and unit-specific semantic overlay files after DocMason has prepared the evidence.
Why use it?
It turns prepared source evidence into reusable knowledge while keeping the work limited to the approved sources and units. It also supports additional sidecar files for specific units.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/jetxu-llm/docmason/knowledge-construction
Any agent
npx skills add JetXu-LLM/DocMason --skill knowledge-construction
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 knowledge-construction

README.md
[![agentmods](https://agentmods.dev/badge/skills/jetxu-llm/docmason/knowledge-construction.svg)](https://agentmods.dev/skills/jetxu-llm/docmason/knowledge-construction)
Your own site
<a href="https://agentmods.dev/skills/jetxu-llm/docmason/knowledge-construction"><img src="https://agentmods.dev/badge/skills/jetxu-llm/docmason/knowledge-construction.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,494 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00024 $0.01494
Opus 5 $0.00012 $0.00747
Sonnet 5 $0.00005 $0.00299
Haiku 4.5 $0.00002 $0.00149

Measured 5d ago against content hash e5c16f1853bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

knowledge-construction 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 5d 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/knowledge-construction/SKILL.md · 98 lines

How it starts

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

Knowledge Construction

Use this skill when docmason sync has prepared staged evidence and the agent must write knowledge.json, summary.md, or additive semantic_overlay/<unit-id>.json sidecars.

This is an internal follow-on workflow behind knowledge-base-sync. In the normal path, the main agent hands this workflow a bounded governed follow-up packet from the latest sync result before any source-level authoring starts. Ordinary users should not need to invoke it by name.

Required Capabilities

  • local file access
  • shell or command execution
  • ability to inspect rendered images and extracted artifacts

If the agent cannot inspect rendered images, stop and explain that the environment is not capable enough for multimodal knowledge construction.

Procedure

  1. If the current sync result or workflow handoff provides a governed follow-up packet path such as lane_b_follow_up.work_path, open that packet first.
    • prefer the bounded packet path handed off by knowledge-base-sync
    • treat that packet as the authoritative source and unit selection scope for this pass
    • do not scan shared-job directories to invent a job id when the bounded packet path is already available
  2. Read knowledge_base/staging/pending_work.json.
  3. If knowledge_base/staging/hybrid_work.json exists, treat that file as the authoritative hard-artifact overlay queue inside the current bounded scope.
  4. Work only on the staged items selected by the governed packet when one exists; otherwise work only on the staged items listed in pending_work.json. Treat each pending source or interaction memory as an independent bounded write scope.
    • when both a governed packet and hybrid_work.json are present, use the packet's selected sources and units as the outer boundary and the queued hybrid targets as the inner overlay queue
  5. For each assigned pending item, open:
    • work_item.json
    • source_manifest.json
    • evidence_manifest.json
    • knowledge_base/staging/hybrid_work.json when the current sync result reported candidate-prepared
    • artifact_index.json when present
    • pdf_document.json when present
    • spreadsheet_workbook.json when present
    • spreadsheet_sheet/*.json when present
    • visual_layout/*.json when present
    • derived_affordances.json when it already exists
    • extracted text and structure files
    • rendered assets referenced by the evidence manifest
    • when present, the staged interaction-specific context file such as interaction_context.json
  6. Build the source semantics from the richest published evidence available instead of defaulting to flattened text:
    • for spreadsheets, prefer workbook, sheet, table, chart, metric, dimension, time-axis, hidden-sheet, and formula summaries over raw cell dumps
    • for PDF and PPTX, prefer section paths, captions, continuation links, procedure spans, region roles, charts, tables, pictures, connectors, groups, and major regions over page-level text alone
    • when the real support is artifact-level, include artifact_id in the citation instead of citing only the parent unit_id
  7. Write knowledge.json with the required bilingual fields and only cite real evidence-unit IDs from the matching source.
  8. Write summary.md with:
    • # <title>
    • a line that mentions the source ID
    • ## English Summary
    • ## Source-Language Summary
  9. When the staged source includes high-value hybrid candidates and the environment can inspect renders, write additive semantic_overlay/<unit-id>.json sidecars only for units that are inside the current bounded scope and queued in hybrid_work.json.
    • prefer overlay work where deterministic structure is already rich but cross-region or multimodal semantics are still missing
    • keep the hard-artifact boundary intact:
      • use the queued target_artifact_ids
      • use the queued target_focus_render_assets first
      • use the queued target_render_assets and target_render_page_span
      • for image-only or scanned PDF pages, treat the published page-image artifact as the first-class target instead of pretending the text layer is enough
      • if the baseline focus render is still not legible enough, use the targeted hi-res focus-render helper for that artifact instead of rerendering the whole source
    • overlays must remain additive
    • do not rewrite deterministic sidecars such as artifact_index.json, visual_layout/*.json, spreadsheet_*, or pdf_document.json
    • bind overlay claims to consumed inputs, artifact ids when available, explicit uncertainty notes, and the current freshness contract:
      • origin
      • source_fingerprint
      • unit_evidence_fingerprint
      • covered_slots
      • blocked_slots
  10. Avoid placeholders, speculative citations, and unsupported related-source links.
  11. Treat derived_affordances.json as a published sidecar rather than scratch output.
  • the baseline affordance sidecar is generated deterministically by the repo
  • if you enrich it, keep descriptors compact, evidence-backed, grouped by channel, and explicitly derived rather than source-authored fact
  1. When evidence is weak, say so explicitly in known_gaps, ambiguities, confidence notes, or overlay uncertainty notes instead of inventing certainty.
  2. After all assigned staged sources are complete, return control to the main agent so it can rerun docmason sync --json or docmason validate-kb --json.

Read the full file on GitHub · 98 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. 5d ago First seen · 98 lines · 24 tokens per session scan A e5c16f1853bf

Subscribe to this mod's changes

knowledge-construction is a skill published in the GitHub repository JetXu-LLM/DocMason (135 stars, last pushed 2d ago), licensed Apache-2.0. It adds 24 tokens to every session and 1,494 once invoked, about $0.0001 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

Use when the user asks the openkb chat to make a deck / slide presentation / PPT / slides / 演示稿 / 幻灯片 from their compiled KB content AND wants a dark, high-tech, neon / glow / glassmorphism look (赛博 / 科技风 / 暗色 / 霓虹 / 炫酷). Generates a polished single-file HTML deck in the Aurora Glass visual direction (near-black…

VectifyAI/OpenKB · 173 tokens

openkb-deck-editorial

Use when the user asks the openkb chat to make a deck / slide presentation / PPT / slides / 演示稿 / 幻灯片 from their compiled KB content. Generates a polished single-file HTML deck in the Editorial Monocle visual direction (warm cream background, serif type, brick-red accent) — designed to be opened in a browser…

VectifyAI/OpenKB · 117 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

Document FAQ Assistant

Answer from docs, cite sources.

djinilabs/helpmaton · 10 tokens

Document Research

Deep search, synthesis from knowledge base.

djinilabs/helpmaton · 10 tokens

enrich-index

Batch-enrich astrolabe index cards. Use when the user asks to enrich, classify, or describe documents in the astrolabe index, or when listdocs(stale=true) shows unenriched cards. Reads each file, determines its type, writes a summary, keywords, and extracts headings, then calls updateindextool.

zebrr/astrolabe-mcp · 70 tokens