The expression instruction entry point of the ybrain main skill: gather materials from the external brain, draft, run a Feynman self-check, and write to disk as an 【Output】 note, letting the output flow back as material.
Prerequisite: main skill
This instruction is the 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); you can also invoke the main skill directly by the skill nameybrainActivate 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 construct IMA requests with curl - Before calling the API, read the corresponding references/ documentation under the main skill's SKILL.md "Positioning and Hard Boundaries"
- 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, create it all automatically after one confirmation)
- If this instruction differs from the main skill description, the main skill's SKILL.md prevails
Flow
- Material gathering:
search_knowledge(memory layer + sealed amount) +search_note(thought layer + sealed amount) → output material list → user confirms scope. For the sealed amount list and lazy resolution rules, see the "Sealed Amount" section of the main skill's SKILL.md. - Draft, then run a Feynman review self-check: can this passage be understood by someone who only knows the basic concepts? Where are the sticking points that still aren't explained clearly? → revise.
- The finished piece is stored with
【输出】标题import_docinto the ybrain notebook (very long content is split into multipleappend_doc, the over-limit signal is 210009, see references/core-rules.md; do not use the COS long-content path), and display the full text in the session for the user to copy and publish.
Hard rules
- The finished piece must be written to disk as an
【输出】note, and cannot only be displayed in the session — only when output leaves a trace can it flow back as material. - Before drafting, the material scope must be confirmed by the user; writing the finished text into the library is a write within the scope of an explicit instruction.
- For long-text writes, do not use inline command-line arguments (PowerShell will silently lose special punctuation, and quote escaping in Unix-like shells will corrupt JSON); write to disk using the safe writing method in the main skill's references, and read back to verify after writing; for text containing links, use explicit
[text](url), not bare URLs.
Common errors
| Error | Correction |
|---|---|
| After expressing, only display in the session | The finished piece must be written to disk as an 【输出】 note |
| Only search the new library and miss the sealed amount | Retrieval covers the memory layer + thought layer + sealed amount (for the list, see the main skill) |
| Passing the body inline via command-line JSON causes —— → loss of characters such as curly quotes | For writes, use the file body method, and after writing, export_note download and read back to verify |
| Bypass ima_api.cjs and directly curl the IMA interface | Transmission uniformly goes through the main skill's built-in scripts, reusing credentials and error layering |