Obsidian split daily note
Skill patrickjmcd/obsidian-claude-skills/skills/obsidian-split-daily-note
Split a daily note in my Obsidian vault into standalone notes based on `---` separators and `#parent`/`#attendees` inline tags. Sections with `#parent` become new notes filed under the resolved parent folder; the daily note keeps a wikilink stub in place of the moved content. Sections without `#parent` stay put unless they look important enough to suggest a move. Use when the user asks to "split my daily note", "process today's note", "extract notes from the daily", "organize my daily note", or invokes the /obsidian-split-daily-note command.From its SKILL.md
npx -y skills add patrickjmcd/obsidian-claude-skills --skill obsidian-split-daily-noteAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
11.2 KB, as published. Nobody here has run it
Split Daily Note
Take a daily note under Daily Notes/YYYY-MM-DD.md, break it into individual sections by ---, and promote the sections that carry a #parent inline tag into standalone notes. Leave everything else in the daily note. The mechanics rely on conventions from [[obsidian-notes]] — read that skill's frontmatter/filename rules before creating any notes here.
Tools
Same mcp-obsidian MCP server as [[obsidian-notes]]:
obsidian_get_periodic_note— fetch today's daily note directly.obsidian_get_file_contents— for a specific date, or to inspect target folders / existing files.obsidian_list_files_in_dir/obsidian_list_files_in_vault— resolve the folder that a#parent:value points to.obsidian_append_content— create each new standalone note (also autocreates missing folders).obsidian_patch_content— surgically rewrite the daily note (replace body under each moved heading with a wikilink stub). Neverobsidian_delete_filethe daily note.
Section anatomy
A "section" in a daily note is bounded by lines containing only --- (or the file start/end). Inside a section, expect:
## {Heading — often "Attendee Name - Topic" or just "Topic"}
#parent: {Folder or project name} # optional
#attendees: [[Name (Company)]] # optional, may repeat or be a list
- body content...
- Tags (
#parent:,#attendees:) can appear in any order after the heading, on their own lines. - Attendees may appear as one wikilink per line, comma-separated, or as a YAML list. Preserve every one found.
- Body = everything below the heading that isn't a
#parent:/#attendees:line.
Rules
---demarcates a section. Split on lines matching exactly---.- No
#parenttag → leave in place by default. If the section looks substantive (multiple bullets, decisions, action items, named stakeholders, or a topic the user is clearly tracking over time), surface it to the user with a proposed folder + title and ask before moving. Never move it silently. - If the heading starts with an attendee's display name, drop that name from the title. Match the display name portion of an
#attendees:wikilink (Tony Starkfrom[[Tony Stark (Stark)]]) against the leading portion of the heading, up to the first-/—/:separator. If it matches, strip the prefix and separator.Tony Stark - Long-Term Wayne Enterprises + Stark+ attendee[[Tony Stark (Stark)]]→ titleLong-Term Wayne Enterprises + Stark.Lucius Fox - IS Support+ attendee[[Lucius Fox (WE)]]→ titleIS Support.- If the heading is just the attendee's name (a 1-1 or check-in), keep the attendee's name — otherwise the note has no title. Ask the user for a more descriptive title in that case.
- Replace the moved section in the daily note with a stub link. Keep the
## Headingintact so the daily note is still scannable; replace the body (tags + content) under it with the wikilink to the new note:
The## Tony Stark - Long-Term Wayne Enterprises + Stark [[Long-Term Wayne Enterprises + Stark]]---separators between sections stay put.
Steps
1. Load the daily note
- Default target: today's daily note via
obsidian_get_periodic_note(period="daily"). - If the user names a date, load
Daily Notes/{YYYY-MM-DD}.mddirectly withobsidian_get_file_contents. - Capture the date (
YYYY-MM-DD) for the frontmatter of every note we create.
2. Split and classify
- First, strip Obsidian comment blocks (
%% ... %%) from the file. These are template-instruction blocks that render invisibly in preview mode and must never be treated as content. Remove every%% ... %%(including multi-line ones) before splitting into sections. The Daily Note template puts an instruction block at the very top (directly followed by the first##heading); without stripping it, the parser treats those instruction bullets as section content. - Then check for a leading
%% ... %%block on disk. If the file starts with one, the fast path (patch_content) will fail — see the gotcha in step 6. Plan to use the delete + re-append fallback for that file's daily-note rewrite step. - Split on
\n---\n(and treat file start/end as boundaries). - For each section:
- Parse the H2 heading (first
##line). - Collect
#parent:value and all#attendees:wikilinks. - Everything else is the body.
- Parse the H2 heading (first
- Bucket sections into:
- Move — has
#parent. - Suggest — no
#parentbut the section is substantive (see rule 2). - Skip — no
#parent, trivial/personal, OR the section is empty after stripping comment blocks (this is what happens to the preamble section above the template's first---).
- Move — has
3. Confirm the plan with the user
Before touching anything, print a preview:
Move:
[Stark Project] Long-Term Wayne Enterprises + Stark ← from "Tony Stark - …"
[WE] IS Support ← from "Lucius Fox - …"
Suggest (has no #parent — want to move?):
Pepper Potts - Batmobile MK II → propose: WE/… ?
Skip:
British Open
Wait for user confirmation (or per-section adjustments) before writing anything.
4. Resolve each #parent: to a folder
- Start by listing vault root +
WE/for candidate folders. - Exact match by folder name (case-insensitive tolerated but flag mismatch) — e.g.
Stark Project→WE/Stark Project/. - If multiple candidates or none: ask the user which folder to use, offering the closest matches.
- Cache the resolution per
#parentvalue for the run.
5. Create each moved note
Follow [[obsidian-notes]] create-note conventions:
- Filename:
{resolved-folder}/{title}.md, wheretitlehas any attendee prefix stripped. - Check for a name collision with
obsidian_get_file_contentsfirst. If it exists, ask before appending/overwriting — do not silently overwrite meeting notes. - Content:
--- attendees: - "[[Name (Company)]]" date: {daily-note-date} --- {body from the section, unchanged}- Omit
attendees:if the section had none. - No H1/H2 title inside — the filename is the title, matching sibling notes in
WE/Stark Project/etc. - Preserve internal
---inside the body (uncommon, but leave alone if present).
- Omit
- Create via
obsidian_append_content(also creates the folder if new).
6. Rewrite the daily note
For each moved section, replace the body under its H2 with the wikilink stub. Important: obsidian_patch_content with target_type=heading, operation=replace replaces everything under that heading up to the next same-or-higher-level heading — including the --- separator that visually followed the section. So the stub must include that trailing separator, or the daily note collapses into one long section.
Unless the section being replaced was the very last one in the file, use:
obsidian_patch_content(
filepath = "Daily Notes/{date}.md",
operation = "replace",
target_type = "heading",
target = "{original H2 text, exactly as it appeared}",
content = "[[{new-title}]]\n\n---\n"
)
For the last section (no trailing --- originally), omit it:
content = "[[{new-title}]]\n"
targetmust be the original heading text (before any attendee-prefix stripping), so it matches the daily note as-is.- Verify with
obsidian_get_file_contentsafterward that separators are intact between remaining sections; repair by re-patching with the corrected content if the tool ate one. - Sections in the Skip bucket are not touched.
- Suggest sections: only patch if the user accepted the suggestion in step 3.
Gotcha: patch_content cannot edit list-valued frontmatter. If you need to fix the attendees: list on a just-created note (e.g. wrong wikilink), obsidian_patch_content with target_type=frontmatter, target=attendees, operation=replace will coerce whatever you pass (YAML block, JSON array, comma list) into a single quoted string — breaking the list format sibling notes and dataview queries depend on. The reliable fix is obsidian_delete_file + obsidian_append_content to rewrite the file with the correct YAML list.
Gotcha: patch_content returns invalid-target for every heading when the file starts with a %% ... %% comment block. Empirically confirmed: any %% ... %% block at the top of the file — with OR without a bare --- between it and the first H2 — breaks target_type=heading lookups entirely. Every heading call on that file fails, not just one. (An earlier version of this note blamed only the bare ---; that was incomplete. The %% block alone is enough.) There's no known way to reshape the daily note to avoid this while keeping the template preamble.
- Fallback: for any daily note that starts with
%% ... %%, don't trypatch_content. Instead, read the whole file, build the new content in memory (preserve the%% %%block verbatim, stub the promoted H2 sections, leave the untouched sections in place),obsidian_delete_filethe daily note, thenobsidian_append_contentto rewrite it whole. It's heavier than patching but 100% reliable. - Fast path still works for daily notes that have NO
%% ... %%preamble at all (older notes from before the template was introduced). Usepatch_contentper H2 as normal in that case.
7. Confirm what changed
Report back:
- Each new note path created (with its wikilink for pasting elsewhere).
- Which sections in the daily note were reduced to stubs vs. left alone.
- Anything the user was asked about but declined.
Edge cases
- No
---separators at all. Treat the whole file as a single section; the rules above still apply (usually results in Skip). - Template preamble at the top of the file. The Daily Note template puts a
%% ... %%instruction block directly above the first##heading (no leading---). Strip comment blocks first (step 2). What's left in the first section is just that H2 and its body — process it like any other section. The%%block itself is discarded from parsing but stays in the daily note on disk untouched. - Section has
#parentbut no heading. Ask for a title — a moved note without a filename can't be created. - Multiple
#parent:values in one section. Ask which one wins; don't guess. - Attendee wikilink refers to a note that doesn't exist yet. Offer to create it via [[obsidian-notes]]
create-usermode before finishing the split, so backlinks resolve. - Daily note has H1 or no H2 (only bullets under the separators). Ask the user how to title the promoted note — never fabricate one.
- Title collides with an existing note in the target folder. Show the user the existing note's first few lines and ask whether to append to it, rename the new one, or skip.