wiki_import

wiki_import is a skill for Claude Code, Codex from theafh/ai-modules. It costs 117 tokens per session (2,408 once invoked), scanned A, original, MIT.

A workflow for importing one external resource, such as a web page, file, paper, PDF, transcript, or note, into a wiki.

In plain words
What is it for?
Use it to capture the source, identify durable information, compare it with existing wiki pages, and propose page-by-page additions or reconciliations.
Why use it?
It lets you review extracted knowledge and conflicts before anything is written to the wiki.

Skill for Claude CodeCodex

Part of the knowledge_management plugin — 6 skills, 1 agent 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/theafh/ai-modules/wiki_import
Any agent
npx skills add theafh/ai-modules --skill wiki_import
Clone the repo
git clone --depth 1 https://github.com/theafh/ai-modules

Made for: Claude Code, Codex.

Or install knowledge_management, the plugin that ships this one along with the rest of its 6 skills, 1 agent.

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 wiki_import

README.md
[![agentmods](https://agentmods.dev/badge/skills/theafh/ai-modules/wiki_import.svg)](https://agentmods.dev/skills/theafh/ai-modules/wiki_import)
Your own site
<a href="https://agentmods.dev/skills/theafh/ai-modules/wiki_import"><img src="https://agentmods.dev/badge/skills/theafh/ai-modules/wiki_import.svg" alt="Measured on agentmods" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,408 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.00117 $0.02408
Opus 5 $0.00059 $0.01204
Sonnet 5 $0.00023 $0.00482
Haiku 4.5 $0.00012 $0.00241

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

Security

Grade A, and why

wiki_import 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 4d 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.

plugins/knowledge_management/skills/wiki_import/SKILL.md · 47 lines

How it starts

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

wiki_import

<wiki_import> Resource-to-wiki reconciliation editor. Capture the resource the user pointed to as raw source, mine the captured raw for durable knowledge, diff against the wiki, and triage the result before any wiki-page write. <orient_first_top>Read $WIKI/SCHEMA.md once at the start of any session that activates this skill. The schema declares the domain, page-type enum, tag taxonomy, and conventions every classification and write must honor. The full orientation pass (SCHEMA + index + last ~350 lines of log) is covered by <orient_first> in <policy> below; this top-line note exists so the SCHEMA read is never skipped on a "quick" import.</orient_first_top> Pull a single named external resource into the wiki end to end: persist the raw, classify each candidate by page type and relation to existing content, surface conflicts between the resource and existing wiki pages, and propose reconciliations the user can accept page by page. Defer all wiki structure, discovery, orientation, raw capture, ingest, and lint behavior to the wiki skill. <resolve_skill_bundle>Resolve $WIKI_SKILL before the first bundled tool call and before $WIKI. It is the installed wiki skill bundle holding the scripts and reference docs this skill invokes. The wiki skill's <resolve_wiki_skill_bundle> block is the canonical resolution order, so follow it rather than guessing a path. From this skill's own directory the sibling hub is ../wiki. Every $WIKI_SKILL/... path below resolves through that block.</resolve_skill_bundle> <resolve_first>Resolve $WIKI through the wiki skill's discovery flow before reading the resource. Honor exit-2 ambiguity by presenting candidates and asking the user.</resolve_first> <orient_first>Read SCHEMA.md, index.md, and roughly the last 350 lines of log.md before diffing, so the diff runs against an understood corpus and domain.</orient_first> <confirm_resource>Confirm the resource pointer (URL, file path, paste, PDF, transcript, meeting note, internal note) and its kind with the user before fetching. For a URL to an externally-published article, confirm the target slug under raw/articles/; for a PDF or paper, under raw/papers/; for a meeting note, interview, or spoken-word transcript, under raw/meetings/; for an internal memo, discussion writeup, ad-hoc observation, or internal doc not published externally, under raw/notes/; for a paste, the appropriate raw/ subdirectory by kind. For edge cases (article that embeds a transcript, transcript of a private meeting, paste of unknown provenance, file that fits two buckets equally), consult $WIKI_SKILL/references/raw_taxonomy.md — the canonical reference for bucket meanings and classification heuristics.</confirm_resource> <capture_raw>Route the resource through the wiki skill's Ingest §1 — fetch and convert (URL), extract (PDF), or file (paste, meeting, note) — into raw/<kind>/<slug>.md with the required frontmatter (ingested, body-only sha256, plus source_url for an externally-published source or a relative in-repo source_path; a local file outside the repo takes no path — excerpt it into the body and note its locality). The ### raw/ Frontmatter contract in $WIKI_SKILL/references/template_schema.md is canonical for these field meanings and for how a mislabeled or legacy sidecar reconciles onto them — cite it rather than restating the moves. Write the sha256 with python3 "$WIKI_SKILL/scripts/compute_sha256.py" raw/<kind>/<slug>.md — never invent the value by hand. On re-ingest of the same source, follow the hub's Re-ingest compares before it writes rule in <capture_raw_source>, which owns this ordering: write the freshly fetched or converted body to a session-local temporary file outside the wiki tree, under a verbatim copy of the existing sidecar's frontmatter through its closing --- with the recorded sha256 carried over untouched (reproducing the blank line the sidecar keeps beneath that closing ---, since the hash covers everything after it), then run python3 "$WIKI_SKILL/scripts/compute_sha256.py" --check <temp-sidecar> on that temporary file — report-only mode, it writes nothing — while the sidecar on disk stays as it is. ok and exit 0 mean the source is unchanged: skip, leaving the sidecar untouched, with no body rewrite, no hash refresh, and no log.md entry. update and exit 1 mean drift: rewrite the sidecar body to what the source now says, refresh the recorded hash with the write-mode command above, and report the drift both to the user and in this import's log.md entry.</capture_raw> <mine_resource>Read the captured raw end to end. Extract durable claims, decisions, definitions, conventions, comparisons, workflows, and named entities. Skip passing mentions, minor details, and material outside the wiki's stated domain in SCHEMA.md.</mine_resource> For each candidate, pick a page type from the wiki skill's enum and tag it NEW, EXTEND, CONFIRM, or CONFLICT against $WIKI. Honor the page-threshold rules from the wiki skill — a passing mention does not earn a page. <surface_contradictions>For every CONFLICT, capture both excerpts verbatim, name the disagreement dimension (factual / definitional / scope / recency / source-quality), and offer two or three concrete reconciliation paths.</surface_contradictions> <propose_then_act>Emit the proposal and wait for user selections before any wiki-page write. The raw capture in step 4 stays — only the entity, concept, comparison, summary, query, and procedure writes wait.</propose_then_act> <defer_writes>Route approved NEW and EXTEND items through the wiki skill's Ingest flow (steps 3–6). Route approved CONFLICT items through its contested-page protocol (contested: true, contradictions: frontmatter, both positions recorded with dates and sources).</defer_writes> <single_resource>Source material for the proposal is the captured raw only. Skip claims the resource did not establish, even when they are true in the broader domain.</single_resource> <too_large_to_read_in_one_shot>When Read fails with File content (N tokens) exceeds maximum allowed tokens (25000), do not retry the same call — the same call fails the same way. Switch strategy: run Bash wc -l <path> to size the file, then Read with offset and limit to walk it in chunks, or run Bash grep -n <pattern> <path> to find the section you need and Read only that range. This applies in particular to Confluence-page tool-result tempfiles under .../tool-results/mcp-claude_ai_Atlassian-getConfluencePage-*.txt and to long transcripts or dense papers — sources that routinely exceed the 25k-token Read limit. The failure mode to avoid is the 3–5× same-call retry loop the model defaults to on this error.</too_large_to_read_in_one_shot> <list_before_unfamiliar_path>Before writing into a raw/<kind>/ bucket you have not recently confirmed on disk, list the parent directory once (ls "$WIKI/raw/<kind>/"). This catches a retired or renamed bucket before the Write lands in the wrong place.</list_before_unfamiliar_path> Confirm the resource pointer and its kind. If the user supplied only "this link" or "that paper", request the URL or path explicitly before continuing. Run "$WIKI_SKILL/scripts/discover_wiki.sh" and resolve $WIKI. On exit 2, present candidates in walk order and stop until the user picks. Read SCHEMA.md, index.md, and roughly the last 350 lines of log.md. Capture the resource into raw/<kind>/<slug>.md per the wiki skill's Ingest §1 (frontmatter, body-only sha256 via python3 "$WIKI_SKILL/scripts/compute_sha256.py", drift check on re-ingest). Read the captured raw end to end. Build a list of durable items, each with title, suggested page type, target slug, and an excerpt anchor into the captured raw. Search $WIKI for each item (index plus recursive grep for 100+-page wikis). Tag NEW, EXTEND, CONFIRM, or CONFLICT. For CONFLICT items, capture both excerpts verbatim. Emit one report under three H2 headings: ## New pages, ## Extensions to existing pages, ## Contradictions to reconcile. Skip CONFIRM entries unless the user asked for a full inventory. On approval, route each item through the wiki skill's matching flow, run python3 "$WIKI_SKILL/scripts/lint.py", and append a single ## [YYYY-MM-DD HH:MM] import | Source Title — N new, N extended, N contested entry to log.md listing only files actually created or updated. <output_contract> <proposal_format>Three H2 sections. Each entry: title, suggested type, target path, excerpt anchor into the captured raw. Contradictions also carry wiki excerpt, raw excerpt, disagreement dimension, and ≥2 reconciliation options.</proposal_format> <no_wiki_page_writes_before_approval>Skip every entity, concept, comparison, summary, query, and procedure write during the proposal phase. The raw capture is the only write that lands before approval.</no_wiki_page_writes_before_approval> <log_entry>One dated import entry that lists only files actually created or updated (raw plus wiki pages). Skip files inspected, considered, or deliberately left unchanged.</log_entry> Every candidate carries type and target; every CONFLICT carries both excerpts and ≥2 reconciliation options; no wiki page is modified before approval; the log entry matches actual file changes. </output_contract> </wiki_import>

Read the full file on GitHub · 47 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. 4d ago First seen · 47 lines · 117 tokens per session scan A c5b94b110aa5

Subscribe to this mod's changes

wiki_import is a skill published in the GitHub repository theafh/ai-modules (38 stars, last pushed 2d ago), licensed MIT. It adds 117 tokens to every session and 2,408 once invoked, about $0.0006 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

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