sage-wiki-integrate
Pipeline skill that wires sage-wiki into an existing project — detects language, installs the client, runs a smoke test, and reports.
来源信息
- 仓库
- xoai/sage-wiki
- 最近来源活动
- 2026年8月1日 06:27
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 608
- 分支
- 100
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- sage-wiki-integrate
- description
- Pipeline skill that wires sage-wiki into an existing project — detects language, installs the client, runs a smoke test, and reports.
- version
- 0.1.0
- generated
- skillgen — do not hand-edit
# sage-wiki-integrate
Wires sage-wiki into an existing repository so the coding assistant can store and retrieve knowledge with provenance. Test-first — every step is verified before proceeding.
## Step 1: Detect language
Check the project root for language markers:
| Marker | Language | Integration path |
|--------|----------|-----------------|
| `pyproject.toml` | Python | `pip install sagewiki` (Python client, P4-3) |
| `package.json` | TypeScript / JavaScript | `npm install sagewiki` (TypeScript client, P4-4) |
| Neither | Any | MCP stdio config |
## Step 2: Choose integration path
### Python (`pyproject.toml` found)
```bash
pip install sagewiki
```
```python
from sagewiki import Client
client = Client(base_url="http://localhost:3333/v1")
# If token-protected:
# client = Client(base_url="http://localhost:3333/v1", token="s3cret")
```
### TypeScript (`package.json` found)
```bash
npm install sagewiki
```
```typescript
import { Client } from "sagewiki";
const client = new Client({ baseUrl: "http://localhost:3333/v1" });
// If token-protected:
// const client = new Client({ baseUrl: "http://localhost:3333/v1", token: "s3cret" });
```
### Neither (MCP stdio)
Add to the project's MCP config:
```json
{
"mcpServers": {
"sage-wiki": {
"command": "sage-wiki",
"args": ["serve", "--transport", "stdio", "--project", "."]
}
}
}
```
## Step 3: Write a smoke test
Store a fact, search for it, verify it comes back:
**Python smoke test:**
```python
# Store a fact via capture
resp = client.capture(content="smoke-test: sage-wiki integration works at {now}")
assert resp.status == "ok"
# Search for it
results = client.search(query="smoke-test sage-wiki integration")
assert len(results) > 0, "smoke test failed: no results for stored fact"
print("PASS: smoke test")
```
**TypeScript smoke test:**
```typescript
const resp = await client.capture({ content: "smoke-test: sage-wiki integration works" });
const results = await client.search({ query: "smoke-test sage-wiki integration" });
console.assert(results.length > 0, "smoke test failed");
console.log("PASS: smoke test");
```
**MCP smoke test** (call `wiki_capture` then `wiki_search` via your MCP client):
```
Tool: wiki_capture
Args: { content: "smoke-test: sage-wiki integration works at {timestamp}" }
Expected: confirmation text, no error
Tool: wiki_search
Args: { query: "smoke-test sage-wiki integration" }
Expected: at least one result, no error
```
## Step 4: Run the smoke test
Execute the chosen smoke test. If it fails:
- Check the server is running (`sage-wiki serve --ui`)
- Verify the token is correct (if auth is enabled)
- Check the server logs for errors
## Step 5: Report
After a successful smoke test, confirm:
- sage-wiki is connected and reachable
- The chosen integration path works
- Store → search → verify cycle completes
Then refer to the `sage-wiki` reference skill for the full tool catalog, error codes, and opt-in features.
> **Pre-1.0 notice:** Every surface here is experimental. Tool semantics, argument names, and REST routes may change between versions. Pin the version you depend on.
Generated by tools/skillgen — reference skill covers 19 tools.
在 GitHub 查看