agentsclimarketplace

Wiki enrich

Skill Misaka16384/Wikify/skills/wiki_enrich

一套将 PDF/LaTeX 自动转化为 Obsidian 结构化 Markdown 知识图谱的 AI 智能体技能。

Install
npx -y skills add Misaka16384/Wikify --skill wiki_enrich

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Act as a Concept Miner to inspect compiled papers, check concept linkage density, and spawn subagents to extract missing mathematical and physical concepts.

SKILL.md

5.4 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it

LLM Wiki — Enrich Skill (wiki_enrich)

Resolving script paths (read first): Commands below invoke scripts as <BIN>/X.py (and a few as <SKILLS>/...). Resolve these to absolute paths once before running anything:

  • <SKILL_DIR> = the directory this SKILL.md lives in.
  • <SKILLS> = the skills/ folder containing this skill = <SKILL_DIR>/..
  • <BIN> = the bin/ folder beside it = <SKILL_DIR>/../../bin

Do not hardcode a fixed prefix like .agents/bin or ../bin: shell relative paths resolve against the current working directory (usually the topic root), not this skill's location. Once resolved, <BIN> is typically .agents/bin when invoked from the hub root, or .claude/bin from inside a topic directory.

This skill handles "gap-filling" for concept extraction. Due to token limits, initial compilations might miss secondary theorems, lemmas, or physics corollaries. This skill ensures high concept density.

Tooling (framework-agnostic): This skill is written tool-agnostic. Map each capability to your own agent's tool — read-file (Read in Claude Code, view_file in Antigravity), sub-agent / parallel task (Task/Agent in Claude Code, invoke_subagent in Antigravity), shell (Bash/PowerShell). Use the closest equivalent your framework provides; if a parallel sub-agent tool is unavailable, mine the chunks sequentially yourself.

When the user asks to enrich, deep-dive, or查漏补缺 (fill gaps) on a paper: 0. Pre-enrichment Placeholder Fill (Main Agent): * Run the placeholder detection script: python <BIN>/find_placeholders.py "<compiled_file>" * For each detected placeholder (e.g. [STUB: Awaiting synthesis]), scan the original raw/papers/ source file to see if an "exactly matching semantic context" exists. * Anti-Hallucination Guardrail: If you find what you believe to be the matching context, prompt the user for confirmation before surgically replacing the placeholder. Only proceed with the fill if the user confirms. If you do not find a clear match, skip the placeholder.

  1. Idempotency Check (Main Agent):

    • Read the target compiled paper's YAML frontmatter.
    • If enriched: <date> is present, inform the user the paper was already enriched on that date. Only proceed if the user explicitly forces re-enrichment.
  2. Density Check (Main Agent — DETERMINISTIC SCRIPT):

    • Run the deterministic density counter — do NOT count links manually: python <BIN>/llm-wiki.py stats <TOPIC_DIR> concept-density "<compiled_file>"
    • Read the JSON output. Proceed to enrichment if total_wikilinks < 5 OR density_per_1k_words < 2.0.
    • Otherwise, inform the user the density is sufficient, unless they force enrichment.
  3. Chunk & Assign (Main Agent):

    • Locate the corresponding raw source file in raw/papers/.
    • Run the deterministic chunking script to automatically divide the large raw file into smaller pieces in the scratch/ directory: python <BIN>/chunker.py "path/to/raw/file.md" --topic-dir "<TOPIC_DIR>"
    • The script will output the number of chunks created.
  4. Parallel Mining (Subagents):

    • Use your agent's sub-agent / parallel-task tool to spawn one "Concept Miner" sub-agent per chunk (or process chunks sequentially if no sub-agent tool exists).
    • Assign each subagent a specific chunk from the scratch/ directory.
    • Instruct them to deeply extract only mathematical axioms, theoretical models, theorems, and boundary conditions that are NOT already present in the initial compilation.
    • Subagent Output Contract: For each discovered concept, the subagent MUST securely register it using the centralized concept addition script: python <BIN>/add_concept.py --name "Concept Name" --source "Source Paper Name" --content "Detailed quote and explanation from the chunk."
    • The subagents should also report the names of the concepts they discovered in their response message to the main agent.
  5. Synthesize & Append:

    • Wait for all subagents to report back. If any subagent fails, log the failure and proceed with available results.
    • Collect the names of the newly discovered concepts from the subagent reports.
    • Edit the target compiled paper in wiki/references/, safely appending a new section at the very bottom (do NOT surgically splice into existing paragraphs):
      ## 5. Enriched Secondary Concepts
      *   [[New Concept A]]
      *   [[New Concept B]]
      
  6. Post-Enrichment Verification (MANDATORY):

    • Run the concept builder to sequentially generate any missing concept files correctly: python <BIN>/index_builder.py "<TOPIC_DIR>"
    • Run the reference verifier to check that all new [[Concept]] links point to existing files: python <BIN>/llm-wiki.py stats <TOPIC_DIR> verify-refs "<compiled_file>"
  7. Mark Enriched: Add or update enriched: YYYY-MM-DD in the compiled paper's YAML frontmatter.

  8. Log: Update the activity log log.md with: paper enriched, concepts added count, dangling refs resolved count.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.