SuperAPI AI Directory

ybrain-organize

Office & productivity

View repository

Updated 10-15 17:52

About this skill

ybrain-organize — Organize

The organization instruction entry point of the ybrain main skill, containing two branches: organizing the inbox, and project archiving.

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); the main skill can also be invoked directly by skill name ybrain to invoke 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 of each session, complete ID resolution and Bootstrap according to the main skill's SKILL.md (missing structures are automatically created after one confirmation)
  • If this instruction differs from the main skill's description, the main skill's SKILL.md prevails

Branch one: organize the inbox (trigger: "organize the inbox")

  1. Gather:get_knowledge_list(knowledge base 0-收件箱) list external materials + export_note read the inspiration entries of the notebook "0-Inbox" note.
  2. First list the current project inventory (1-项目 subfolders + 【项目】 knowledge package titles), then apply the four-question screening to each item in turn and give suggestions: which project is this useful for? → if none, which domain is it useful for? → if none, which resource does it belong to? → if none of these, archive it, or do not save it.
  3. Output a suggestion table for the user to confirm (including a "do not save" option).
  4. Placement (fully automatic):
    • External materials → move_knowledge move into the target folder (at most 10 at a time, in batches; check each one ret_code, list the failures in the report)
    • Inspiration → append to the corresponding knowledge package (it is considered handled once appended); if there is no corresponding knowledge package and it is not worth creating a new one → keep it in the inbox note
    • "Do not save" → move_knowledge move into 4-存档
  5. Inspiration cleanup:export_note_blocks locate the already-processed entry block → update_note(action=2 DELETE) remove;user_request_id reuse the same UUID within this round of organization.
  6. Ask one closing question: which entries should be distilled along the way? → transfer to ybrain-distill.

Branch two: project archiving (trigger: "project X is finished / archive")

Execute fully automatically, and report counts when done:

  1. get_knowledge_list(1-项目/X) list all files
  2. create_folder(4-存档/X)
  3. move_knowledge move in batches (the folder itself cannot be moved: after the contents are moved, the empty shell is retained; inform the user that it can be deleted on the client side)
  4. Knowledge package rename_note:【项目】X → 【归档】X, retain for reference

Hard rules

  • The delete interface does not exist: entries judged "do not save" are all moved to 4-存档, do not construct or retry a delete interface; if the user insists on deleting, tell them to do it manually in the IMA client.
  • Write operations are irreversible: placement after the suggestion table is confirmed by the user is executed directly; out-of-scope writes (creating new knowledge packages, renaming, etc.) must be confirmed first.

Common errors

Error Correction
Generate a "manual drag-and-drop checklist" for the user Return/archive fully automated:move_knowledge / rename_note / update_note
Divide inbox notes with the "organized" marker Deprecated; processed inspirations use update_note block deletion
Attempt to call the interface to delete an entry, or retry repeatedly No deletion API; items judged "nonexistent" are moved to 4-存档, deletion can only be done manually on the client
Bypass ima_api.cjs and directly curl the IMA interface Transmission uniformly goes through the main skill's built-in script, with credentials and errors reused in layers