本文へ移動
cccskills
無料GitHub で公開

migrate-tags

Migrate body-level #hashtags to frontmatter `tags:` lists so Bases can filter on them. Idempotent — leaves files that already have frontmatter tags alone.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md3.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Migrate Tags

Usage

  • /migrate-tags — Scan vault, present a migration plan, prompt to confirm.
  • /migrate-tags <path> — Migrate a single file.
  • /migrate-tags <folder> — Migrate all .md files under a folder.
  • /migrate-tags --dry-run — Show what would change without writing.

Why this skill exists

Obsidian supports two tag styles:

  • Body tags: #frontend written inline in note text.
  • Frontmatter tags: a YAML tags: list at the top of the file.

Bases can filter on the frontmatter style (file.hasTag("frontend")) but not the body style reliably. Migrating one to the other makes tags queryable in Bases views — e.g. a "People with #mobile tag" view becomes trivial once everyone's @Name.md has tags: [mobile].

This skill is a one-shot migration utility plus an ongoing cleanup tool for new notes.

Workflow

Step 1: Discover candidates

Use obsidian tags format=json to enumerate all tags + their usage counts and source files. Identify files where:

  • A body #tag exists, AND
  • The same tag is NOT already present in frontmatter tags:.

These are the migration candidates.

Step 2: Present the plan

Show a numbered table grouped by file:

| # | File | Body tags to migrate | Existing frontmatter tags |
|---|------|----------------------|---------------------------|
| 1 | Teams/People/@Jane Doe.md | #team-engineering, #backend | (none) |
| 2 | Teams/People/@John Smith.md | #team-engineering, #remote | (none) |
| 3 | Misc/Reading.md | #to-read, #book | (none) |

Ask the user: "all", "1,2", "none", or per-file picks.

Step 3: Apply migration

For each confirmed file:

  1. Read the file body, collect all #tag patterns (respecting word boundaries — #tag not https://foo.com/path#section).
  2. Use obsidian property:set name=tags value='["a","b","c"]' type=list path="<file>" to write the frontmatter list. If tags: already exists, merge (don't overwrite). See frontmatter-mutations.
  3. Optionally remove the body #tag patterns (default: leave them — Obsidian indexes both, body tags don't hurt). Add a --strip-body flag for users who want clean bodies.

Step 4: Verify

Run obsidian property:read name=tags path="<file>" on each migrated file to confirm the write. Spot-check that no tags were lost.

Step 5: Commit

See /commit. Commit message: chore: migrate body #tags to frontmatter tags: list (N files).

Important Notes

  • Idempotent: re-running on already-migrated files is a no-op.
  • Don't strip body tags by default — users may rely on visible tags in the body for in-note navigation. Opt-in via --strip-body.
  • Tag normalization: leave tag names as-is. Don't auto-convert #team-engineering → team-engineering (the leading # is stripped automatically; nothing else).
  • Nested tags (#team/engineering) are preserved.
  • Tags inside code blocks are skipped — they're literal, not Obsidian tags.
  • After running on People files, People.base per-team views can use file.hasTag("team-X") as an alternative to the file.hasLink(file("Teams/+X.md")) filter (which works but is more verbose).

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Fetch & embed AI transcripts as Obsidian callouts. Args: <path>, all, refresh <path>. Prompts for URLs if empty.

日本語の概要は準備中です。原文の説明を表示しています。

benoror/obsidianos_work1652026年6月11日 更新

commit

無料

Stage and commit with flexible intent parsing. Accepts file/folder scope, free-text description, amend, or any combination.

日本語の概要は準備中です。原文の説明を表示しています。

benoror/obsidianos_work1652026年6月11日 更新

defuddle

無料

Extract clean markdown content from web pages using Defuddle CLI, removing clutter and navigation to save tokens. Use instead of WebFetch when the user provides a URL to read or analyze, for online documentation, articles, blog posts, or any standard web page.

日本語の概要は準備中です。原文の説明を表示しています。

benoror/obsidianos_work1652026年6月11日 更新

Resolve and fill Participants frontmatter + link unlinked names in body. Args: <path>, all.

日本語の概要は準備中です。原文の説明を表示しています。

benoror/obsidianos_work1652026年6月11日 更新

Extract action items as plain markdown bullets (with confirmation). Args: <path>. No args = run [/note-status pending --step=todos](../note-status/SKILL.md#pending-mode).

日本語の概要は準備中です。原文の説明を表示しています。

benoror/obsidianos_work1652026年6月11日 更新

Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections. Use when working with .canvas files, creating visual canvases, mind maps, flowcharts, or when the user mentions Canvas files in Obsidian.

日本語の概要は準備中です。原文の説明を表示しています。

benoror/obsidianos_work1652026年6月11日 更新

benoror のスキルをすべて見る

このスキルの問題を報告する