knowledge-base
通用知识库构建 & 查询工具。给定一个包含 PDF/Sphinx-HTML 的原始文档文件夹,批量转成可 grep 的 Markdown、抽符号倒排、生成 LLM 摘要 sidecar 和 manifest 聚合索引。Agent 进入陌生领域时先 `ls ~/.maxclaw/kb/` 看有无相关知识库,再按"L3…
Skill by maxesisn
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/maxesisn-knowledge-base
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, frontend, ml, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/knowledge-base
What's inside
- Skill name
knowledge-base- Description
- 通用知识库构建 & 查询工具。给定一个包含 PDF/Sphinx-HTML 的原始文档文件夹,批量转成可 grep 的 Markdown、抽符号倒排、生成 LLM 摘要 sidecar 和 manifest 聚合索引。Agent 进入陌生领域时先 `ls ~/.maxclaw/kb/` 看有无相关知识库,再按"L3 符号查询 → grep → read MD → 必要时回查原 PDF 页"的分层流程取用。
- License
- MIT
- Instructions
- 377 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (9)
- SKILL.md
- build_manifest.ts · scripts/
- build_notes_index.py · scripts/
- extract_symbols.py · scripts/
- make_sidecar.ts · scripts/
- pdf_to_md.py · scripts/
- sphinx_html_to_md.py · scripts/
- tools.test.ts
- tools.ts
SKILL.md (first lines)
# Knowledge Base Skill
构建**可探索的结构化知识库**,让 agent 在 `grep + 文件阅读 + 原 PDF 回查`的朴素组合下,快速在陌生技术领域干活。
## 何时使用
1. **查 API / 手册内容**:用户问 "X 是什么 / 怎么用 / 什么时候改" 这类事实性问题,涉及已建立的 kb 领域(如某 C/C++ SDK、API 手册、编程指南等)
2. **接触陌生领域**:用户给了一批 PDF/HTML/docx 文档文件夹说"先整理一下"——用本 skill 的构建流程跑一遍
3. **回答技术问题不确定时**:先 `ls ~/.maxclaw/kb/` 看有无现成领域库;有就从 manifest 入手
## 目录约定
每个领域一个 kb 根目录:
```
~/.maxclaw/kb/<领域名>/
├── manifest.md ← agent 主入口(按类别 + 组件 + notes 三视角)
├── md/ ← 正文 Markdown(原始文档转换)
│ ├── <子领域>/*.md
│ └── web-mirror/*.md (可选:Sphinx HTML 来源的单文件视图)
├── notes/ ← agent 沉淀的智慧结晶(新增)
│ ├── INDEX.md ← 自动生成:按 tag + 时间倒排
│ └── <slug>.md ← 单篇笔记(front matter + 正文)
├── index/
│ ├── sidecars/*.json ← L1 LLM 摘要 per-file
│ ├── symbols.jsonl ← L3 符号引用(含 md/ 与 notes/ 代码块)
│ ├── symbols_inverted.json ← symbol → [file:line] 倒排
│ ├── topics.json ← topic → [files]
│ ├── categories.json ← category → [files]
│ ├── notes_tags.json ← tag → [notes] 倒排(新增)
│ ├── _sidecar_report.json
│ └── _pdf_conversion_report.json
└── raw-pdf/ ← 原始 PDF 保留,供回查图表/公式
└── by-component/ (软链或拷贝到原始目录)
```
## 查询流程(agent 视角)
**进入一个领域查一个具体项时,按顺序走**:
### Step 0 — 先查 notes(前人智慧)
notes/ 里是之前的 Claw session 沉淀的跨文档结论 / gotcha / 实测经验。**如果别人已经答过这个问题,直接站在他肩膀上**。
```bash
# 扫所有 notes 标题
ls ~/.maxclaw/kb/<domain>/notes/ 2>/dev/null | grep -v INDEX
# 按 tag 找(从 notes_tags.json 倒排)
jq -r '.["<tag>"] // []' ~/.maxclaw/kb/<domain>/index/notes_tags.json
# 关键词 grep notes
grep -l "KEYWORD" ~/.maxclaw/kb/<domain>/notes/*.md 2>/dev/null
```
如果 note 命中且**够新**(看 `updated` front matter,或 sources 引用的 md 没大变动),直接读它,跳到 Step 5/6 按需补充原文。如果 note 不够/过时/没命中,继续 Step 1。
### Step 1 — 先看 manifest
```bash
cat ~/.maxclaw/kb/<domain>/manifest.md | head -100
```
manifest 里按类别列出所有文档 + `when_to_read` 提示。如果问题明确,可直接定位到 1-2 份候选文档。
### Step 2 — L3 符号倒排(代码类符号)
```bash
jq -r '.["SYMBOL_NAME"] // "not indexed"' \
~/.maxclaw/kb/<domain>/index/symbols_inverted.json
```
命中即得 `[{file, line, kind}]`,直接跳到第 4 步。
**L3 覆盖的符号类型**(`extract_symbols.py` 的 PATTERNS):
- `builtin`:双下划线标识符 `__xxx` / `__xxx__`(intrinsic / 属性修饰符 / 类型限定符,如 `__nram__`、`__mlu_entry__`、`__bang_move`、`__BANG_ARCH__`)
- `call`:函数调用 `name(...)`(非双下划线前缀)
- `function_def`:函数定义 `type name(...) {`
- `macro`:`#define MACRO`
- `type` / `typedef`:`struct/class/union/enum Name`
- `constant`:全大写至少 4 字符的标识符 `SOME_CONST`
- `py_function` / `py_class`
**L3 的边界(设计上不抓)**:
- **只扫 fenced code block 内**——正文描述段落里的符号不抓(例如文档正文里 "声明 `__sram__` 地址空间" 这种描述性出现会漏)
- **环境变量、配置项、概念词**(如 `MLUOP_SET_JOB_LIMIT_CAPABILITY` 这种通常只在使用方法段落描述的变量)→ 走 Step 3 grep
- **L3 0 命中时的两种情况**:
- (a) 仅在正文描述,不在代码块 → grep 能找到 → 正常走 Step 3
- (b) grep 也 0 hit → 本 kb 版本里真没这个符号(可能叫别的名字/在更新版 SDK 里)
### Step 3 — 全文 grep(非代码符号)
```bash
grep -rn "SYMBOL_OR_KEYWORD" ~/.maxclaw/kb/<domain>/md/ | head -20
```
### Step 4 — 读目标文件附近上下文
```bash
sed -n '<line-10>,<line+30>p' ~/.maxclaw/kb/<domain>/md/<path>.md
```
每份 MD 内有 `<!-- page: N -->` 锚点,能精确对应到原 PDF 页码。
### Step 5 — 概念回溯
如果 Step 4 命中的是 API/常量但概念没讲清(比如 `CN_KERNEL_CLASS_UNION` 背后的 Union 任务模型),**回到 L3/grep 查核心概念词**,跳到另一份相关文档(通常是开发者指南/编程指南)补上下文。
### Step 6(可选)— 回查原 PDF 图表
当 MD 里有 "见图 X.Y" 或文字描述不清楚(公式/硬件架构图/流程图):
```
raw-pdf/by-component/<...>.pdf 页码 N(从 <!-- page: N --> 锚点来)
```
用户需要看图时告诉他 PDF 路径 + 页码即可(如果是 web channel 可以直接路径链接)。
### Step 7 — 沉淀笔记(适用时)From maxesisn/maxclaw-oss, MIT.
More from maxesisn/maxclaw-oss
- 0.521score
code-intelligence
maxesisn
代码仓库智能问答工具(repo_symbol_answer v1)。Tree-sitter AST 召回 function/class/method/interface/variable 定义 + ripgrep 词法搜索 + reranker 精排 + palette:mid LLM 综合,输出含…
SkillBFreshness: BClaude Code +9 - 0.521score
web-search
maxesisn
搜索互联网获取实时信息,通过自建 search-proxy 聚合 Tavily/Brave/Jina 三家付费 provider(带配额管理 + 失败 fallback 到 SearXNG)。适用于:查询新闻、实时价格、技术文档、不在训练数据中的信息。
SkillBFreshness: BClaude Code +9 - 0.521score
seek-advice
maxesisn
跨家 LLM 顾问 panel——给一个最小化 scenario,并行 dispatch 给 3-5 个不同 vendor 的模型,每个模型同时跑联网+离线两份,对抗单家族 prior 高度相关导致的 anchoring 偏差。用于复杂诊断、重要技术决策、自己推理 ≥2 小时未收敛兜底。
SkillBFreshness: BClaude Code +9 - 0.521score
pinned-notes
maxesisn
显式标记当前对话中需要永久保留的关键事实(必要开支、风险偏好、核心约束等),让它在 session compact/rollover 后仍存活。Agent 主动判断"哪些信息长期重要"调用,跨 session 通过 6 字符短 pin_id 引用。单 session 上限 25 条。
SkillBFreshness: BClaude Code +9 - 0.520score
reflection
maxesisn
自主反思与行动——静默处理能处理的,把该 Max 决策的记上面板
SkillBFreshness: BClaude Code +9 - 0.519score
channel-notes
maxesisn
Channel-scoped working notes — a short Markdown document per channel for decisions, deferred items, open questions, and next steps.
SkillBFreshness: BClaude Code +9 - 0.518score
workdir
maxesisn
声明当前 channel 正在使用的工作目录(可多个),显示在右侧 Workspace 卡并在压缩后可查回。多文件任务时用 set_workdirs 钉下工作目录,避免文件散落 /tmp 或每次重说。仅记录+展示,不改进程 cwd。
SkillBFreshness: BClaude Code +9 - 0.518score
async-runtime
maxesisn
需要未来唤醒、后台等待、跨 channel 通知或长期订阅时的调度选择;覆盖 cron、后台 subagent、notification、channel_subscribe、wake_channel。
SkillBFreshness: BClaude Code +9 - 0.518score
wake-channel
maxesisn
跨 channel agent 通信原语——通过 wake_channel "按门铃"通知另一个 channel 的 agent 有新状态变化
SkillBFreshness: BClaude Code +9 - 0.517score
notifications
maxesisn
持久化事件通知层 + topic-based pub-sub。所有 cron / sub-agent / mail / 价格异动等事件写入 SQLite 并按 channel 订阅 fan-out。channel 通过 channel_subscribe 声明关心哪些 topic;同时所有事件无条件 union…
SkillBFreshness: BClaude Code +9 - 0.515score
browser
maxesisn
浏览器控制能力,通过 CDP 连接系统 Brave,支持导航、截图、快照、点击、输入等操作
SkillBFreshness: BClaude Code +9 - 0.515score
cron
maxesisn
管理定时任务(cron jobs),支持添加、删除、列出、立即执行
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 9, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/maxesisn/maxclaw-oss
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from maxesisn
- 0.521score
pinned-notes
maxesisn
显式标记当前对话中需要永久保留的关键事实(必要开支、风险偏好、核心约束等),让它在 session compact/rollover 后仍存活。Agent 主动判断"哪些信息长期重要"调用,跨 session 通过 6 字符短 pin_id 引用。单 session 上限 25 条。
SkillBFreshness: BClaude Code +9 - 0.521score
web-search
maxesisn
搜索互联网获取实时信息,通过自建 search-proxy 聚合 Tavily/Brave/Jina 三家付费 provider(带配额管理 + 失败 fallback 到 SearXNG)。适用于:查询新闻、实时价格、技术文档、不在训练数据中的信息。
SkillBFreshness: BClaude Code +9 - 0.521score
seek-advice
maxesisn
跨家 LLM 顾问 panel——给一个最小化 scenario,并行 dispatch 给 3-5 个不同 vendor 的模型,每个模型同时跑联网+离线两份,对抗单家族 prior 高度相关导致的 anchoring 偏差。用于复杂诊断、重要技术决策、自己推理 ≥2 小时未收敛兜底。
SkillBFreshness: BClaude Code +9 - 0.521score
code-intelligence
maxesisn
代码仓库智能问答工具(repo_symbol_answer v1)。Tree-sitter AST 召回 function/class/method/interface/variable 定义 + ripgrep 词法搜索 + reranker 精排 + palette:mid LLM 综合,输出含…
SkillBFreshness: BClaude Code +9 - 0.520score
reflection
maxesisn
自主反思与行动——静默处理能处理的,把该 Max 决策的记上面板
SkillBFreshness: BClaude Code +9 - 0.519score
channel-notes
maxesisn
Channel-scoped working notes — a short Markdown document per channel for decisions, deferred items, open questions, and next steps.
SkillBFreshness: BClaude Code +9
Cite this page
knowledge-base skill. Agent Mart. https://agentmart.dev/skills/maxesisn-knowledge-base (last updated 2026-10-24)