Logo vun Import

Import

Organisatioun
onebrain-ai
import

Import local files (PDF, Word, PowerPoint, Excel, images, video, scripts) from a staging inbox folder or explicit path into structured markdown notes in the resources folder. Invoke when user mentions a local file path to bring into the vault, or runs /import or /import --attach. Do NOT use for: fetching content from a URL (use summarize), capturing a text idea (use capture), or processing a book already read (use reading-notes).

Iwwersiicht

Editeuronebrain-ai
Repositoryonebrain
Skill-Nummimport
Stären
31
Forks
3
Matgeliwwert Fichieren
9
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 9 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum onebrain-ai op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Import an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/onebrain-ai/onebrain/tree/main/.claude/plugins/onebrain/skills/import
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/onebrain-ai/onebrain.git /tmp/onebrain
mkdir -p .claude/skills
cp -r /tmp/onebrain/.claude/plugins/onebrain/skills/import .claude/skills/import
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Import an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Import automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Import net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Import

Process local files into permanent vault notes in [resources_folder]/ (resolved from onebrain.yml; default: 04-resources/).

Usage:

  • /import : scan default import staging inbox ([inbox_folder]/imports/, resolved from onebrain.yml)
  • /import /path/to/file : import a single explicit file
  • /import --attach : scan inbox and copy supported files into vault for inline Obsidian preview
  • /import /path/to/file --attach : single file with attach

Orchestrator Flow

Step 1: Resolve source and parse flags

Resolve additional folders from onebrain.yml (read the file if it exists at the vault root):

  • If onebrain.yml does not exist: use all defaults below.
  • If onebrain.yml exists but cannot be parsed: report the error and stop : do not proceed with unknown folder paths.
  • folders.import_inbox → default: [inbox_folder]/imports (import staging folder; substituting the resolved [inbox_folder] placeholder)
  • folders.attachments → default: attachments (for --attach copies)

Use [inbox_folder] and [resources_folder] from session config. Store resolved [attachments_folder] from onebrain.yml above.

Parse arguments:

  • Extract --attach flag if present (remove from path consideration)
  • If a file path is provided after /import: this is single-file mode
  • If no path: this is batch mode (scan inbox)

Single-file mode:

  1. Validate the file exists. If not, report and stop.
  2. Determine file type from extension (see Supported File Types below).
  3. If unsupported type, report:

    [filename] is not a supported file type. Supported: PDF, Word, Excel, PowerPoint, images, video, Python/Shell/SQL scripts. Then stop.

  4. Note whether the file is inside the inbox folder (used in cleanup : files outside inbox are never deleted).
  5. Skip Steps 2 and 3 below. Go directly to Step 4 with this single file.

Batch mode:

  1. Use [inbox_folder] resolved in Step 1 above (default: [inbox_folder]/imports from onebrain.yml).
  2. List all files recursively in the inbox folder.
  3. If the inbox folder does not exist, report:

    Import inbox not found at [inbox path]. Run /onboarding to set up your vault, or use /import /path/to/file to import a specific file. Then stop.

  4. If inbox is empty, report: 🔴 Inbox is empty ([inbox path]). Add files or use /import /path/to/file. Then stop.

Step 2: Group and display (batch mode only)

Group files by type. Show a confirmation table:

Found N files to import:

  report.pdf          PDF document
  budget.xlsx         Excel spreadsheet
  hero-image.png      Image
  cleanup.sh          Shell script
  deck.pptx           PowerPoint
  unknown.xyz         ⚠ Unsupported : will be skipped

Proceed with all? Or type filenames to skip (comma-separated, or "all"):
(Inbox files will be removed after successful import)

Unsupported file types are listed with a warning but not processed.

Step 3: User confirms (batch mode only)

Wait for user response:

  • If "all" or blank/enter: proceed with all supported files
  • If comma-separated filenames: exclude those files from processing
  • Proceed with confirmed set

Step 4: Dispatch parallel subagents

Note: In batch mode, subagents auto-select subfolders without user confirmation. Users can move notes to different subfolders after import.

For each file in the confirmed set, dispatch one subagent in parallel. Each subagent receives:

  • Absolute file path
  • Detected file type
  • Vault root path
  • Whether --attach flag is set
  • Whether the file is inside the inbox folder (cleanup flag)

Each subagent runs the appropriate handler section from this skill (see below).

Step 5: Collect results and report

After all subagents complete, show a summary:

──────────────────────────────────────────────────────────────
📂 Import Complete — {N} notes
──────────────────────────────────────────────────────────────
  `[resources_folder]/research/report.md`         (from report.pdf)
  `[resources_folder]/finance/budget-summary.md`  (from budget.xlsx)
  `[resources_folder]/media/hero-image.md`        (from hero-image.png)
  `[resources_folder]/scripts/cleanup.md`         (from cleanup.sh)

{N} files removed from inbox.

If any subagent failed:

⚠️ {N} file(s) failed:
  `{filename}` — {reason}

If any files were skipped due to unsupported type:

⏭ {N} file(s) skipped (unsupported — left in inbox):
  `{filename}`

If a note was created but the inbox delete failed (partial success):

⚠️ {N} partial success:
  `{filename}` — note created at `{vault path}`, but inbox file could not be deleted. Delete manually.

Step 6: Offer Integration (optional)

Skip this step if 0 notes were successfully created.

Ask using AskUserQuestion:

  • question: "Do you want to integrate any of these notes into your vault?"
  • header: "Integrate"
  • multiSelect: false
  • options:
    • label: "yes", description: "Find related vault notes and add connections"
    • label: "skip", description: "Leave notes in resources/ as-is"

If "skip": done.

If "yes": For each successfully created note (process one at a time):

  1. Find related vault notes: Search using the search tools if available, otherwise Grep [knowledge_folder]/**/*.md, [resources_folder]/**/*.md, [projects_folder]/**/*.md for keywords from the imported note's title, tags, and Summary section (when falling back to Grep, append the |mcp-miss alternation to the pattern — see SEARCH.md). For search-tool results, only include candidates with rerank_score ≥ 0.30 (prefer ≥ 0.60) — drop anything below 0.30. Exclude the imported note itself.

  2. Present suggestions:

    ──────────────────────────────────────────────────────────────
    🔗 Integrate — `{imported-note-filename}`
    ──────────────────────────────────────────────────────────────
    Related notes found:
      1. [[Note A]] — {reason: overlapping topic or shared entity}
      2. [[Note B]] — {reason}
      3. No related notes found — adding to Related section only
  3. For each suggested related note, ask what to do using AskUserQuestion:

    • options: link-only / append-excerpt / skip
    • link-only: add [[imported-note-title]] to the related note's ## Related section (bidirectional — also add the related note to the imported note's ## Related). If the related note has no ## Related section, append one at the end of the file before adding the wikilink.
    • append-excerpt: ask the user which section of the imported note to excerpt, then append under ## From [[imported-note-title]] (YYYY-MM-DD) in the related note
    • skip: no changes
  4. After processing all suggestions for this note: confirm what was linked or appended.

onebrain search reindex

Supported File Types

ExtensionTypeReference file
.pdfPDFreferences/pdf-handler.md
.docxWordreferences/word-handler.md
.xlsx, .xlsExcelreferences/excel-handler.md
.pptx, .pptPowerPointreferences/pptx-handler.md
.png, .jpg, .jpeg, .gif, .webpImagereferences/image-handler.md
.svgSVGreferences/image-handler.md
.mp4, .mov, .webm, .mkvVideoreferences/video-handler.md
.pyPythonreferences/script-handler.md
.sh, .bash, .zshShellreferences/script-handler.md
.sqlSQLreferences/script-handler.md

Handler Safety Rules

These rules apply to all handlers. No exceptions.

1. Cleanup is conditional on note creation success. Delete an inbox file ONLY after the Write tool confirms the note was created. If note creation fails for any reason: return an error, leave the inbox file untouched, stop.

2. Stub notes do NOT trigger cleanup. When a stub note is created (extraction tool unavailable, extraction failed, empty document): do NOT delete the inbox file. The user needs it to retry after fixing the issue.

3. Read/extraction failures stop processing. If the Read tool, markitdown, or any extraction step returns an error or empty output: do NOT create a note. Return an error. Do NOT delete the inbox file.

4. File validation before processing. Check file size in bytes via Node (already required by the OneBrain CLI, so reliably on PATH). Pass the path via process.argv so Windows backslashes are not interpreted as escape sequences inside a string literal. The catch arm logs the errno code to stderr (visible in tool output) so EACCES / ENOTDIR / EISDIR / ENOENT are not collapsed into a single misleading "empty file" stub:

node -e "try { console.log(require('fs').statSync(process.argv[1]).size) } catch (e) { console.error(e.code || e.message); console.log(-1) }" -- "[filepath]"

If the output is 0, create a stub note ("File is empty : no content to extract."), do NOT delete inbox file, return. If the output is -1 (stat threw — read the stderr line for the errno code), the file is unreadable; create a stub note that names the actual error, and do not delete.

5. --attach directory creation. Before every copy, ensure the target directory exists. Prefer Node (node -e "require('fs').mkdirSync(process.argv[1], { recursive: true })" -- "<dir>") — it is portable across Bash/PowerShell/cmd. Native shell forms also work when the active shell is known (mkdir -p Bash, New-Item -ItemType Directory -Force PowerShell, mkdir cmd); do not call mkdir -p from PowerShell — its mkdir alias would create a literal directory named -p. If the subsequent copy fails: skip the embed, report the failure, do NOT delete inbox file, stop.

6. Filename collision. Before writing a note, check if the target path already exists. If it does: append (Imported YYYY-MM-DD) to the filename and note the rename in the summary.


Handlers

Each subagent reads the relevant handler reference file before processing. Handler Safety Rules (above) apply to all handlers without exception.

  • markitdown setup (Word/Excel/PowerPoint): read references/markitdown-setup.md
  • Note template (all file types): read references/note-template.md
File typeRead before processing
PDFreferences/pdf-handler.md
Word (.docx)references/word-handler.md
Excel (.xlsx/.xls)references/excel-handler.md
PowerPoint (.pptx/.ppt)references/pptx-handler.md
Image/GIF/SVGreferences/image-handler.md
Videoreferences/video-handler.md
Script (.py/.sh/.sql)references/script-handler.md

Progress reporting

This skill is long-running. Emit a 1-line status update after each major step so the user can see progress in real time.

In-session format:

→ [step N/M] <action being taken>

Examples:

→ [step 1/4] reading file · detecting format...
→ [step 2/4] extracting content (PDF parse / OCR / Markdown)...
→ [step 3/4] enriching via tag-suggester + link-suggester...
→ [step 4/4] writing to 04-resources/ + linking related notes...

Rules:

  • Emit one line per major step (NOT per sub-step or tool call)
  • M = total steps known up front (count them before starting)
  • Status lines use → [step N/M] prefix exactly so they're visually distinct from skill output
  • Do NOT emit heartbeats for fast operations (< 5 seconds)

Known Gotchas

  • Password-protected PDFs and Word files. The Read tool returns empty content or a decryption error on protected files. When a non-trivially sized file (> 0 bytes) returns completely empty content, create a stub note with the message "File may be password-protected — content could not be extracted. Unlock the file and re-import."

  • Large PDFs need chunked reading. Claude's Read tool reads up to 20 pages per request. For PDFs with 20+ pages, read in consecutive page ranges (pages: "1-20", pages: "21-40", etc.) and synthesize across chunks. Without chunking, pages 21+ are silently truncated.

  • .xls legacy Excel format. markitdown may return garbled characters or fail silently on .xls files. The Excel stub fallback already has a special message for .xls — trust the stub path for .xls rather than retrying markitdown. The user should convert to .xlsx and re-import.

  • --attach flag with batch mode. In batch mode, cp operations for attach run inside subagents. If a subagent's cp fails, the orchestrator Step 5 report should include it as a partial failure — the note is created but the attachment copy was skipped.

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Import?

Import local files (PDF, Word, PowerPoint, Excel, images, video, scripts) from a staging inbox folder or explicit path into structured markdown notes in the resources folder. Invoke when user mentions a local file path to bring into the vault, or runs /import or /import --attach. Do NOT use for: fetching content from a URL (use summarize), capturing a text idea (use capture), or processing a book already read (use reading-notes).

Firwat Import op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Import besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Import an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/onebrain-ai/onebrain/tree/main/.claude/plugins/onebrain/skills/import an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Import benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Import benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Import domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Import gratis?

Jo. De Skill gëtt vum onebrain-ai ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇