knowledge-finalize

A final step for a research pipeline that saves a checked draft as a page in a connected wiki. It also updates the wiki's indexes, records the project, and runs structural checks.

In plain words
What is it for?
Use it to publish a verified research draft, update wiki navigation and records, and confirm the deposited page meets the wiki's format rules.
Why use it?
It prevents verified research from remaining as an isolated file that future research cannot reuse.

Skill for Claude CodeCodex

Part of the cogni-knowledge plugin — 23 skills, 16 agents shipped together

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/cogni-work/insight-wave/knowledge-finalize
Any agent
npx skills add cogni-work/insight-wave --skill knowledge-finalize
Clone the repo
git clone --depth 1 https://github.com/cogni-work/insight-wave

Made for: Claude Code, Codex.

Or install cogni-knowledge, the plugin that ships this one along with the rest of its 23 skills, 16 agents.

Per session 137 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 31,871 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.00137 $0.31871
Opus 5 $0.00068 $0.15935
Sonnet 5 $0.00027 $0.06374
Haiku 4.5 $0.00014 $0.03187

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

Security

Grade C, and why

knowledge-finalize scanned grade C with 2 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 3d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf "<project_path>/.metadata/verify-shards"

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

[`references/finalize-compose-subprocess.md`](../../references/finalize-compose-subprocess.md)
cogni-knowledge/skills/knowledge-finalize/SKILL.md · 1,148 lines

How it starts

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

Knowledge Finalize

Phase 7 of the inverted pipeline. Reads <project>/output/draft-vN.md + <project>/.metadata/verify-vN.json + <project>/.metadata/citation-manifest.json, runs cycle-guard.py to refuse self-citing loops, deposits the verified draft as <WIKI_ROOT>/wiki/syntheses/<synthesis-slug>.md, runs three cogni-wiki helpers (wiki_index_update.py, config_bump.py, rebuild_context_brief.py) directly at script level, appends a research_projects[] entry to binding.json, writes one ## [YYYY-MM-DD] finalize | … line to wiki/log.md, and runs a Step 10.5 conformance gate (lint_wiki.py --fix=all + health.py) so the deposited base passes cogni-wiki's own structural checks.

This is the inverted-pipeline closing step. Without it, every verified draft lives forever in <project>/output/ and the wiki cannot accumulate cross-source framing — the compounding property that differentiates cogni-knowledge from one-shot deep-research tools requires future knowledge-compose runs to read wiki/syntheses/*.md as prior context. Finalize is what makes that read non-empty.

Synthesis-page frontmatter shape (matches cogni-wiki SCHEMA for type: synthesis per cogni-wiki/CLAUDE.md §"Page Frontmatter"):

---
id: <synthesis-slug>
title: <plan.topic verbatim>
type: synthesis
tags: [synthesis]
created: <today ISO>
updated: <today ISO>
sources:
  - wiki://<cited-slug-1>
  - wiki://<cited-slug-2>
derived_from_research: <project-slug>
draft_revision_round: <verify.revision_round>
---

derived_from_research is stamped inline (no lineage-stamp.py dispatch — that helper walks raw/research-<slug>/, which inverted-pipeline projects don't write to). draft_revision_round is informational; cogni-wiki's lint allows arbitrary additive frontmatter keys.

Read ${CLAUDE_PLUGIN_ROOT}/references/inverted-pipeline.md §"Phase 7 — knowledge-finalize" once to anchor on the contract.

When to run

  • <project>/.metadata/verify-vN.json exists for the latest output/draft-vN.md (Phase 6 / knowledge-verify has run).
  • User explicitly invokes /cogni-knowledge:knowledge-finalize.

Read the full file on GitHub · 1,148 lines

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. 3d ago First seen · 1,148 lines · 137 tokens per session scan C cd746008f592

Subscribe to this mod's changes

knowledge-finalize is a skill published in the GitHub repository cogni-work/insight-wave (12 stars, last pushed 3d ago), licensed Apache-2.0. It adds 137 tokens to every session and 31,871 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it C with 2 findings (recursive force delete, runs shell commands). 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens