save-to-reference

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Save to reference

保存到参考资料

Push content onto the project's Reference Panel as a document block via multipart
POST /api/v1/references
(
kind: document
on the server).
Do not use
kind: "text"
JSON for this skill. Always upload a
.md
file
(write a temp file if the note only exists in chat).
Server auto-ingests document blocks as
vector_only
. Do not call a separate project ingest after a successful save.
Not this skill: Plans/statements as creations → save-creation. Research tasks for voice pickup → research queue mode (needs a conversation). DNA-only upload without a shelf row → app (Knowledge / Documents). This skill is the Cursor path for shelf + searchable DNA.
通过 multipart
POST /api/v1/references
,将内容以 document 区块的形式推送到项目的 Reference Panel 上(服务器端使用
kind: document
)。
不要为此 skill 使用
kind: "text"
JSON。始终上传
.md
文件
(如果笔记仅存在于聊天中,则写入临时文件)。
服务器会将 document 区块自动摄取为
vector_only
。保存成功后,不要调用单独的项目摄取操作。
不适用于此 skill: 将计划/陈述作为创作内容 → save-creation。用于语音采集的研究任务 → research 队列模式(需要一次对话)。仅上传 DNA 而不创建 shelf 行 → app(Knowledge / Documents)。此 skill 就是用于 shelf + 可搜索 DNA 的 Cursor 路径。

Triggers

触发条件

  • /save-to-reference
  • "save to reference", "put this on the shelf", "Reference Panel", pin/save a note or md doc to the shelf
  • /save-to-reference
  • "save to reference"、"put this on the shelf"、"Reference Panel",或要求将笔记或 md 文档固定/保存到 shelf

API

API

  • Base URL:
    https://api.originmind.ai
  • POST /api/v1/references
    — multipart
    project_id
    +
    file
    (
    .md
    / document)
  • GET /api/v1/projects
    — resolve project when needed
  • Auth:
    X-OriAI-Api-Key
    or Bearer JWT
  • 基础 URL:
    https://api.originmind.ai
  • POST /api/v1/references
    — 使用 multipart 传递
    project_id
    +
    file
    (
    .md
    / document)
  • GET /api/v1/projects
    — 在需要时解析项目
  • 认证:
    X-OriAI-Api-Key
    或 Bearer JWT

Bootstrap

Bootstrap(初始化)

Once per shell:
powershell
. ./skills/create/scripts/bootstrap-originmind-env.ps1
bash
source ./skills/create/scripts/bootstrap-originmind-env.sh
User install:
. "$HOME/.cursor/skills/create/scripts/bootstrap-originmind-env.ps1"
MISSING_KEY
→ OAuth:
. ./skills/create/scripts/setup-oauth.ps1
(or
.sh
), or app.originmind.ai → API key →
.env.local
. Do not Read
.env
in chat.
每个 shell 执行一次:
powershell
. ./skills/create/scripts/bootstrap-originmind-env.ps1
bash
source ./skills/create/scripts/bootstrap-originmind-env.sh
用户安装:
. "$HOME/.cursor/skills/create/scripts/bootstrap-originmind-env.ps1"
MISSING_KEY
→ OAuth:
. ./skills/create/scripts/setup-oauth.ps1
(或
.sh
),或访问 app.originmind.ai → API key →
.env.local
。不要在聊天中执行 Read
.env
。

Resolve project_id

解析 project_id

  1. User names
    proj_...
    or project name →
    GET /api/v1/projects
    .
  2. ORIGINMIND_CREATIVE_DNA_PROJECT_ID
    in env.
  3. Config-based inference (no API call) —
    .originmind/om_project.config.json
    →
    projects[]
    (or legacy
    defaultProjectId
    ). Score names against user message + context per search-creative-dna. Use if ≥80%.
  4. Else most recently updated project from
    GET /api/v1/projects
    .
  1. 用户指定
    proj_...
    或项目名称 →
    GET /api/v1/projects
    。
  2. 环境变量中的
    ORIGINMIND_CREATIVE_DNA_PROJECT_ID
    。
  3. 基于配置的推断(无 API 调用) —
    .originmind/om_project.config.json
    →
    projects[]
    (或旧版
    defaultProjectId
    )。按照 search-creative-dna 的方法,将名称与用户消息和上下文进行评分。得分 ≥80% 时使用。
  4. 否则,使用
    GET /api/v1/projects
    返回的最近更新项目。

Workflow — always a document file

工作流——始终使用文档文件

  1. Bootstrap + resolve
    project_id
    .
  2. Obtain a local
    .md
    path:
    • User named a file → use it.
    • Content only in chat → write a temp
      .md
      (filename from
      # Title
      or a short slug, e.g.
      note.md
      ). Lead with
      # Title
      . Max ~50k chars of body. No secrets / source dumps.
  3. Multipart upload:
powershell
curl.exe -sS -X POST "https://api.originmind.ai/api/v1/references" `
  -H "X-OriAI-Api-Key: $env:ORIGINMIND_API_KEY" `
  -F "project_id=proj_..." `
  -F "file=@path/to/note.md;type=text/markdown"
bash
curl -sS -X POST "https://api.originmind.ai/api/v1/references" \
  -H "X-OriAI-Api-Key: $ORIGINMIND_API_KEY" \
  -F "project_id=proj_..." \
  -F "file=@path/to/note.md;type=text/markdown"
  1. Echo reference
    id
    ,
    kind
    (
    document
    ), label/filename, ingest status if present.
  2. Delete the temp
    .md
    if you created one.
  3. Do not follow with a separate ingest call.
Allowed document types:
.md
,
.markdown
,
.txt
,
.pdf
,
.doc
,
.docx
. Prefer
.md
.
  1. 执行 Bootstrap 并解析
    project_id
    。
  2. 获取本地
    .md
    路径:
    • 用户指定了文件 → 使用该文件。
    • 内容仅存在于聊天中 → 写入临时
      .md
      (文件名取自
      # Title
      或简短 slug,例如
      note.md
      )。以
      # Title
      开头。正文最多约 50k 个字符。不得包含密钥或源代码转储。
  3. 使用 multipart 上传:
powershell
curl.exe -sS -X POST "https://api.originmind.ai/api/v1/references" `
  -H "X-OriAI-Api-Key: $env:ORIGINMIND_API_KEY" `
  -F "project_id=proj_..." `
  -F "file=@path/to/note.md;type=text/markdown"
bash
curl -sS -X POST "https://api.originmind.ai/api/v1/references" \
  -H "X-OriAI-Api-Key: $ORIGINMIND_API_KEY" \
  -F "project_id=proj_..." \
  -F "file=@path/to/note.md;type=text/markdown"
  1. 输出 reference 的
    id
    、
    kind
    (
    document
    )、label/filename(标签/文件名),以及(如果存在)ingest status(摄取状态)。
  2. 如果创建了临时
    .md
    ,将其删除。
  3. 不要随后调用单独的 ingest。
允许的文档类型:
.md
、
.markdown
、
.txt
、
.pdf
、
.doc
、
.docx
。优先使用
.md
。

Optional URL / YouTube

可选的 URL / YouTube

Only when the user explicitly wants a link on the shelf. Links are not auto-ingested. Not the default for this skill.
json
{ "project_id": "proj_...", "kind": "url", "url": "https://...", "link_title": "optional" }
仅当用户明确希望将链接放到 shelf 上时使用。链接不会自动摄取。 这不是此 skill 的默认行为。
json
{ "project_id": "proj_...", "kind": "url", "url": "https://...", "link_title": "optional" }

Errors

错误

CodeAction
MISSING_KEY / 401Connect OriginMind
404Wrong
project_id
400Missing
file
/ unsupported type
413File too large
402 / 429Stop — https://app.originmind.ai/
代码操作
MISSING_KEY / 401连接 OriginMind
404
project_id
错误
400缺少
file
/ 类型不受支持
413文件过大
402 / 429停止 — https://app.originmind.ai/