SuperAPI AI Directory

ybrain-capture

General & other

View repository

Updated 10-15 20:30

About this skill

ybrain-capture — Capture

The capture instruction entry point of the ybrain main skill: external materials and text inspirations go straight into the inbox via dual channels, capture first and classify later.

Prerequisite: main skill

This instruction is an entry point of the ybrain main skill. It does not carry its own scripts or API documentation and depends on the main skill installed in the same directory:

  • Main skill directory = <本技能目录>/../ybrain(the two are always installed in the same directory); it can also be invoked directly by the skill name ybrain to call the main skill
  • Transmission uniformly goes through node "<主技能目录>/scripts/ima_api.cjs" <apiPath> <json-body>(credentials are automatically read from ~/.config/ima) ⛔ It is forbidden to bypass it and directly curl to construct IMA requests
  • Before calling the API, read the corresponding references/ documentation according to the "Positioning and Hard Boundaries" section of the main skill's SKILL.md
  • Before the first execution in each session, complete ID resolution and Bootstrap according to the main skill's SKILL.md (if the structure is missing, automatically create it completely after one confirmation)
  • If there is any discrepancy between this instruction and the main skill description, the main skill's SKILL.md prevails

Principles

Do not ask for classification, do not interrupt flow. During the capture phase, the four-question screening is forbidden (that is ybrain-organize's job).

Automatically route by content type, no confirmation needed:

Content Destination Method
Webpage/WeChat official account link Knowledge base 0-收件箱 import_urls direct import
File (local or file-type URL) Knowledge base 0-收件箱 The main skill's built-in file upload safety gate (references/core-rules.md)
Text inspiration The "0-Inbox" note in the "ybrain" notebook append_doc, one line per item, optionally with a one-sentence note

For local path references, probe the remote first

When recording a local directory/file path as a reference (local paths are unreachable across devices), probe the git remote once before writing it down:

  1. git -C <路径> remote get-url origin Success → convert to a remote webpage link record:https://<host>/<owner>/<repo>/tree/<branch>/<仓库内相对路径>(remove the .git suffix; for theuser@host:path form, first convert to https://<host>/; for the branch, use git branch --show-current ; if unavailable, stop at the repository name)
  2. Not a git repository or no remote → record the path as-is, do not retry, do not ask follow-up questions, do not block capture

When conversion succeeds, state in the reply that it has been changed to a remote link.

Common mistakes

Mistake Correction
Asking "which project/area does this go in?" during capture Capture does not ask for classification; everything goes into the inbox; the four-question screening is only done in ybrain-organize
Recording links into notes first, then importing during organization Links go directly via import_urls into 0-收件箱; the note inbox only collects text inspirations
Recording a local path directly as a long-term reference First probe with git -C <路径> remote get-url origin ; if there is a remote, convert it to a webpage link; if not, keep it as-is
Bypassing ima_api.cjs and directly curling the IMA interface Transmission uniformly goes through the main skill's built-in script, reusing credential and error layering