LLM Wiki 知识库搭建
add-karpathy-llm-wiki
向 NanoClaw 群组添加持久化 wiki 知识库。基于 Karpathy 的 LLM Wiki 模式。触发词:“add wiki”“wiki”“knowledge base”“llm wiki”“karpathy wiki”。
- License 许可
- MIT
- 最近更新
- 2026-10-30
- Stars
- ★ 5
- Forks
- 2
01 前言 Front Matter
- name
- add-karpathy-llm-wiki
- description
- Add a persistent wiki knowledge base to a NanoClaw group. Based on Karpathy's LLM Wiki pattern. Triggers on "add wiki", "wiki", "knowledge base", "llm wiki", "karpathy wiki".
02 资源文件 1
- 参考文档llm-wiki.md7.1 KB
03 SKILL.md 正文
Add Karpathy LLM Wiki
Set up a persistent wiki knowledge base on NanoClaw, based on Karpathy's LLM Wiki pattern.
Step 1: Read the pattern
Read ${CLAUDE_SKILL_DIR}/llm-wiki.md — this is the full LLM Wiki idea as written by Karpathy. Understand it thoroughly before proceeding. Summarize the core idea to the user briefly, then discuss what they want to build.
Step 2: Choose a group
AskUserQuestion: "Which group should have the wiki?"
- Main group — add to your existing main chat
- Dedicated group — create a new group just for the wiki
- Other — pick an existing group
If dedicated: ask which channel and chat, then register with pnpm exec tsx setup/index.ts --step register.
Step 3: Design collaboratively
Discuss with the user based on the pattern:
- What's the wiki's domain or topic?
- What kinds of sources will they add? (URLs, PDFs, images, voice notes, books, transcripts)
- Do they want the full three-layer architecture or a lighter version?
- Any specific conventions they care about? (The pattern intentionally leaves this open.)
Based on this discussion, create three things:
3a. Directory structure
Create wiki/ and sources/ directories in the group folder. Create initial index.md and log.md per the pattern's Indexing and Logging section. Adapt to the user's domain.
3b. Container skill
Create a container/skills/wiki/SKILL.md tailored to this user's wiki. This is the schema layer from the pattern — it tells the agent how to maintain the wiki. Base it on the pattern's Operations section (ingest, query, lint) and the conventions you agreed on with the user. Don't over-prescribe — the pattern says "your LLM figures out the rest."
3c. Group CLAUDE.md
Edit the group's CLAUDE.md to add a wiki section. This is critical — it's what turns the agent into a wiki maintainer. It should:
- Explain the wiki system concisely: what it is, the three layers (sources, wiki, schema), the three operations (ingest, query, lint)
- Index the key files and folders (
wiki/,sources/,wiki/index.md,wiki/log.md) - Point to the container skill for detailed workflow
- Ingest discipline: Be very explicit that when the user provides multiple files or points at a folder with many files, the agent MUST process them one at a time. For each file: read it, discuss takeaways, create/update all wiki pages (summary, entities, concepts, cross-references, index, log), and completely finish with that file before moving to the next. Never batch-read all files and then process them together — this produces shallow, generic pages instead of the deep integration the pattern requires.
Step 4: Source handling capabilities
Based on the source types the user plans to ingest (discussed in Step 3), check whether the agent can already handle those formats — some are supported natively, others need a skill (e.g. /add-image-vision, /add-pdf-reader, /add-voice-transcription). If a needed capability isn't installed, check if there's an available skill for it and help the user get it set up.
URL handling note
claude has built-in WebFetch, but it returns a summary, not the full document. For wiki ingestion of a URL where the full text matters, the container skill and CLAUDE.md should instruct claude to use bash commands to download full files instead. For example:
curl -sLo sources/filename.pdf "<url>"
If the document is a webpage, then claude can use fetch or agent-browser to open the page and extract full text if available. The container skill and CLAUDE.md should note this so claude gets full content for sources rather than summaries.
Step 5: Optional lint schedule
AskUserQuestion: "Want periodic wiki health checks?"
- Weekly
- Monthly
- Skip — lint manually
If yes, ask the agent to schedule the lint task using the schedule_task MCP tool in conversation.
Step 6: Restart
Run from your NanoClaw project root:
source setup/lib/install-slug.sh
launchctl kickstart -k gui/$(id -u)/$(launchd_label) # macOS
systemctl --user restart $(systemd_unit) # Linux
Tell the user to test by sending a source to the wiki group.
04 同仓库更多 Skills
WhatsApp 消息格式化
whatsapp-formatting
为 WhatsApp 格式化消息,包括可渲染为真实 WhatsApp 标签的提及(mention)。在 WhatsApp 对话中回复时使用(platform_id / chatJid 以 @s.whatsapp.net 或 @g.us 结尾)。
新频道欢迎引导
welcome
向新连接的频道介绍自己。当频道首次接入时自动触发。发送友好的问候和简要的功能概述。
Vercel 应用部署
vercel-cli
将应用部署到 Vercel。当用户要求部署、发布 Web 应用,或管理 Vercel 项目、域名和环境变量时使用。
Slack 消息格式化
slack-formatting
使用 mrkdwn 语法为 Slack 格式化消息。当回复 Slack 频道时使用(文件夹以“slack_”开头,或 JID 包含 slack 标识符)。
智能体自我定制
self-customize
定制你自己的智能体——添加能力、安装包、添加 MCP 服务器、编辑代码或 CLAUDE.md。当用户要求你添加功能、安装工具或修改工作方式时使用。对于非平凡的代码改动,请通过 create_agent 委派给构建智能体处理。
OneCLI 网关凭证代理
onecli-gateway
OneCLI 网关:一种透明的 HTTPS 代理,可将存储的凭证注入到对外调用中。当用户要求读取电子邮件、查看日历、访问 GitHub 仓库、创建 issue、检查 Stripe 付款,或与任何外部服务或 API 交互时,你必须使用本技能。不要使用浏览器扩展或 OAuth CLI 工具。直接发起 HTTP 请求;网关会自动注入凭证。