AGENT SKILL

to-vault

File what the user learnt or decided into their Obsidian vault as atomic Notes, one idea each, linked into MOCs and logged. Use when the user types /to-vault, or says "save this to my vault", "put this in obsidian", "add this to my notes", "file this decision", "record this decision in the vault", "keep this", "keep that answer", "save that answer", or asks to keep takeaways from the session in their second brain. Also offer it right after record-decision writes an ADR. Also takes a Notion page link as the capture. Works from any repo. Not for writing ADRs (record-decision), Claude's own memory, or ingesting a source into wiki/ (use /ingest).

License 许可
MIT
最近更新
2026-11-11
Stars
★ 0
Forks
0

01 前言 Front Matter

name
to-vault
description
File what the user learnt or decided into their Obsidian vault as atomic Notes, one idea each, linked into MOCs and logged. Use when the user types /to-vault, or says "save this to my vault", "put this in obsidian", "add this to my notes", "file this decision", "record this decision in the vault", "keep this", "keep that answer", "save that answer", or asks to keep takeaways from the session in their second brain. Also offer it right after record-decision writes an ADR. Also takes a Notion page link as the capture. Works from any repo. Not for writing ADRs (record-decision), Claude's own memory, or ingesting a source into wiki/ (use /ingest).
argument-hint
[--inbox | <notion-page-url> | what to capture; "quoted text" is kept verbatim]

02 资源文件 1

03 SKILL.md 正文

File what the user names into the vault as atomic Notes, then reply with their paths.

Inputs

  • Vault: ~/Documents/personal/obsidian/my-obsidian-notes. If it or its CLAUDE.md is missing, stop and say so; never create a vault.
  • Schema: read the vault's CLAUDE.md every run, at least § Schema, § Ownership, § MOCs and § Log format. It is the only source of truth for frontmatter, MOC shape and log entries, so follow it over anything below if they differ.
  • Capture: the user decides what goes in. The args name it, and the conversation supplies the detail. With no args, list the candidate learnings and decisions from the conversation in one short numbered list and ask which to file; write nothing until they answer. Never widen the Capture beyond what they named.
  • Routing: if the Capture is a whole file, URL or document someone else wrote (an article, course lesson, docs page), stop and point the user to /ingest, writing nothing. The user's own words, Notion notes included, go to notes/; someone else's go to wiki/.
  • Exact wording: text the user wrote inside double quotes in the args is theirs verbatim. Put it in the Note it belongs to unchanged, without the quote marks, as its own paragraph. Everything else you may summarise and reword.
  • Notion link: an arg that is a Notion page URL is the Capture, one page per run. Run ntn pages get <page-id> (the id is the 32-hex tail of the URL) and treat its markdown as the user's own free-form notes. If ntn is missing or NOTION_API_TOKEN is unset, stop and say so, writing nothing. Skip the numbered-list prompt: the page is the Capture.
  • --inbox: opt-in, only when the user typed it. Skip Capture and Steps. Read § Triage in the vault's CLAUDE.md; if that section is missing, stop and say so, writing nothing. Otherwise follow it in full, including showing its plan and writing only after approval.
  • Project: basename "$(git rev-parse --show-toplevel)". Omit project when that fails (not in a repo), when the toplevel is the vault itself, or for a Notion link (general study notes, not tied to the repo you ran from).

What you may write

Only these, as the vault's Ownership table says:

  • raw/: add one new file per run holding the original capture. Never edit an existing file.
  • notes/: create Notes, or merge new material into existing ones and add the new raw file to their source:. A Note with edited: user only gets an appended ## <YYYY-MM-DD> section.
  • mocs/: add list lines; create a project MOC when missing.
  • log.md: append entries.

With --inbox only, you may also delete the inbox/ files that were processed, after approval.

Never touch existing raw/ files, wiki/ page text, index.md, or anything in the repo you were invoked from (an ADR stays exactly as record-decision wrote it).

Steps

  1. Save the original. Write the Capture unchanged to raw/<Title> (YYYY-MM-DD).md: the args with quoted text intact, the conversation excerpt the user chose, or the Notion markdown. Notes in the steps below list this file in source:.
  2. Split. Break the Capture into atomic ideas: one claim, technique or decision per Note, each understandable on its own. A capture usually yields one to a few Notes, not one long one; never pad it out. Each quoted passage goes with the idea it is about; a quote that stands alone becomes its own Note.
  3. Classify each. decision if it is a choice between options (an ADR written this session is a strong signal); otherwise learning.
  4. Look for existing Notes. List notes/ and read any whose title or body covers the same idea. If one does, merge into it (step 5) instead of creating a duplicate. For a Notion link, first grep log.md for its Source: <url> line: a hit means the page was filed before, so append only what those Notes do not already say and create Notes for new ideas.
  5. Pick topics. List mocs/ and choose the MOCs each idea belongs to; at least one per Note. With a project, always include [[<Project> MOC]] (Project is the repo name as written, e.g. fleet MOC). If that MOC doesn't exist, create it in the MOC shape from § MOCs with a one-line synthesis, and add - [[<Project> MOC]] — <when to open it> under ## Notes in mocs/System Design MOC.md. Without a project and with no closer MOC, use System Design MOC. For a Notion link, a topic with no MOC (caching, consensus) gets a <Topic> MOC created the same way. Reuse an existing MOC whenever one fits rather than a near-duplicate name.
  6. Write the Notes.
    • New Note: notes/<Title>.md, title a short claim or name, no date. Frontmatter per § Schema with type, origin: user, status: seedling, topics, project (if any) and today's date, and source: ["[[raw/<file from step 0>]]"].

    • Existing Note: merge the new material in, keep quotes and numbers verbatim, and add the raw file to source:. If it has edited: user, append a ## <YYYY-MM-DD> section instead.

    • Keep it short and plain. Add no specifics the conversation didn't contain (names, values, example code); a filled-in guess reads later as something the user learnt. Link wiki concepts inline as [[Page]], only for pages that exist in wiki/. Link Notes from the same run to each other where one builds on another.

    • A decision body is exactly:

      ## What
      ## Why
      ## Alternatives
      ## ADR
      

      ## Why says why the chosen option wins; ## Alternatives lists each rejected option with the reason it lost. ## ADR holds a link to the ADR: its GitHub URL when the repo has a GitHub origin (https://github.com/<owner>/<repo>/blob/<default-branch>/docs/adr/<file>, branch from git symbolic-ref --short refs/remotes/origin/HEAD, else main), else its repo-relative path. Drop ## ADR for a decision with no ADR (a non-code decision); its full reasoning then lives in the other sections.

  7. Link from MOCs. In every MOC in a Note's topics:, add - [[<Title>]] — <when to open it> under ## Notes unless it is already listed. The phrase is short and drawn from the Note's content, so a reader can skip the Note without opening it. Agents can't see Obsidian backlinks, so both directions must be written.
  8. Log. Append one ## [YYYY-MM-DD] to-vault | <Title> to log.md per Note written or appended to, per § Log format. A project or topic MOC created on the way needs none of its own. For a Notion link, add the line Source: <url> under every entry, so step 3 can find the page next time.

Reply

One line per Note: its path, e.g. ~/Documents/personal/obsidian/my-obsidian-notes/notes/Leases beat locks for job claims.md.

04 同仓库更多 Skills

O-Marsters-1997
O-Marsters-1997/my-claude-code

obsidian-develop

Build, prototype, extend, debug and review Obsidian community plugins against a live vault: inspect the running app's UI, DOM, console and plugin state, prototype in the runtime, then verify each change with a build, reload and check loop. Use whenever the user is working on an Obsidian plugin, even when they just say "add a command", "make a sidebar view", "my settings tab is blank", "why isn't my view updating" or "get this ready for the community directory"; when they ask about the plugin API (obsidian.d.ts, Workspace, leaves, Vault, MetadataCache, FileManager, views, modals, settings tabs, CodeMirror 6 editor extensions, markdown post-processors, events); or when they want a running Obsidian instance's DOM, CSS, console or plugins inspected. Not for general note-taking, Obsidian Markdown syntax, themes without a plugin, or managing vault content (use ingest, to-vault or vault-recall for those).

★ 0
O-Marsters-1997
O-Marsters-1997/my-claude-code

vault-recall

Answer the user's conceptual or technical question using their Obsidian vault as well as general knowledge. Use when the user asks a question (not a task) whose topic appears in the vault MOC digest from session start. Not for task instructions, not mid-task, and not for writing to the vault (that is to-vault).

★ 0
O-Marsters-1997
O-Marsters-1997/my-claude-code

ingest

Ingest one external source (an article, course lesson, doc, PDF or URL) into the user's Obsidian vault: save the original to raw/, then build wiki/ pages per the vault's § Ingest. Use when the user types /ingest, or says "ingest this", "add this source to my wiki", "put this article/lesson in the vault as a wiki page". Works from any repo. Routing rule: someone else's words go to wiki/ (this skill); the user's own learnings and decisions go to notes/ (/to-vault).

★ 0
O-Marsters-1997
O-Marsters-1997/my-claude-code

to-tickets

Breaks a source into independently-grabbable GitHub tickets. For a code feature the source is the plan (`docs/plans/<feature>.md`, from /to-plan) and every new or changed symbol lands in exactly one ticket, its signatures copied into the ticket body; a non-code feature is cut from the PRD's slices. Cuts tickets for one feature per run. If a code feature has no approved plan, offers /to-plan instead of cutting from prose. In a repo that runs command-centre, also emits `[[task]]` blocks into its config; in a plain treepad repo, emits a Batch Manifest instead so the tickets materialise as stacked worktrees.

★ 0
O-Marsters-1997
O-Marsters-1997/my-claude-code

to-seams

Records an agreed-but-unlanded cross-repo interface as a seam: the file a consumer's agent gets pasted into its prompt as ground truth, plus the `[[seam]]` block command-centre reads for the retirement pointer. Use when two repos need to build against an interface neither has landed yet — "record a seam for X", "we agreed on this schema, seam it", "add a seam so Y can build against Z's new field". Halts for approval before writing either file.

★ 0
O-Marsters-1997
O-Marsters-1997/my-claude-code

to-roadmap

Prioritises settled features into a Now / Next / Later kanban board, rendered as a self-contained ./ideas/roadmap.html. Each card is a feature, not a ticket — one card later becomes several tickets via /to-prd -> /to-plan -> /to-tickets. Boards the features in ./docs/approach.md, or the "## Accepted ideas" in ./ideas/CONTEXT.md when there is no approach doc. The approach doc is settled truth: this assigns tiers and reasons about ordering, it never re-litigates what was decided.

★ 0