add
Add a URL to the knowledge base. Clips it to raw/, then ingests it into wiki articles. One command does everything.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Add a URL to the knowledge base. Clips it to raw/, then ingests it into wiki articles. One command does everything.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Process all unprocessed raw files into wiki articles. Run this after adding files to raw/.
Run a health check on the wiki. Find broken links, missing articles, inconsistencies, and suggest improvements.
Query the knowledge base. Searches wiki articles and synthesizes an answer with references.
| name | add |
| description | Add a URL to the knowledge base. Clips it to raw/, then ingests it into wiki articles. One command does everything. |
| argument-hint | <url> [slug] |
Add the URL $ARGUMENTS to the knowledge base. This runs three phases.
.claude/skills/add/config.jsondepth_level value from the config (default: 100 if not set)Run the clip script:
./clip.sh $ARGUMENTS
The script tries markitdown first, then falls back to trafilatura.
If clip.sh fails or returns empty content, try the tools directly:
uv run markitdown "<url>"uv run trafilatura -u "<url>" --output-format markdownIf both tools fail, check if markitdown downloaded the original file (e.g. a PDF) to a temporary folder like /tmp/. If so, convert it to markdown directly using markitdown on the local file path and copy the output to raw/ without asking for permission.
If all approaches fail (e.g. scanned image PDFs), tell the user and stop.
Verify the file was created and has content. Read the first 50 lines to confirm.
Important: Do NOT ask the user for permission during the add process. This includes reading files, copying content from temporary folders, creating directories (mkdir), writing files, or any other file operations. Just do it all without prompting.
Read the full raw file that was just created. Then:
wiki/index.md to understand existing articleschangelog.md to understand what has been done beforewiki/<source-slug>/wiki/updated datewiki/<source-slug>/wiki/<source-slug>/summary-<source-slug>.md using the depth level from Phase 0wiki/index.md:
uv run python build_graph.pyuv run python screenshot_graph.pychangelog.md:
## [YYYY-MM-DD] ingest | <source description>
- Processed: raw/<filename>
- Folder: wiki/<source-slug>/
- Created: <list of new wiki articles>
- Summary: wiki/<source-slug>/summary-<source-slug>.md (depth: <level>)
- Updated: <list of updated wiki articles>
For each raw source, create wiki/<source-slug>/summary.md. The depth level controls
the writing style. All summaries link to every wiki article in the same folder.
Use markdown links for all references: [article name](article-name.md).
Naming: wiki/<source-slug>/summary.md
---
title: "Source Summary: <Source Title>"
created: YYYY-MM-DD
source: raw/filename.md
source_url: <original URL the source was clipped from>
depth: <100|300|500>
articles_created: [wiki/article-one.md, wiki/article-two.md, ...]
---
# <Source Title> - Summary
> **Original source:** [<Source Title or publication>](<original URL>)
<Summary content written at the chosen depth level>
## What This Source Covers
- <bullet summary of main topics>
## Wiki Articles From This Source
- [Article One](article-one.md) - one line description
- [Article Two](article-two.md) - one line description
Important: Always include a prominent link to the original source at the top of the
summary (just after the title, before the body). Use the URL that was passed to /add
as the source URL. This makes the summary self-contained -- a reader who wants to go
back to the original paper, blog post, or video can do so with one click.
100 level (Explain like I'm 12)
300 level (College level)
500 level (Expert deep-dive)
Every source summary must include at least one ASCII diagram, regardless of depth level. Choose the most appropriate type(s) for the content:
Use simple ASCII box-drawing characters. Example:
+------------------+ +------------------+
| Requesting | | Agent Name |
| Agent | | Service (ANS) |
+--------+---------+ +--------+---------+
| |
| 1. Resolve ANSName |
|------------------------->|
| |
| 2. Verify certificates |
| |
| 3. Return endpoint |
|<-------------------------|
| |
Keep diagrams readable (under 70 characters wide). Use them to reinforce the text, not replace it. At minimum include one diagram per summary.
Individual wiki articles are always written at a consistent encyclopedia style regardless of the summary depth level.
---
title: <Concept Name>
created: YYYY-MM-DD
updated: YYYY-MM-DD
sources: [raw/filename.md, ...]
related: [other-article](other-article.md), [another-article](another-article.md)
tags: [concept-specific-tag, broader-topic-tag, genai-category-tag]
---
# <Concept Name>
<Encyclopedia-style summary, 200-500 words>
## Key Points
- ...
## Related Concepts
- [linked article](linked-article.md) - brief note on relationship
## Sources
- raw/filename.md - what this source contributed
Every article must have a tags field in its frontmatter. Tags serve two purposes:
pki, zero-knowledge-proofs, dns)ai-agents, software-engineering-philosophy, multi-agent-systems)Use lowercase-kebab-case for all tags. Include 3-7 tags per article. Reuse existing tags from other articles where possible to build a coherent tag taxonomy.
After creating/updating articles, rebuild the context graph by running:
uv run python build_graph.py
This script scans all wiki articles, parses their frontmatter (related links, tags),
and generates wiki/graph.json with nodes and edges. The /query skill uses it for
tag-based search. The visual graph is viewable at wiki/graph.html.
[text](file.md) for all cross-references so they are clickable