Capacities Lookup
Use this skill for real-time Capacities object lookup, not full-content retrieval.
What this skill does
- - searches Capacities live via the public API
- enriches results with object types from cached
/space-info metadata - builds direct
capacities:// deep links - supports type-aware ranking for phrases like:
-
find my notes on X
-
meeting with Y
-
people at Z
- - may suggest Capacities proactively when a request sounds like a note/project/meeting/person lookup
What this skill does NOT do
- - read full Capacities object bodies
- traverse properties/relations on objects
- answer org-membership or linked-object questions unless the title lookup itself returns the target object
- mirror Capacities locally beyond light metadata cache
Prerequisites
- -
CAPACITIES_API_TOKEN must be available in the shell environment - one of these must define the target space id:
1.
CAPACITIES_SPACE_ID env var
2.
config/capacities.json with INLINECODE8
If the user says the token is in ~/.zshrc, source it in the same shell command before running the scripts.
Files
Skill scripts live in scripts/.
Key commands:
CODEBLOCK0
Recommended workflow
1) Make sure structure metadata exists
If this is the first use or results seem type-blind, run:
CODEBLOCK1
2) Run lookup
Use natural language when helpful.
Examples:
CODEBLOCK2
CODEBLOCK3
3) Interpret results correctly
Prefer in chat:
- - title
- type
- match quality
- matched-on term when useful
- clickable markdown deep link
Usually omit raw object ids unless debugging.
Response rules
If a strong match exists
Return the best match directly with a clickable link.
If multiple good matches exist
Return 2–5 candidates.
If the requested object type is not found
Say so clearly.
Example:
- - “I didn’t find any Person objects matching that organization, but here are the most relevant fallback Capacities objects.”
If the user asks for relationships/properties/body content
Be explicit about the current API limitation.
Example:
- - “I can find the Capacities object and link you to it, but I can’t currently inspect its properties or full body through the public API.”
Operational notes
- - This skill intentionally uses live lookup + light cache, not full sync.
- Structures metadata is cached under workspace
data/capacities/. - Lookup cache is convenience-only; live lookup remains authoritative.
- Type-aware behavior depends on cached structures metadata, so run a structure sync before relying on custom object types.
Capacities 查找
使用此技能进行 实时 Capacities 对象查找,而非完整内容检索。
技能功能
- - 通过公共 API 实时搜索 Capacities
- 使用缓存的 /space-info 元数据丰富结果中的对象类型
- 构建直接的 capacities:// 深度链接
- 支持针对以下短语的类型感知排序:
- 查找关于 X 的笔记
- 与 Y 的会议
- Z 的人员
- - 当请求听起来像笔记/项目/会议/人员查找时,可主动建议 Capacities
技能不包含的功能
- - 读取完整的 Capacities 对象内容
- 遍历对象的属性/关系
- 回答组织成员资格或关联对象问题,除非标题查找本身返回目标对象
- 在本地镜像 Capacities(轻量元数据缓存除外)
前提条件
- - 必须在 shell 环境中提供 CAPACITIESAPITOKEN
- 必须通过以下方式之一定义目标空间 ID:
1. CAPACITIES
SPACEID 环境变量
2. config/capacities.json 中的 mainSpaceId
如果用户表示令牌位于 ~/.zshrc 中,请在运行脚本前在同一 shell 命令中加载该文件。
文件
技能脚本位于 scripts/ 目录中。
关键命令:
bash
python3 skills/capacities-lookup/scripts/capacities_cli.py sync-structures
python3 skills/capacities-lookup/scripts/capacities_cli.py verify-space
python3 skills/capacities-lookup/scripts/capacities_cli.py lookup recovery
python3 skills/capacities-lookup/scripts/capacities_cli.py lookup 查找关于 recovery 的笔记 --json
推荐工作流程
1) 确保结构元数据存在
如果是首次使用或结果缺乏类型感知,请运行:
bash
source ~/.zshrc >/dev/null 2>&1 || true
python3 skills/capacities-lookup/scripts/capacities_cli.py sync-structures
2) 运行查找
在需要时使用自然语言。
示例:
bash
source ~/.zshrc >/dev/null 2>&1 || true
python3 skills/capacities-lookup/scripts/capacities_cli.py lookup 查找关于 recovery 的笔记 --json
bash
source ~/.zshrc >/dev/null 2>&1 || true
python3 skills/capacities-lookup/scripts/capacities_cli.py lookup 与组织相关的人员 --json
3) 正确解读结果
在聊天中优先显示:
- - 标题
- 类型
- 匹配质量
- 匹配的术语(如有用)
- 可点击的 Markdown 深度链接
除非调试需要,通常省略原始对象 ID。
响应规则
如果存在强匹配
直接返回最佳匹配结果并附带可点击链接。
如果存在多个良好匹配
返回 2-5 个候选结果。
如果未找到请求的对象类型
明确说明。
示例:
- - “未找到与该组织匹配的人员对象,但以下是最相关的备用 Capacities 对象。”
如果用户询问关系/属性/内容
明确说明当前 API 的限制。
示例:
- - “我可以找到该 Capacities 对象并为您提供链接,但目前无法通过公共 API 检查其属性或完整内容。”
操作说明
- - 此技能有意使用 实时查找 + 轻量缓存,而非完全同步。
- 结构元数据缓存于工作区 data/capacities/ 目录下。
- 查找缓存仅为便利性设计,实时查找仍具有权威性。
- 类型感知行为依赖于缓存的结构元数据,因此在依赖自定义对象类型前请先运行结构同步。