Tapestry — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Tapestry (Plugin) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
Aggregate score unchanged between these scans.
The primary manifest — the file an agent reads to learn what this artifact does.
<div align="center">
<img src="assets/tapestry_logo.png" alt="Tapestry Logo" width="400"/>
AI 原生网页智能与知识库技能包 | AI-Native Web Intelligence and Knowledge Base Skill Bundle
通过与 Agent 助手的自然对话,将分散的网络内容转化为有组织、可搜索的知识库
Transform scattered web content into organized, searchable knowledge through natural conversation with your Agent assistant
https://natsufox.github.io/Tapestry
Install: https://natsufox.github.io/Tapestry/install.html
Sources: https://natsufox.github.io/Tapestry/supported-sources.html
Use Cases: https://natsufox.github.io/Tapestry/use-cases.html
FAQ: https://natsufox.github.io/Tapestry/faq.html
如果 Tapestry 对你有帮助,请给项目一个 Star!
>
你的 Star 不仅是对开发者工作的认可,更是推动项目持续改进的动力。每一个 Star 都会激励我们开发更多实用功能、修复 Bug 并提升稳定性、完善文档和使用指南、支持更多平台和语言。
>
If Tapestry helps you, please give the project a Star!
>
Your Star is not just recognition of the developer's work, but also motivation for continuous improvement. Every Star encourages us to develop more useful features, fix bugs and improve stability, enhance documentation and guides, and support more platforms and languages.
>
⭐ Star this project on GitHub
</div>
Tapestry 是一个 AI 原生的技能包,它彻底改变了你捕获、整理和综合网络内容的方式。不再需要收藏链接或复制粘贴文章,你将获得一个完整的工作流:爬取来源、规范化内容、构建结构化知识库——全部通过与 Agent 框架的自然对话完成。
兼容框架:Claude Code、OpenClaw、Codex 等主流 Agent 框架
New 标签以便识别#### 演示:一分钟了解 Tapestry
摄取一个知乎回答:
首先打开一个 Agent 框架(如 Claude Code):
▐▛███▜▌ Claude Code v2.1.81
▝▜█████▛▘ Opus 4.6 (1M context) with max effort · API Usage Billing
▘▘ ▝▝
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯ (下文展示的命令都在这里输入)
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
⏵⏵ bypass permissions on (shift+tab to cycle)然后调用 tapestry skill 爬取来源:
/tapestry https://www.zhihu.com/question/12345/answer/67890也可以用类似含义的自然语言隐式调用:
获取内容 https://www.zhihu.com/question/12345/answer/67890AI 助手会:
captures/ - 原始 JSONfeeds/ - 规范化 JSONnotes/ - Markdown 笔记终端演示:
<div align="center"> <img src="assets/zhihu_fetch.gif" width="90%" alt="Tapestry 终端演示" /> </div>
🎬 实际测试展示
在这次知乎内容抓取的实际测试中,Tapestry 展现了强大的能力:
这个过程完全自动化,用户只需发出自然指令,系统会处理所有技术细节。
组织到知识库:
/tapestry synthesis同样地,自然语言表达:
将近期收集的内容整合到知识库AI 助手会分析内容并自动决定放在哪个主题/章节下。
浏览知识库:
使用如下命令启动知识库前端:
/tapestry display或自然语言指令:
把我的知识库显示为网站AI 助手会生成静态前端并启动本地服务器(通常是 http://localhost:8766)。
<div align="center"> <img src="assets/knowledge_base_demo.png" width="90%" alt="知识库前端界面演示" /> <p><em>知识库可视化界面 - 书籍式层次结构,支持主题导航和章节浏览</em></p> </div>
#### 安装
方法 1:Claude Code 插件市场安装
claude plugin marketplace add https://github.com/NatsuFox/Tapestry
claude plugin install tapestry@tapestry-skills方法 2:通用 npx skills 安装
安装 bundle-first 的 tapestry 技能包:
npx skills add NatsuFox/Tapestry --skill tapestry
# 仅在你需要用户级全局安装时,才使用该行命令
# npx skills add NatsuFox/Tapestry --skill tapestry -g通过纯技能安装方式产生的所有数据,都会写入已安装的 Tapestry 技能目录下的 _data/:
~/.claude/skills/tapestry/_data/
~/.openclaw/skills/tapestry/_data/
~/.codex/skills/tapestry/_data/方法 3:手动安装 GitHub Release 包
tapestry-skills-vX.Y.Z.zip 或 tapestry-skills-vX.Y.Z.tar.gzskills/tapestry 目录复制到你的 Agent 技能目录# Claude Code
cp -r tapestry-skills-vX.Y.Z/skills/tapestry ~/.claude/skills/
# OpenClaw
cp -r tapestry-skills-vX.Y.Z/skills/tapestry ~/.openclaw/skills/
# Codex
cp -r tapestry-skills-vX.Y.Z/skills/tapestry ~/.codex/skills/方法 4:本地检出(推荐用于开发和自动更新)
git clone https://github.com/NatsuFox/Tapestry.git
cd Tapestry
# 稳定本地复制
cp -r skills/tapestry ~/.claude/skills/
cp -r skills/tapestry ~/.openclaw/skills/
cp -r skills/tapestry ~/.codex/skills/
# 开发期实时符号链接
ln -s "$(pwd)/skills/tapestry" ~/.claude/skills/tapestry
ln -s "$(pwd)/skills/tapestry" ~/.openclaw/skills/tapestry
ln -s "$(pwd)/skills/tapestry" ~/.codex/skills/tapestry#### 验证安装
打开你的 Agent 框架,输入:
列出可用的爬虫如果看到支持的平台列表,说明安装成功!
#### 自动安装依赖(推荐)
Tapestry 提供了智能依赖安装功能,可以自动检测你的环境并安装所需的依赖包。
使用方法:
安装技能包后,只需在 Agent 框架中输入:
设置 Tapestry 项目,并安装 Tapestry 依赖工作原理:
pyproject.toml 并识别:playwright install chromium)安装选项:
示例输出:
环境:Python 3.11.5 在 conda 环境 'myenv' 中
包管理器:conda(pip 作为后备)
安装步骤:
1. 安装核心依赖:
pip install -e .
2. 安装浏览器支持(推荐用于 JavaScript 密集型网站):
pip install -e .[browser]
playwright install chromium
3. [可选] 安装开发工具:
pip install -e .[dev]重要提示:
手动安装(备选方案):
如果你更喜欢手动控制,请在已安装的 tapestry 技能目录中执行安装:
# 示例:Claude Code 已安装技能目录
cd ~/.claude/skills/tapestry
# 安装核心依赖
pip install -e .
# 安装浏览器支持(可选,用于 JavaScript 渲染)
pip install -e .[browser]
playwright install chromium
# 安装开发工具(可选)
pip install -e .[dev]#### 常见使用场景
场景 1:追踪技术讨论
收集 Hacker News 上关于某个技术话题的讨论:
摄取这些 Hacker News 讨论:
https://news.ycombinator.com/item?id=123
https://news.ycombinator.com/item?id=456文本分析和综合(这算是 Agent Backbone 模型自身的能力支持,和 Tapestry 关系不大):
综合这些讨论,找出共同的观点将分析结果整合到知识库:
把这些观点组织到知识库的“技术讨论”主题下场景 2:归档研究资料
收集原始资料:
摄取这个知乎问题下的所有高赞回答 https://www.zhihu.com/question/12345手动指定知识库话题创建:
在知识库中创建一个新主题:机器学习基础将收集的内容整合到知识库话题内:
把这些回答组织到新主题下场景 3:内容策展
收集某个用户的所有小红书笔记内容:
摄取这个小红书用户的所有笔记:
https://www.xiaohongshu.com/user/profile/xxx对用户内容进行分析,提取主要兴趣和主题(这也是 Agent Backbone 模型的能力):
生成这个用户的内容摘要将用户内容整合到知识库的个人档案主题下。
把这些内容组织到知识库的“个人档案”主题下如果需要精细的整理,还可以在知识库中创建一个专门的个人档案话题:
把这些内容组织到知识库的“个人档案”主题下,归档到用户 xxx 的子章节里如下是一些更细节的配置和功能。
#### 合并频率设置
重要提醒:频繁合并到知识库会导致高开销,特别是在每次摄取后都执行合并时。Tapestry 提供了灵活的合并策略来平衡实时性和性能。
配置文件位置:skills/tapestry/config/tapestry.config.json
{
"synthesis": {
"mode": "auto",
"kb_template": "default"
}
}#### 合并模式详解
1. Auto 模式(智能自动)
"mode": "auto"工作原理:
2. Manual 模式(手动控制)
"mode": "manual"工作流示例:
# 快速捕获多个 URL
"摄取这个知乎回答:https://..."
"摄取这个 HN 讨论:https://..."
"摄取这篇文章:https://..."
# 稍后选择性合并
"把第一个回答综合到知识库"
"把 HN 讨论综合到技术讨论主题下"3. Batch 模式(批量处理)
"mode": "batch"工作流示例:
# 批量摄取
"摄取这些 URL:
https://example.com/1
https://example.com/2
https://example.com/3"
# 自动触发批量合并
# Agent 会分析所有内容并统一组织到知识库#### 确定性选项(Deterministic Mode)
如果需要在每次摄取后强制更新知识库,可以使用确定性模式:
{
"synthesis": {
"mode": "deterministic",
"kb_template": "default"
}
}#### 性能考虑
合并开销来源:
index.md 文件推荐策略:
auto 模式(推荐)batch 模式manual 模式deterministic 模式(谨慎使用)优化建议:
batch 或 auto 模式让 Agent 优化合并时机#### 修改配置
编辑配置文件:
# 编辑配置
vim skills/tapestry/config/tapestry.config.json
# 或让 Agent 帮你修改
"把合并模式改为 manual"
"启用 auto 模式的智能合并"配置立即生效,无需重启。
flowchart LR
A[URL输入] --> B[摄取<br/>tapestry-ingest]
B --> C[订阅源<br/>tapestry-feed]
C --> D[综合<br/>tapestry-synthesis]
D --> E[展示<br/>tapestry-display]
E --> F[知识库网站]
style A fill:#e3f2fd,stroke:#1976d2,stroke-width:3px,color:#000
style B fill:#fff3e0,stroke:#f57c00,stroke-width:3px,color:#000
style C fill:#f3e5f5,stroke:#7b1fa2,stroke-width:3px,color:#000
style D fill:#e8f5e9,stroke:#388e3c,stroke-width:3px,color:#000
style E fill:#fce4ec,stroke:#c2185b,stroke-width:3px,color:#000
style F fill:#e1f5ff,stroke:#0288d1,stroke-width:3px,color:#000Tapestry 不是传统的 Python 库——它是为 Agent 框架的工作流模型精心设计的技能包。
#### 核心设计理念
flowchart LR
A[Agent 框架对话层] --> B1[INGEST]
A --> B2[FEED]
A --> B3[SYNTHESIS]
B1 & B2 & B3 --> C[共享确定性逻辑层]
C --> D[平台爬虫实现层]
D --> E[数据持久化层]
style A fill:#e3f2fd,stroke:#1976d2,stroke-width:3px,color:#000
style B1 fill:#fff3e0,stroke:#f57c00,stroke-width:3px,color:#000
style B2 fill:#fff3e0,stroke:#f57c00,stroke-width:3px,color:#000
style B3 fill:#fff3e0,stroke:#f57c00,stroke-width:3px,color:#000
style C fill:#f3e5f5,stroke:#7b1fa2,stroke-width:3px,color:#000
style D fill:#e8f5e9,stroke:#388e3c,stroke-width:3px,color:#000
style E fill:#fce4ec,stroke:#c2185b,stroke-width:3px,color:#000#### 分层职责
1. 技能工作流层 (SKILL.md 文件)
2. 共享确定性逻辑层 (_src/)
3. 平台爬虫实现层 (_src/crawlers/)
CrawlerDefinition + CrawlHandler4. 数据持久化层
#### 数据流转
URL 输入
│
├─→ Router (域名解析)
│
├─→ Registry (爬虫匹配)
│
├─→ Crawler (平台抓取)
│ │
│ ├─→ Fetcher (HTTP 请求)
│ ├─→ Parser (内容解析)
│ └─→ 生成 CrawlerProduct
│
├─→ Store (持久化)
│ │
│ ├─→ captures/{timestamp}.json
│ ├─→ feeds/{timestamp}.json
│ └─→ notes/{timestamp}.md
│
└─→ Handoff (传递给下游技能)
│
├─→ Feed Skill (可选格式化)
├─→ Synthesis Skill (AI 分析)
└─→ Display Skill (可视化展示)#### 扩展性设计
添加新爬虫
_src/crawlers/new_platform/ 创建模块CrawlerDefinition 和 CrawlHandlerregistry.py 中注册feed/_specs/添加新技能
SKILL.md 定义工作流_scripts/ 添加执行脚本_src/ 中的共享逻辑这种架构确保了:
| 平台 | 覆盖范围 | 备注 |
|---|---|---|
| 🇨🇳 知乎 | 问题、回答、文章、个人主页 | 逆向工程 API |
| 🐦 X/Twitter | 帖子、话题串 | 仅公开页面 |
| 📱 小红书 | 笔记、个人主页 | 公开内容 |
| 🇨🇳 微博 | 帖子 | 公开帖子 |
| 🔶 Hacker News | 讨论 | 完整评论树 |
| 话题串 | 公开话题串 | |
| 🌐 通用 HTML | 任何网页 | 后备爬虫 |
Tapestry 将内容组织成书籍式层次结构:
knowledge-base/
├── index.md # 根导航
├── topic-1/
│ ├── index.md # 主题概览
│ ├── chapter-1/
│ │ ├── index.md # 章节内容
│ │ └── artifacts/ # 支持文件
│ └── chapter-2/
└── topic-2/综合技能会自动:
index.md 文件以便导航从你的知识库生成可浏览的网站:
# 当你说"把我的知识库显示为网站"时,Claude 会为你运行:
python skills/tapestry/display/_scripts/publish_viewer.py
python -m http.server 8766 --directory knowledge-base/_viewer访问 http://localhost:8766 以浏览你的有组织内容,带有适当的导航和结构。
#### 什么是 Tapestry?
Tapestry 是一个为 Agent CLI 设计的技能包,用于从多个平台爬取网络内容并组织成结构化的知识库。它不是传统的库或工具,而是通过自然语言对话工作的 AI 原生工作流。
#### 我需要编程经验吗?
不需要。你只需要与 Agent 自然对话即可使用 Tapestry,具体调用 Skill 的方式不尽相同,但主流的 Agent 框架都支持显式指定 Skill 触发和自然语言隐式调用两种方式。
#### 会被平台封禁吗?
Tapestry 尊重平台的速率限制和 robots.txt。对于公开内容,风险很低。但请:
#### 数据存储在哪里?
所有数据都存储在你的本地文件系统中。Tapestry 本身不会将个人数据发送到任何外部服务器,但和 Agent 交互的数据会不可避免地发送给 API 提供商,如 OpenAI, Anthropic 等。
#### 如何备份我的知识库?
只需备份整个数据目录,即 _data/ 目录。
#### 如何添加新平台的爬虫?
参见下方的贡献指南。基本步骤:
_src/crawlers/ 创建新模块CrawlerDefinition 和 CrawlHandlerregistry.py 中注册#### 遇到问题怎么办?
公开仓库中的长期参考入口保留在本 README 与根目录文档中;docs/ 目录改为本地工作区使用,不再作为远程仓库内容发布。
本 README 中的核心章节
安装 - 详细的安装步骤与验证方式配置与合并频率 - 配置结构、合并模式与性能权衡工作流概览 - 日常使用路径与操作顺序架构设计 - 分层职责、数据流与扩展思路支持的来源 - 当前支持的内容平台常见问题 - 常见问题、故障定位与使用边界根目录文档
我们欢迎所有形式的贡献!无论是新功能、bug 修复、文档改进还是使用反馈,都能帮助 Tapestry 变得更好。
#### 贡献方式
1. 添加新平台爬虫 🕷️
_src/crawlers/ 下创建新的平台模块CrawlerDefinition 和 CrawlHandler 接口registry.py 中注册爬虫feed/_specs/2. 改进订阅源规范 📝
feed/_specs/ 中的源特定格式化规则_shared-standard.md 的一致性3. 增强可视化前端 🎨
display/_ui/ 中的查看器界面4. 完善知识库治理 📚
_kb_rules/ 中的组织规则5. 文档和示例 📖
#### 提交 Pull Request
在提交 PR 之前,请确保:
cd skills/tapestry/_tests
pytest<type>(<scope>): <subject>feat, fix, docs, style, refactor, test, chore feat(crawlers): add Bilibili video crawler
fix(zhihu): handle deleted answers gracefully
docs(readme): update installation instructions#### PR 模板
## 变更类型
- [ ] 新功能
- [ ] Bug 修复
- [ ] 文档更新
- [ ] 性能优化
- [ ] 代码重构
## 变更描述
<!-- 简要描述这个 PR 做了什么 -->
## 动机和背景
<!-- 为什么需要这个变更?解决了什么问题? -->
## 测试
<!-- 如何验证这个变更?提供测试步骤 -->
## 相关 Issue
<!-- 关联的 issue 编号,如 #123 -->
## 检查清单
- [ ] 代码遵循项目风格指南
- [ ] 添加了必要的测试
- [ ] 所有测试通过
- [ ] 更新了相关文档
- [ ] 提交信息清晰明确#### 开发环境设置
# 克隆仓库
git clone https://github.com/NatsuFox/Tapestry.git
cd Tapestry
# 安装依赖(如需要)
pip install -r requirements.txt # 如果有的话
# 运行测试
cd skills/tapestry/_tests
pytest -v
# 安装到 Agent 框架进行测试(使用符号链接便于开发)
ln -s "$(pwd)/skills/tapestry" ~/.claude/skills/tapestry#### 行为准则
#### 需要帮助?
good first issue 的问题适合新贡献者help wanted 的问题需要社区帮助本项目采用 MIT 许可证 - 详见 LICENSE 文件。
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.