<< All versions
Skill v1.0.0
currentAutomated scan100/100zzyong24/thirdspace-vault-template/thirdspace-vault
──Details
PublishedOctober 26, 2026 at 02:15 PM
Content Hashsha256:663e46b215ba04d7...
Git SHAcb49b8771506
──Files
Files (1 file, 6.6 KB)
SKILL.md6.6 KBactive
SKILL.md · 129 lines · 6.6 KB
version: "1.0.0" name: thirdspace-vault description: >- 激活词:知识库。任何时候用户说"知识库"、"存进知识库"、"记到知识库"、"查知识库"、"整理知识库", 或涉及 ThirdSpace vault 的操作(创建笔记、归类文件、工作区路由、Frontmatter 规范、审计结构), 立即加载本 Skill。从任意目录工作,无需用户手动指定路径。 Activation: any mention of "知识库", "ThirdSpace", "vault", or knowledge-base operations. triggers:
- "知识库"
- "存进知识库"
- "记到知识库"
- "查知识库"
- "整理知识库"
- "知识库里"
- "维护知识库"
- "初始化知识库"
- "当前工作区"
- "ThirdSpace"
- "vault"
ThirdSpace Vault Root Skill
Agent-native Contract
用户不需要手动执行命令。Agent 触发本 Skill 后,应该直接调用 scripts/thirdspace-vault.mjs 完成检测、初始化、创建文件、更新 Frontmatter 和审计。
渐进式加载
- 用
resolve-vault --cwd "$PWD"定位 vault。 - 读取
{VAULT}/.thirdspace/workspace-index.yaml。 - 读取
{VAULT}/.thirdspace/schema/taxonomy.yaml。 - 读取
{VAULT}/.thirdspace/schema/subsystems.yaml。 - 读取
{VAULT}/.thirdspace/schema/event-capture.yaml。 - 读取
{VAULT}/.thirdspace/schema/workspace-tools.yaml。 - 先根据用户意图匹配工作区、允许的一层目录、自治子系统契约、事件采集策略和工具 Skill;如果当前
pwd在 vault 内,再用pwd校准。 - 读取
<workspace>/WORKSPACE.md。 - 加载 workspace 对应子 Skill。
- 只有意图命中时加载领域 Skill,例如
lifeos、worklog、article。 - 执行文件创建、更新、标签、Frontmatter、流转、审计、修复和高价值事件记录。
Script Interface
bash
node {SKILLS}/thirdspace-vault/scripts/thirdspace-vault.mjs resolve-vault --cwd "$PWD"node {SKILLS}/thirdspace-vault/scripts/thirdspace-vault.mjs detect --vault {VAULT} --cwd "$PWD"node {SKILLS}/thirdspace-vault/scripts/thirdspace-vault.mjs init --vault /path/to/new-vaultnode {SKILLS}/thirdspace-vault/scripts/thirdspace-vault.mjs init --vault /path/to/new-vault --install-runtimenode {SKILLS}/thirdspace-vault/scripts/thirdspace-vault.mjs route-create --cwd "$PWD" --intent "写一篇开发文档" --title "项目部署流程"node {SKILLS}/thirdspace-vault/scripts/thirdspace-vault.mjs migrate-flux-intake --vault {VAULT} --dry-runnode {SKILLS}/thirdspace-vault/scripts/thirdspace-vault.mjs create --vault {VAULT} --workspace 03-知识 --subdir AI工程 --title "Agent工作流" --topic ai --type notenode {SKILLS}/thirdspace-vault/scripts/thirdspace-vault.mjs ensure-worklognode {SKILLS}/thirdspace-vault/scripts/thirdspace-vault.mjs record-agent-event --cwd "$PWD" --summary "完成重要产出" --decision "采用当前方案" --reason "更符合知识库自治目标"node {SKILLS}/thirdspace-vault/scripts/thirdspace-vault.mjs register-hooks --repo "$PWD"node {SKILLS}/thirdspace-vault/scripts/thirdspace-vault.mjs ensure-runtime-assets --vault {VAULT}node {SKILLS}/thirdspace-vault/scripts/thirdspace-vault.mjs install-runtime --vault {VAULT} --allnode {SKILLS}/thirdspace-vault/scripts/thirdspace-vault.mjs update-frontmatter --file /path/to/file.md --topic ai --type notenode {SKILLS}/thirdspace-vault/scripts/thirdspace-vault.mjs audit-system --vault {VAULT}node {SKILLS}/thirdspace-vault/scripts/thirdspace-vault.mjs audit-projects --vault {VAULT} --write-reportnode {SKILLS}/thirdspace-vault/scripts/thirdspace-vault.mjs audit-workspaces --vault {VAULT} --write-reportnode {SKILLS}/thirdspace-vault/scripts/thirdspace-vault.mjs audit-subsystems --vault {VAULT} --write-reportnode {SKILLS}/thirdspace-vault/scripts/thirdspace-vault.mjs audit-skill-locations --vault {VAULT} --write-report
Create File Policy
- Agent 必须优先用
create创建新 Markdown。 - 当前工作区可由
detect推断;不确定时写入01-收件箱/待整理。 create会自动生成YYYYMMDD_主题.md和标准 Frontmatter。- 更新旧文件 Frontmatter 时用
update-frontmatter,保留正文。
默认行为
- 不确定放哪里时,先放入
01-收件箱/待整理/。 - 不直接删除历史文件。
- 不直接批量迁移;先生成 queue 或 manifest。
- Prompt 能力统一转成 Skill,不写入全局 prompts 目录。
- 结构异常、缺失目录和深层嵌套用
audit-workspaces检查。 - 子系统契约漂移、Skill 缺失、Frontmatter 缺失用
audit-subsystems检查,并写入subsystem-maintenance.yaml。 - 任意目录写入知识库时先
resolve-vault,再route-create。 - Git Hook 只记录 commit 级事实;Agent Hook 只记录重大产出、关键决策和理由。
- CLI 不是用户入口;旧 CLI 能力必须被包装成 Skill。
- 所有 Skill scripts 的 canonical 根目录是
00-系统/Skills;不得再把可维护脚本散落到 Workbase、.codex/skills或项目子目录的 Skill 中。 - Hook、crontab 和 Agent 自动化规格必须在
00-系统/运行时留存;跨电脑迁移时由 Agent 调用install-runtime --all自动注册。 flux/、space/crafted/lifeos只能作为 legacy source,不作为新内容入口。- 旧
flux/intake已迁入01-收件箱/网页剪藏和05-资源/图片/flux-intake-assets,需要追溯时读取 migration manifest。
Project Classification Policy
04-项目的分类以项目意图为准,不以历史来源为准。- 发现项目分类不准时,先运行
audit-projects,输出建议路径、置信度和理由。 audit-projects不移动文件;跨分类移动必须由后续明确任务执行,并写 trace。- 低置信度项目必须人工确认。
工作区映射
| 路径 | Skill | |
|---|---|---|
00-系统 | workspace-system | |
01-收件箱 | workspace-inbox | |
02-日记 | workspace-journal | |
03-知识 | workspace-knowledge | |
04-项目 | workspace-projects | |
05-资源 | workspace-resources | |
06-输出 | workspace-outputs | |
99-归档 | workspace-archive |
初始化
用户触发"初始化"/"setup"/"install"时,加载子 Skill: 00-系统/Skills/init-vault/SKILL.md
Frontmatter 规范(必填 9 字段)
yaml
---title: "标题"type: note # 见 .thirdspace/schema/taxonomy.yamltopic: work # ai|dev|reading|work|project|tools|writing|life|systemworkspace: "01-收件箱" # 当前工作区目录名created: "2026-05-26 10:00:00"modified: "2026-05-26 10:00:00"tags: ["note", "draft"]source: manual # mcp|manual|obsidian-clipper|web|importstatus: draft # draft|active|processed|archived---