ソース情報
- リポジトリ
- QianJinGuo/wiki
- ソースの最終更新活動
- 2026年8月19日 03:39
- 検出された SKILL.md の言語
- 英語
- スター
- 1
- フォーク
- 1
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
メニュー
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/QianJinGuo/wiki --skill wiki-frontmatter-fence-repairコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
SKILL.md を表示中
SOC 職業分類に基づく
| name | wiki-frontmatter-fence-repair |
| description | Restore YAML frontmatter fences stripped by bulk wiki edits. |
| category | wiki |
Lint jumps from 0 to dozens/hundreds of NO FRONTMATTER: entities/... errors (and
NO FRONTMATTER on raw article: ... warnings) after a bulk write operation (a backfill
script, batch ingest, source_url rewrite). The YAML frontmatter CONTENT is intact but
the --- delimiters are gone.
scripts/wiki-lint.mjs uses:
const FM_RE = /^---\n([\s\S]*?)\n---/;
readFrontmatter() does content.match(FM_RE). The ^ anchor means a file MUST start
with the opening --- on line 1. If a bulk script strips BOTH the opening AND closing
--- fences (e.g. re-emits the YAML block without delimiters), the file starts with
source_url:/title:/type: directly → regex fails → readFrontmatter returns null
→ NO FRONTMATTER.
---; first line is a YAML key.--- delimiters are gone.git diff typically shows BOTH a value backfill (e.g. empty source_url: " → real URL)
AND the --- lines removed.Do NOT blanket-rewrite all modified files. Operate only on files lint flags, so legitimate fence-free files (Dashboard.md, hot-context.md cache, etc.) stay untouched.
Handles two boundary shapes a naive "insert at first blank line" misses:
# heading / text).lines = content.split('\n')
if lines[0] === '---': already has opening fence → skip
skip leading blank lines
start = first non-blank line; require it matches /^[A-Za-z_][\w-]*:/ (YAML key)
end = run of lines matching KEY_RE OR list-item /^\s*- /
FM block = lines[start..end]
rebuild = ['---', ...FM, '---', ...body(lines[end..])]
Key REs:
KEY_RE = /^[A-Za-z_][\w-]*:/LIST_RE = /^\s*- / (for sources: list items)process.exit(ec>0 ? 1:0) when errors exist. Wrap in try/catch and read e.stdout:
try { out = execSync("node scripts/wiki-lint.mjs . 2>&1", {maxBuffer:1e8}).toString(); }
catch (e) { out = e.stdout ? e.stdout.toString() : ''; }
entities/antidoom,
raw/articles/foo). Build the path as ${slug}.md — do NOT prepend the dir again
(entities/${slug}.md double-prefixes and fixes 0 files).git diff <file> should show ONLY the
intended backfill plus restored fences — no content corruption. Lint must return to 0.git checkout.218 files (114 entity errors + 104 raw warnings) all from one source_url backfill that stripped fences. Restored all 218 → lint back to 0 errors. Warning count also dropped (320 → 209) because the 114 raw NO FRONTMATTER warnings resolved too.
obsidian-wiki-lint and wiki-maintenance cover other lint repair patterns
(broken wikilinks, missing CLOSING ---, tag corruption). This skill is the specific
"both fences stripped at scale" recovery. Prefer patching those if they become
curator-managed.