新增wiki命令文件
This commit is contained in:
18
.claude/commands/wiki-graph.md
Normal file
18
.claude/commands/wiki-graph.md
Normal file
@@ -0,0 +1,18 @@
|
||||
Build the LLM Wiki knowledge graph.
|
||||
|
||||
Usage: /wiki-graph
|
||||
|
||||
First try running: python tools/build_graph.py --open
|
||||
|
||||
If that fails (missing dependencies), build the graph manually:
|
||||
|
||||
1. Use Grep to find all [[wikilinks]] across every file in wiki/
|
||||
2. Build a nodes list: one node per wiki page, with id=relative-path, label=title, type from frontmatter
|
||||
3. Build an edges list: one edge per [[wikilink]], tagged EXTRACTED
|
||||
4. Infer additional implicit relationships between pages not captured by wikilinks — tag these INFERRED with a confidence score (0.0–1.0); tag low-confidence ones AMBIGUOUS
|
||||
5. Write graph/graph.json with {nodes, edges, built: today}
|
||||
6. Write graph/graph.html as a self-contained vis.js page (nodes colored by type, edges colored by type, interactive, searchable)
|
||||
|
||||
After building, summarize: node count, edge count, breakdown by type, and the most connected nodes (hubs).
|
||||
|
||||
Append to wiki/log.md: ## [today's date] graph | Knowledge graph rebuilt
|
||||
18
.claude/commands/wiki-ingest.md
Normal file
18
.claude/commands/wiki-ingest.md
Normal file
@@ -0,0 +1,18 @@
|
||||
Ingest a source document into the LLM Wiki.
|
||||
|
||||
Usage: /wiki-ingest $ARGUMENTS
|
||||
|
||||
$ARGUMENTS should be the path to a file in raw/, e.g. `raw/articles/my-article.md`
|
||||
|
||||
Follow the Ingest Workflow defined in CLAUDE.md exactly:
|
||||
1. Read the source file at the given path
|
||||
2. Read wiki/index.md and wiki/overview.md for current context
|
||||
3. Write wiki/sources/<slug>.md (source page format per CLAUDE.md)
|
||||
4. Update wiki/index.md — add the new entry under Sources
|
||||
5. Update wiki/overview.md — revise synthesis if warranted
|
||||
6. Create/update entity pages (wiki/entities/) for key people, companies, projects
|
||||
7. Create/update concept pages (wiki/concepts/) for key ideas and frameworks
|
||||
8. Flag any contradictions with existing wiki content
|
||||
9. Append to wiki/log.md: ## [today's date] ingest | <Title>
|
||||
|
||||
After completing all writes, summarize: what was added, which pages were created or updated, and any contradictions found.
|
||||
19
.claude/commands/wiki-lint.md
Normal file
19
.claude/commands/wiki-lint.md
Normal file
@@ -0,0 +1,19 @@
|
||||
Health-check the LLM Wiki for issues.
|
||||
|
||||
Usage: /wiki-lint
|
||||
|
||||
Follow the Lint Workflow defined in CLAUDE.md:
|
||||
|
||||
Structural checks (use Grep and Glob tools):
|
||||
1. Orphan pages — wiki pages with no inbound [[wikilinks]] from other pages
|
||||
2. Broken links — [[WikiLinks]] pointing to pages that don't exist
|
||||
3. Missing entity pages — names referenced in 3+ pages but lacking their own page
|
||||
|
||||
Semantic checks (read and reason over page content):
|
||||
4. Contradictions — claims that conflict between pages
|
||||
5. Stale summaries — pages not updated after newer sources changed the picture
|
||||
6. Data gaps — important questions the wiki can't answer; suggest specific sources to find
|
||||
|
||||
Output a structured markdown lint report. At the end, ask if the user wants it saved to wiki/lint-report.md.
|
||||
|
||||
Append to wiki/log.md: ## [today's date] lint | Wiki health check
|
||||
14
.claude/commands/wiki-query.md
Normal file
14
.claude/commands/wiki-query.md
Normal file
@@ -0,0 +1,14 @@
|
||||
Query the LLM Wiki and synthesize an answer.
|
||||
|
||||
Usage: /wiki-query $ARGUMENTS
|
||||
|
||||
$ARGUMENTS is the question to answer, e.g. `What are the main themes across all sources?`
|
||||
|
||||
Follow the Query Workflow defined in CLAUDE.md:
|
||||
1. Read wiki/index.md to identify the most relevant pages
|
||||
2. Read those pages (up to ~10 most relevant)
|
||||
3. Synthesize a thorough markdown answer with [[PageName]] wikilink citations
|
||||
4. Include a ## Sources section at the end listing pages you drew from
|
||||
5. Ask the user if they want the answer saved as wiki/syntheses/<slug>.md
|
||||
|
||||
If the wiki is empty, say so and suggest running /wiki-ingest first.
|
||||
230
CLAUDE(ENGLISH).md
Normal file
230
CLAUDE(ENGLISH).md
Normal file
@@ -0,0 +1,230 @@
|
||||
# LLM Wiki Agent — Schema & Workflow Instructions
|
||||
|
||||
This wiki is maintained entirely by Claude Code. No API key or Python scripts needed — just open this repo in Claude Code and talk to it.
|
||||
|
||||
## Slash Commands (Claude Code)
|
||||
|
||||
| Command | What to say |
|
||||
|---|---|
|
||||
| `/wiki-ingest` | `ingest raw/my-article.md` |
|
||||
| `/wiki-query` | `query: what are the main themes?` |
|
||||
| `/wiki-lint` | `lint the wiki` |
|
||||
| `/wiki-graph` | `build the knowledge graph` |
|
||||
|
||||
Or just describe what you want in plain English:
|
||||
- *"Ingest this file: raw/papers/attention-is-all-you-need.md"*
|
||||
- *"What does the wiki say about transformer models?"*
|
||||
- *"Check the wiki for orphan pages and contradictions"*
|
||||
- *"Build the graph and show me what's connected to RAG"*
|
||||
|
||||
Claude Code reads this file automatically and follows the workflows below.
|
||||
|
||||
---
|
||||
|
||||
## Directory Layout
|
||||
|
||||
```
|
||||
raw/ # Immutable source documents — never modify these
|
||||
wiki/ # Claude owns this layer entirely
|
||||
index.md # Catalog of all pages — update on every ingest
|
||||
log.md # Append-only chronological record
|
||||
overview.md # Living synthesis across all sources
|
||||
sources/ # One summary page per source document
|
||||
entities/ # People, companies, projects, products
|
||||
concepts/ # Ideas, frameworks, methods, theories
|
||||
syntheses/ # Saved query answers
|
||||
graph/ # Auto-generated graph data
|
||||
tools/ # Optional standalone Python scripts (require ANTHROPIC_API_KEY)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Page Format
|
||||
|
||||
Every wiki page uses this frontmatter:
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: "Page Title"
|
||||
type: source | entity | concept | synthesis
|
||||
tags: []
|
||||
sources: [] # list of source slugs that inform this page
|
||||
last_updated: YYYY-MM-DD
|
||||
---
|
||||
```
|
||||
|
||||
Use `[[PageName]]` wikilinks to link to other wiki pages.
|
||||
|
||||
---
|
||||
|
||||
## Ingest Workflow
|
||||
|
||||
Triggered by: *"ingest <file>"* or `/wiki-ingest`
|
||||
|
||||
Steps (in order):
|
||||
1. Read the source document fully using the Read tool
|
||||
2. Read `wiki/index.md` and `wiki/overview.md` for current wiki context
|
||||
3. Write `wiki/sources/<slug>.md` — use the source page format below
|
||||
4. Update `wiki/index.md` — add entry under Sources section
|
||||
5. Update `wiki/overview.md` — revise synthesis if warranted
|
||||
6. Update/create entity pages for key people, companies, projects mentioned
|
||||
7. Update/create concept pages for key ideas and frameworks discussed
|
||||
8. Flag any contradictions with existing wiki content
|
||||
9. Append to `wiki/log.md`: `## [YYYY-MM-DD] ingest | <Title>`
|
||||
|
||||
### Source Page Format
|
||||
|
||||
```markdown
|
||||
---
|
||||
title: "Source Title"
|
||||
type: source
|
||||
tags: []
|
||||
date: YYYY-MM-DD
|
||||
source_file: raw/...
|
||||
---
|
||||
|
||||
## Summary
|
||||
2–4 sentence summary.
|
||||
|
||||
## Key Claims
|
||||
- Claim 1
|
||||
- Claim 2
|
||||
|
||||
## Key Quotes
|
||||
> "Quote here" — context
|
||||
|
||||
## Connections
|
||||
- [[EntityName]] — how they relate
|
||||
- [[ConceptName]] — how it connects
|
||||
|
||||
## Contradictions
|
||||
- Contradicts [[OtherPage]] on: ...
|
||||
```
|
||||
|
||||
### Domain-Specific Templates
|
||||
|
||||
If the source falls into a specific domain (e.g., personal diary, meeting notes), the agent should use a specialized template instead of the default generic one above:
|
||||
|
||||
#### Diary / Journal Template
|
||||
```markdown
|
||||
---
|
||||
title: "YYYY-MM-DD Diary"
|
||||
type: source
|
||||
tags: [diary]
|
||||
date: YYYY-MM-DD
|
||||
---
|
||||
## Event Summary
|
||||
...
|
||||
## Key Decisions
|
||||
...
|
||||
## Energy & Mood
|
||||
...
|
||||
## Connections
|
||||
...
|
||||
## Shifts & Contradictions
|
||||
...
|
||||
```
|
||||
|
||||
#### Meeting Notes Template
|
||||
```markdown
|
||||
---
|
||||
title: "Meeting Title"
|
||||
type: source
|
||||
tags: [meeting]
|
||||
date: YYYY-MM-DD
|
||||
---
|
||||
## Goal
|
||||
...
|
||||
## Key Discussions
|
||||
...
|
||||
## Decisions Made
|
||||
...
|
||||
## Action Items
|
||||
...
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Query Workflow
|
||||
|
||||
Triggered by: *"query: <question>"* or `/wiki-query`
|
||||
|
||||
Steps:
|
||||
1. Read `wiki/index.md` to identify relevant pages
|
||||
2. Read those pages with the Read tool
|
||||
3. Synthesize an answer with inline citations as `[[PageName]]` wikilinks
|
||||
4. Ask the user if they want the answer filed as `wiki/syntheses/<slug>.md`
|
||||
|
||||
---
|
||||
|
||||
## Lint Workflow
|
||||
|
||||
Triggered by: *"lint the wiki"* or `/wiki-lint`
|
||||
|
||||
Use Grep and Read tools to check for:
|
||||
- **Orphan pages** — wiki pages with no inbound `[[links]]` from other pages
|
||||
- **Broken links** — `[[WikiLinks]]` pointing to pages that don't exist
|
||||
- **Contradictions** — claims that conflict across pages
|
||||
- **Stale summaries** — pages not updated after newer sources
|
||||
- **Missing entity pages** — entities mentioned in 3+ pages but lacking their own page
|
||||
- **Data gaps** — questions the wiki can't answer; suggest new sources
|
||||
|
||||
Output a lint report and ask if the user wants it saved to `wiki/lint-report.md`.
|
||||
|
||||
---
|
||||
|
||||
## Graph Workflow
|
||||
|
||||
Triggered by: *"build the knowledge graph"* or `/wiki-graph`
|
||||
|
||||
When the user asks to build the graph, run `tools/build_graph.py` which:
|
||||
- Pass 1: Parses all `[[wikilinks]]` → deterministic `EXTRACTED` edges
|
||||
- Pass 2: Infers implicit relationships → `INFERRED` edges with confidence scores
|
||||
- Runs Louvain community detection
|
||||
- Outputs `graph/graph.json` + `graph/graph.html`
|
||||
|
||||
If the user doesn't have Python/dependencies set up, instead generate the graph data manually:
|
||||
1. Use Grep to find all `[[wikilinks]]` across wiki pages
|
||||
2. Build a node/edge list
|
||||
3. Write `graph/graph.json` directly
|
||||
4. Write `graph/graph.html` using the vis.js template
|
||||
|
||||
---
|
||||
|
||||
## Naming Conventions
|
||||
|
||||
- Source slugs: `kebab-case` matching source filename
|
||||
- Entity pages: `TitleCase.md` (e.g. `OpenAI.md`, `SamAltman.md`)
|
||||
- Concept pages: `TitleCase.md` (e.g. `ReinforcementLearning.md`, `RAG.md`)
|
||||
- Source pages: `kebab-case.md`
|
||||
|
||||
## Index Format
|
||||
|
||||
```markdown
|
||||
# Wiki Index
|
||||
|
||||
## Overview
|
||||
- [Overview](overview.md) — living synthesis
|
||||
|
||||
## Sources
|
||||
- [Source Title](sources/slug.md) — one-line summary
|
||||
|
||||
## Entities
|
||||
- [Entity Name](entities/EntityName.md) — one-line description
|
||||
|
||||
## Concepts
|
||||
- [Concept Name](concepts/ConceptName.md) — one-line description
|
||||
|
||||
## Syntheses
|
||||
- [Analysis Title](syntheses/slug.md) — what question it answers
|
||||
```
|
||||
|
||||
## Log Format
|
||||
|
||||
Each entry starts with `## [YYYY-MM-DD] <operation> | <title>` so it's grep-parseable:
|
||||
|
||||
```
|
||||
grep "^## \[" wiki/log.md | tail -10
|
||||
```
|
||||
|
||||
Operations: `ingest`, `query`, `lint`, `graph`
|
||||
340
CLAUDE.md
340
CLAUDE.md
@@ -1,78 +1,133 @@
|
||||
# LLM Wiki Agent — Schema & Workflow Instructions
|
||||
# LLM Wiki Agent — Schema & Workflow Instructions(中文版增强规范)
|
||||
|
||||
This wiki is maintained entirely by Claude Code. No API key or Python scripts needed — just open this repo in Claude Code and talk to it.
|
||||
本 Wiki 完全由 Claude Code 自动维护。无需 API Key 或 Python 脚本 —— 只需在 Claude Code 中打开本仓库并与其对话。
|
||||
|
||||
## Slash Commands (Claude Code)
|
||||
---
|
||||
# 🔴 全局强制规则(CRITICAL)
|
||||
|
||||
| Command | What to say |
|
||||
## 1. 输出语言(必须遵守)
|
||||
|
||||
- 所有输出必须使用**简体中文**
|
||||
- 专有名词允许保留英文,但首次出现必须附带中文解释
|
||||
- 禁止中英混合句(术语除外)
|
||||
- 不允许输出纯英文总结或分析
|
||||
|
||||
示例:
|
||||
|
||||
Transformer(变压器模型,一种基于注意力机制的神经网络架构)
|
||||
|
||||
---
|
||||
|
||||
## 2. 输出风格(严格限制)
|
||||
|
||||
所有输出必须:
|
||||
|
||||
- 去修辞(禁止 narrative 风格)
|
||||
- 去模糊(禁止“可能”“大概”等词)
|
||||
- 信息密度最大化
|
||||
- 面向“知识结构化”,而非阅读体验
|
||||
|
||||
优先级:
|
||||
|
||||
结构 > 关系 > 结论 > 描述
|
||||
|
||||
---
|
||||
|
||||
## 3. 结构化语义(必须)
|
||||
|
||||
所有页面必须遵循结构化语义规则:
|
||||
|
||||
- Summary 必须使用固定字段
|
||||
- Claim 必须符合标准语法
|
||||
- Connections 必须使用关系类型
|
||||
- 禁止自由发挥
|
||||
|
||||
---
|
||||
|
||||
# Slash Commands(Claude Code)
|
||||
|
||||
| Command | 使用方式 |
|
||||
|---|---|
|
||||
| `/wiki-ingest` | `ingest raw/my-article.md` |
|
||||
| `/wiki-query` | `query: what are the main themes?` |
|
||||
| `/wiki-ingest` | `ingest raw/your-file.md` |
|
||||
| `/wiki-query` | `query: 你的问题` |
|
||||
| `/wiki-lint` | `lint the wiki` |
|
||||
| `/wiki-graph` | `build the knowledge graph` |
|
||||
|
||||
Or just describe what you want in plain English:
|
||||
- *"Ingest this file: raw/papers/attention-is-all-you-need.md"*
|
||||
- *"What does the wiki say about transformer models?"*
|
||||
- *"Check the wiki for orphan pages and contradictions"*
|
||||
- *"Build the graph and show me what's connected to RAG"*
|
||||
---
|
||||
|
||||
## 自然语言示例
|
||||
|
||||
- ingest raw/papers/attention-is-all-you-need.md
|
||||
- query: Transformer 的核心机制是什么?
|
||||
- lint the wiki
|
||||
- build the graph and analyze RAG
|
||||
|
||||
Claude Code 会自动读取本文件并执行以下工作流。
|
||||
|
||||
|
||||
Claude Code reads this file automatically and follows the workflows below.
|
||||
|
||||
---
|
||||
|
||||
## Directory Layout
|
||||
# Directory Layout(目录结构)
|
||||
|
||||
```
|
||||
raw/ # Immutable source documents — never modify these
|
||||
wiki/ # Claude owns this layer entirely
|
||||
index.md # Catalog of all pages — update on every ingest
|
||||
log.md # Append-only chronological record
|
||||
overview.md # Living synthesis across all sources
|
||||
sources/ # One summary page per source document
|
||||
entities/ # People, companies, projects, products
|
||||
concepts/ # Ideas, frameworks, methods, theories
|
||||
syntheses/ # Saved query answers
|
||||
graph/ # Auto-generated graph data
|
||||
tools/ # Optional standalone Python scripts (require ANTHROPIC_API_KEY)
|
||||
```
|
||||
raw/ # 原始文档(不可修改)
|
||||
wiki/ # 知识层(由 Claude 完全维护)
|
||||
index.md # 页面索引(每次 ingest 必须更新)
|
||||
log.md # 追加式日志
|
||||
overview.md # 全局知识总结
|
||||
sources/ # 每个原始文档对应一个页面
|
||||
entities/ # 实体(人/公司/产品/项目)
|
||||
concepts/ # 概念(方法/理论/框架)
|
||||
syntheses/ # 查询结果沉淀
|
||||
graph/ # 自动生成的图数据
|
||||
tools/ # 可选 Python 工具 (require ANTHROPIC_API_KEY)
|
||||
````
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Page Format
|
||||
# Page Format(页面格式)
|
||||
|
||||
Every wiki page uses this frontmatter:
|
||||
每个页面必须包含:
|
||||
|
||||
```yaml
|
||||
---
|
||||
id: unique_id
|
||||
title: "Page Title"
|
||||
type: source | entity | concept | synthesis
|
||||
tags: []
|
||||
sources: [] # list of source slugs that inform this page
|
||||
sources: [] # 来源
|
||||
last_updated: YYYY-MM-DD
|
||||
---
|
||||
```
|
||||
````
|
||||
|
||||
Use `[[PageName]]` wikilinks to link to other wiki pages.
|
||||
必须使用 `[[PageName]]` 进行链接。
|
||||
|
||||
---
|
||||
|
||||
## Ingest Workflow
|
||||
# Ingest Workflow(摄取流程)
|
||||
|
||||
Triggered by: *"ingest <file>"* or `/wiki-ingest`
|
||||
触发方式:
|
||||
- `/wiki-ingest`
|
||||
- 或:`ingest <file>`
|
||||
|
||||
Steps (in order):
|
||||
1. Read the source document fully using the Read tool
|
||||
2. Read `wiki/index.md` and `wiki/overview.md` for current wiki context
|
||||
3. Write `wiki/sources/<slug>.md` — use the source page format below
|
||||
4. Update `wiki/index.md` — add entry under Sources section
|
||||
5. Update `wiki/overview.md` — revise synthesis if warranted
|
||||
6. Update/create entity pages for key people, companies, projects mentioned
|
||||
7. Update/create concept pages for key ideas and frameworks discussed
|
||||
8. Flag any contradictions with existing wiki content
|
||||
9. Append to `wiki/log.md`: `## [YYYY-MM-DD] ingest | <Title>`
|
||||
---
|
||||
|
||||
### Source Page Format
|
||||
## 执行步骤(严格顺序)
|
||||
1. 使用 Read 工具完整读取 source 文档
|
||||
2. 读取 `wiki/index.md` 和 `wiki/overview.md`
|
||||
3. 生成 `wiki/sources/<slug>.md`
|
||||
4. 更新 `wiki/index.md`
|
||||
5. 更新 `wiki/overview.md`(如有必要)
|
||||
6. 创建或更新 Entity 页面
|
||||
7. 创建或更新 Concept 页面
|
||||
8. 检测并记录冲突
|
||||
9. 追加 `wiki/log.md`
|
||||
|
||||
---
|
||||
|
||||
# Source Page Format(增强结构)
|
||||
|
||||
```markdown
|
||||
---
|
||||
@@ -84,28 +139,40 @@ source_file: raw/...
|
||||
---
|
||||
|
||||
## Summary
|
||||
2–4 sentence summary.
|
||||
- 核心主题:
|
||||
- 问题域:
|
||||
- 方法/机制:
|
||||
- 结论/价值:
|
||||
|
||||
## Key Claims
|
||||
- Claim 1
|
||||
- Claim 2
|
||||
- (必须符合:主体 + 机制 + 结果)
|
||||
|
||||
## Key Quotes
|
||||
> "Quote here" — context
|
||||
> "引用内容" — 上下文说明
|
||||
|
||||
## Key Concepts
|
||||
- [[ConceptName]]:定义
|
||||
|
||||
## Key Entities
|
||||
- [[EntityName]]:角色说明
|
||||
|
||||
## Connections
|
||||
- [[EntityName]] — how they relate
|
||||
- [[ConceptName]] — how it connects
|
||||
- [[A]] ← depends_on ← [[B]]
|
||||
- [[C]] ← extends ← [[D]]
|
||||
|
||||
## Contradictions
|
||||
- Contradicts [[OtherPage]] on: ...
|
||||
- 与 [[OtherPage]] 冲突:
|
||||
- 冲突点:
|
||||
- 当前观点:
|
||||
- 对方观点:
|
||||
```
|
||||
|
||||
### Domain-Specific Templates
|
||||
---
|
||||
|
||||
If the source falls into a specific domain (e.g., personal diary, meeting notes), the agent should use a specialized template instead of the default generic one above:
|
||||
# Domain-Specific Templates(领域模板)
|
||||
|
||||
## Diary / Journal
|
||||
|
||||
#### Diary / Journal Template
|
||||
```markdown
|
||||
---
|
||||
title: "YYYY-MM-DD Diary"
|
||||
@@ -114,18 +181,16 @@ tags: [diary]
|
||||
date: YYYY-MM-DD
|
||||
---
|
||||
## Event Summary
|
||||
...
|
||||
## Key Decisions
|
||||
...
|
||||
## Energy & Mood
|
||||
...
|
||||
## Connections
|
||||
...
|
||||
## Shifts & Contradictions
|
||||
...
|
||||
```
|
||||
|
||||
#### Meeting Notes Template
|
||||
---
|
||||
|
||||
## Meeting Notes
|
||||
|
||||
```markdown
|
||||
---
|
||||
title: "Meeting Title"
|
||||
@@ -134,97 +199,152 @@ tags: [meeting]
|
||||
date: YYYY-MM-DD
|
||||
---
|
||||
## Goal
|
||||
...
|
||||
## Key Discussions
|
||||
...
|
||||
## Decisions Made
|
||||
...
|
||||
## Action Items
|
||||
...
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Query Workflow
|
||||
# Entity & Concept Rules(关键增强)
|
||||
|
||||
Triggered by: *"query: <question>"* or `/wiki-query`
|
||||
## Entity(实体)
|
||||
|
||||
Steps:
|
||||
1. Read `wiki/index.md` to identify relevant pages
|
||||
2. Read those pages with the Read tool
|
||||
3. Synthesize an answer with inline citations as `[[PageName]]` wikilinks
|
||||
4. Ask the user if they want the answer filed as `wiki/syntheses/<slug>.md`
|
||||
创建条件:
|
||||
- 出现 ≥ 2 次
|
||||
或
|
||||
- 对主题有关键影响
|
||||
|
||||
类型:
|
||||
- 人 / 公司 / 产品 / 项目
|
||||
|
||||
---
|
||||
|
||||
## Lint Workflow
|
||||
## Concept(概念)
|
||||
创建条件:
|
||||
- 可抽象
|
||||
- 可复用
|
||||
- 非具体实例
|
||||
---
|
||||
|
||||
Triggered by: *"lint the wiki"* or `/wiki-lint`
|
||||
## 命名规范(强制)
|
||||
- 使用唯一标准名称
|
||||
- 所有别名写入页面:
|
||||
|
||||
Use Grep and Read tools to check for:
|
||||
- **Orphan pages** — wiki pages with no inbound `[[links]]` from other pages
|
||||
- **Broken links** — `[[WikiLinks]]` pointing to pages that don't exist
|
||||
- **Contradictions** — claims that conflict across pages
|
||||
- **Stale summaries** — pages not updated after newer sources
|
||||
- **Missing entity pages** — entities mentioned in 3+ pages but lacking their own page
|
||||
- **Data gaps** — questions the wiki can't answer; suggest new sources
|
||||
|
||||
Output a lint report and ask if the user wants it saved to `wiki/lint-report.md`.
|
||||
```markdown
|
||||
## Aliases
|
||||
- GPT4
|
||||
- GPT-4
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Graph Workflow
|
||||
## 去重机制(必须)
|
||||
|
||||
Triggered by: *"build the knowledge graph"* or `/wiki-graph`
|
||||
|
||||
When the user asks to build the graph, run `tools/build_graph.py` which:
|
||||
- Pass 1: Parses all `[[wikilinks]]` → deterministic `EXTRACTED` edges
|
||||
- Pass 2: Infers implicit relationships → `INFERRED` edges with confidence scores
|
||||
- Runs Louvain community detection
|
||||
- Outputs `graph/graph.json` + `graph/graph.html`
|
||||
|
||||
If the user doesn't have Python/dependencies set up, instead generate the graph data manually:
|
||||
1. Use Grep to find all `[[wikilinks]]` across wiki pages
|
||||
2. Build a node/edge list
|
||||
3. Write `graph/graph.json` directly
|
||||
4. Write `graph/graph.html` using the vis.js template
|
||||
创建前必须:
|
||||
1. 搜索 index
|
||||
2. 判断是否存在
|
||||
3. 存在则更新
|
||||
|
||||
---
|
||||
|
||||
## Naming Conventions
|
||||
# Query Workflow(查询流程)
|
||||
|
||||
- Source slugs: `kebab-case` matching source filename
|
||||
- Entity pages: `TitleCase.md` (e.g. `OpenAI.md`, `SamAltman.md`)
|
||||
- Concept pages: `TitleCase.md` (e.g. `ReinforcementLearning.md`, `RAG.md`)
|
||||
- Source pages: `kebab-case.md`
|
||||
触发:
|
||||
- `/wiki-query`
|
||||
- 或:`query: 问题`
|
||||
|
||||
## Index Format
|
||||
---
|
||||
|
||||
## 步骤
|
||||
|
||||
1. 读取 index
|
||||
2. 找到相关页面
|
||||
3. 使用 Read 工具加载
|
||||
4. 输出结构化答案
|
||||
5. 使用 `[[Page]]` 引用
|
||||
6. 询问是否保存为 synthesis
|
||||
|
||||
---
|
||||
|
||||
# Lint Workflow(校验)
|
||||
|
||||
检查内容:
|
||||
|
||||
- 孤立页面
|
||||
- 断链
|
||||
- 冲突
|
||||
- 过期内容
|
||||
- 缺失实体
|
||||
- 知识空白
|
||||
|
||||
---
|
||||
|
||||
# Graph Workflow(知识图谱)
|
||||
|
||||
触发:
|
||||
- `/wiki-graph`
|
||||
|
||||
---
|
||||
|
||||
执行:
|
||||
- 优先运行 `tools/build_graph.py`
|
||||
- 否则手动构建:
|
||||
|
||||
步骤:
|
||||
1. 提取所有 `[[links]]`
|
||||
2. 构建节点与边
|
||||
3. 输出 `graph.json`
|
||||
|
||||
---
|
||||
|
||||
# Naming Conventions(命名规范)
|
||||
- Source:kebab-case
|
||||
- Entity:TitleCase
|
||||
- Concept:TitleCase
|
||||
|
||||
---
|
||||
|
||||
# Index Format(索引结构)
|
||||
|
||||
```markdown
|
||||
# Wiki Index
|
||||
|
||||
## Overview
|
||||
- [Overview](overview.md) — living synthesis
|
||||
- [Overview](overview.md)
|
||||
|
||||
## Sources
|
||||
- [Source Title](sources/slug.md) — one-line summary
|
||||
- [Title](sources/slug.md)
|
||||
|
||||
## Entities
|
||||
- [Entity Name](entities/EntityName.md) — one-line description
|
||||
- [Entity](entities/Entity.md)
|
||||
|
||||
## Concepts
|
||||
- [Concept Name](concepts/ConceptName.md) — one-line description
|
||||
- [Concept](concepts/Concept.md)
|
||||
|
||||
## Syntheses
|
||||
- [Analysis Title](syntheses/slug.md) — what question it answers
|
||||
- [Title](syntheses/slug.md)
|
||||
```
|
||||
|
||||
## Log Format
|
||||
---
|
||||
|
||||
Each entry starts with `## [YYYY-MM-DD] <operation> | <title>` so it's grep-parseable:
|
||||
# Log Format(日志)
|
||||
|
||||
```
|
||||
grep "^## \[" wiki/log.md | tail -10
|
||||
## [YYYY-MM-DD] ingest | 标题
|
||||
```
|
||||
|
||||
Operations: `ingest`, `query`, `lint`, `graph`
|
||||
---
|
||||
|
||||
# ✅ 最终目标
|
||||
|
||||
该系统用于:
|
||||
|
||||
- 知识沉淀
|
||||
- 结构化理解
|
||||
- 自动图谱构建
|
||||
- Agent 推理支持
|
||||
|
||||
---
|
||||
|
||||
# END
|
||||
@@ -1,227 +0,0 @@
|
||||
---
|
||||
title: 公众号爆款文章制造机:这套 Skill 工具,是我送给你最硬核的赚钱外挂!
|
||||
source:
|
||||
author: shenwei
|
||||
published:
|
||||
created:
|
||||
description:
|
||||
tags: []
|
||||
---
|
||||
|
||||
# 公众号爆款文章制造机:这套 Skill 工具,是我送给你最硬核的赚钱外挂!
|
||||
|
||||
> 来源: X (Twitter) @冰河
|
||||
> 发布时间: 2026年3月12日 23:30
|
||||
> 原文链接: https://x.com/binghe/status/2032116993378435433
|
||||
|
||||
---
|
||||
|
||||
容我先吹吹牛逼!公众号内容创业这条路,我们走了五年了,矩阵运营了多个帐号,有了些小小的成绩,下面的内容全是多年精华经验浓缩!
|
||||
|
||||
文章长,内容干!如果你看不下去,那就帮我点点赞吧!感谢!
|
||||
|
||||
> 注:本篇文章 Skill 已经发布在"钱来有道"社群,欢迎加入,全年免费更新,众多赚钱类教程任意阅读!性感的我会一对一服务!机会难得,广告结束! 哦对了!本 Skill 也会发布在订阅区!欢迎订阅!
|
||||
|
||||
---
|
||||
|
||||
公众号赛道,一直都是我认为最低成本,最容易得到正反馈的选择。
|
||||
|
||||
只要你会写作,或者"不那么"会写,都能取得成绩。
|
||||
|
||||
还记得以前我写过一篇文章:手把手教你如何用AI写爆款文章,轻松日赚到2000块!
|
||||
|
||||
很多人通过这篇文章认识了我,加入了社群!
|
||||
|
||||
一年过去了,公众号赛道的文章类型和平台政策已经大变样了,我决定在一年后重新把以前的经验整理成 Skill,给大家一个新的选择。
|
||||
|
||||
好,确定了写公众号这个低成本创收的赛道,那你平时在写作的时候会经常遇到以下几个问题:
|
||||
|
||||
(配图)
|
||||
|
||||
这些问题,几乎每个做公众号的人都经历过。
|
||||
|
||||
今天这个 Skill 我需要它扮演的角色不是个写稿机器 ,而应该是一个会思考的编辑!
|
||||
|
||||
市面上的 AI 写作工具,大多数只能做一件事:你说写什么,它就写什么。
|
||||
|
||||
但写公众号爆款,从来不是「有文字输出」就够了。
|
||||
|
||||
你需要有人帮你判断选题够不够刁钻,需要有人帮你想清楚这件事从哪个角度切进去文字最有力量,需要有人在你想法还模糊的时候,把它描绘清晰——而不是催你「请提供更多信息」。
|
||||
|
||||
这就是这个 Skill 要做的事!
|
||||
|
||||
---
|
||||
|
||||
## 实操来讲解这个 Skill 它帮你解决了哪些真实的痛点?
|
||||
|
||||
### 第一步
|
||||
|
||||
先把 Skill 文件放到全局目录中的"skills "里,然后在其它地方新建目录,在当前目录下打开 Claude Code
|
||||
|
||||
让它调用 Skill ,开始写作流程:
|
||||
|
||||
(配图)
|
||||
|
||||
可以看到,skill 没有开始就准备写,而是帮你写之前整理写作逻辑,结构,和切入角度入手!
|
||||
|
||||
比如我直接说:我想写关于娱乐八卦
|
||||
|
||||
它调用的就是娱乐类文章写法的 skill设定内容!
|
||||
|
||||
但其实这个 Skill有好多写作种类的设定:
|
||||
|
||||
(配图)
|
||||
|
||||
不管你选择哪个场景,都会有相对应的 Skill 进行规则设定,让你写的内容更符合当前分类爆款内容结构。
|
||||
|
||||
我们下面是拿娱乐八卦来做一下演示。
|
||||
|
||||
(配图)
|
||||
|
||||
请仔细看看这种分类下的文章结构,这是我拆解了近百篇娱乐类公众号文章提炼的写作精华内容。
|
||||
|
||||
下面你可以根据提示,完成下一步具体的写作要求。
|
||||
|
||||
比如某个娱乐事件,这就是要求输入主题内容了。
|
||||
|
||||
> 一般情况,我强烈建议你多上传一些关于这个主题内容的其它不同类文章,语料越多,写出来的内容越丰富,AI 也会综合判断什么样的内容结构排列组合会更有针对性。这样就从根上避免了抄袭!因为这已经是一篇综合多方信息源的原创文章了。
|
||||
|
||||
案例操作,简单点!我让他查了查薛之谦最近的娱乐新闻,准备写关于他的内容。
|
||||
|
||||
(配图)
|
||||
|
||||
同一个热点,一百个人在写!
|
||||
|
||||
大多数人写的角度都差不多,读者看了开头就知道后面是什么。
|
||||
|
||||
这个 Skill 有一个专门的 `~选题` 功能。
|
||||
|
||||
你给它一个方向,它帮你找那个「别人没想到,但你一说出来就觉得绝」的切入角度。
|
||||
|
||||
每个角度它都会告诉你爆点在哪里、为什么这个方向有传播潜力,让你在动笔前就心里有数。
|
||||
|
||||
(配图)
|
||||
|
||||
可以看到,它其实给了我很多个选题(一共五个),每个选题的文章方向、爆点在哪里全部进行了规划!
|
||||
|
||||
你从这些规划中参考一下,是否有一些是别人没讲过的,或者是几个选题排列组合一下成为一个新的内容结构,都是可以的,要学会活学活用!
|
||||
|
||||
(配图)
|
||||
|
||||
我随便先了"角度五",到这里这个 Skill 也没有开始写!这很关键!
|
||||
|
||||
我们要先看大纲,每部分的内容规划如何?最后的总字数是否满足你的要求?
|
||||
|
||||
核心观点是否寓意突出?
|
||||
|
||||
在做了综合判断后,再开始写正文!
|
||||
|
||||
(配图)
|
||||
|
||||
注意:这里如果你不满意都可随时调整,我把文章字数设定了与写作分类相关,并不是越多越好!但字数少,也不能表现出文章深度!
|
||||
|
||||
输入写正文后,产出内容,并同时保存在当前项目目录里!
|
||||
|
||||
这里我要说明几个事情:
|
||||
|
||||
1. 如果你使用的模型是国产的话,文章内容非常 AI 化,格式化(喜欢用:第一,第二,不是而是!)一定要手动润色!Claude 的opus 模型就没有这个问题。所以要注意!
|
||||
|
||||
2. 内容结构完全是依照娱乐类文章的写作模式在编写。调动情绪,引导评论,制造互动性,如下图结尾部分:
|
||||
|
||||
(配图)
|
||||
|
||||
3. 所有内容为.md 格式,你可以上网找一些转成公众号的编辑器,直接粘贴进去,就成了公众号文章内容了。我们以前有过分享!
|
||||
|
||||
4. 要审稿,别直接发布!每次产出的内容必审稿,AI 不是万能的,你要去对内容中的情绪、事件完整性、数据准确度进行审核,别闹出笑话!
|
||||
|
||||
(配图)
|
||||
|
||||
以前是先有标题,后有内容,但这次我把这个顺序改了一下,先有内容后产标题!
|
||||
|
||||
这样标题的生成就会更有针对性,我们可以输入"~标题",它会调用 Skill 中的标题公式,进行有目的性的产出 10 条备选标题内容!
|
||||
|
||||
以 AI 的角度提供3 条选择,当然最终选择权在你这里,如果不满意继续让它产出!
|
||||
|
||||
我个人认为这些标题还是非常有"娱乐性"的,他不是标题党,而是情绪先行!
|
||||
|
||||
(配图)
|
||||
|
||||
选择完标题,自动加入到文章中,然后就到了精细打磨阶段了!
|
||||
|
||||
其中有两个指令非常重要就是:"~改稿","~精写"
|
||||
|
||||
其实就是哪里不对改哪里,你只需要复制某个段落,或者是某部分内容,然后再加上指令,就可指哪打哪儿!也可以直接改语气,反正只要是修改,使用这两个命令就完了!
|
||||
|
||||
这样修改出来的内容是会根据上下文进行改写,不会偏离主题!而不需要全部重写,提升效率!
|
||||
|
||||
这里就不做演示了!
|
||||
|
||||
最后写完,我们也要分析一下文章到底写的怎么样?所谓当局者迷!
|
||||
|
||||
那好,输入指令"~分析"
|
||||
|
||||
(配图)
|
||||
|
||||
(配图)
|
||||
|
||||
分析报告非常详细,到时你自己看吧!如果你觉得它说的有道理,那好就让他继续修改!
|
||||
|
||||
如果没有问题就可以继续产出了。
|
||||
|
||||
可以看出来,在写之前,我们一直做的是陪伴编辑的角色,这就是这个 Skill 的意义,知其然,也要知其所以然!
|
||||
|
||||
不然,你只是个使用工具无情的机器!
|
||||
|
||||
(配图)
|
||||
|
||||
这就结束了吗?
|
||||
|
||||
不,当然没有!
|
||||
|
||||
这套 Skill 还有个非常牛的设定:不管你写的是什么内容类型,除了大类规则套用,还可以跨类型通用规则适配!
|
||||
|
||||
(配图)
|
||||
|
||||
我把常见的通用类型也在规则在做了设计,不管是常见的不常见的,只要写好通用规则,自动启动爆款格式,进行有人味,有立场,有冲突,有情绪,有互动的文章写作逻辑!
|
||||
|
||||
当你想用自己的风格写作,当然也可以!
|
||||
|
||||
我们在指令中还加入了一个"~风格" 指令,输入这个指令的时候,给你四种选择:
|
||||
|
||||
(配图)
|
||||
|
||||
A. 查看当前已经写好的文章风格,以后沿用(前提是你喜欢这个笔风)
|
||||
|
||||
B. 直接告诉 AI 你就要什么风格,因为你也没想好。
|
||||
|
||||
C. 上传你的参考文章,他会提炼风格特征进行模仿,产出属于你自己味道的内容。(上传文件最好是.md 格式,多传一些也没问题。)
|
||||
|
||||
D. 保持现状
|
||||
|
||||
是不是感觉这套 Skill 有点意思了?
|
||||
|
||||
哈哈哈,越灵活的操作越可以发挥它的最大功效!我们不能把自己的思维固住!
|
||||
|
||||
可能这么多指令你记不住 ,没关系!
|
||||
|
||||
只要输入"~指令",就会把所有指令都做一展示,还有指令功能进行说明。我是不是很贴心?
|
||||
|
||||
(配图)
|
||||
|
||||
好了,这个 Skill 其实并不复杂,只是里面的写作规则记录的比较丰富!
|
||||
|
||||
我们在面对任何写作领域的时候,不管是公众号,推特,头条其它写文章的平台都可以适用!
|
||||
|
||||
但好的文章要有温度,有共情,有特别的切入角度,并且能引起讨论,这才是一篇合格的文章!
|
||||
|
||||
内容的深度,关键在于你提代的语料是否足够,还与你对信息获取的能力息息相关!
|
||||
|
||||
---
|
||||
|
||||
> 爱技术,爱赚钱,爱分享!
|
||||
> 分享 赚钱项目 |打破信息壁垒 |副业避坑
|
||||
> 能拆解的赚钱项目才有意义
|
||||
> 知识星球社群/公众号:"钱来有道"
|
||||
> 小宇宙 |Podcasts |QQ音乐 播客 "钱来有道"
|
||||
> 搞钱训练营
|
||||
> qianlai.flowus.cn
|
||||
@@ -1,34 +0,0 @@
|
||||
---
|
||||
title: 夸克资源
|
||||
source:
|
||||
author: shenwei
|
||||
published:
|
||||
created:
|
||||
description:
|
||||
tags: []
|
||||
---
|
||||
|
||||
# 夸克资源
|
||||
|
||||
> 来源: https://t.me/quarkF/311117
|
||||
> 添加时间: 2026-04-04
|
||||
|
||||
## 资源链接
|
||||
https://t.me/quarkF/311117
|
||||
|
||||
## 频道信息
|
||||
- **频道名**:付费资源分享
|
||||
- **频道ID**:@quarkF
|
||||
- **链接**:https://t.me/quarkF/311117
|
||||
|
||||
## 频道简介
|
||||
分享一些我购买的付费课程!
|
||||
防失联付费资源共享群 @zhishisou
|
||||
免费加入内部群,所有付费资源免费共享!
|
||||
网络上能看到的,只是冰山一角。
|
||||
想解锁更真实、更硬核的内容?来群里搜搜看,也许能发现不一样的世界。
|
||||
|
||||
@tangxingvlog 可以搜索全网任何资源
|
||||
|
||||
## 内容状态
|
||||
⚠️ 频道内容需登录 Telegram 才能查看完整详情,公开链接仅显示频道简介和封面图
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user