# Wiki Fold

Create a bounded, extractive, structurally idempotent rollup of recent Obsidian wiki...

- Repository: https://github.com/AgriciDaniel/claude-obsidian (16054 stars)
- Category: Git and review
- License: MIT
- Last updated: 2026-10-25
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add AgriciDaniel/claude-obsidian --skill wiki-fold -g -a claude-code -y`
Codex: `npx skills add AgriciDaniel/claude-obsidian --skill wiki-fold -g -a codex -y`
Cursor: `npx skills add AgriciDaniel/claude-obsidian --skill wiki-fold -g -a cursor -y`
Gemini CLI: `npx skills add AgriciDaniel/claude-obsidian --skill wiki-fold -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add AgriciDaniel/claude-obsidian`

## Description

Create a bounded, extractive, structurally idempotent rollup of recent Obsidian wiki log entries, with dry-run preview by default and one optional transaction apply. Use for manual log compression without modifying child pages. Triggers: fold the log, run a fold, run wiki-fold, log rollup, roll up log entries, commit the fold.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Extractive log fold

Create an additive rollup of raw `wiki/log.md` entries. Never modify, move, or
delete child entries or their pages. Do not perform fold-of-folds or trigger a
fold automatically.

Resolve the portable core from this skill's installation. Resolve the user vault
by explicit `--vault`, `CLAUDE_OBSIDIAN_VAULT`, workspace config, then
current-directory discovery. Never treat the plugin/product root as a vault.

```bash
PRODUCT_ROOT=/absolute/path/to/installed/claude-obsidian
CORE="$PRODUCT_ROOT/scripts/claude-obsidian.py"
test -f "$CORE"
```

Every `../wiki/references/` link in this file resolves the same way, relative
to this skill's own directory under `$PRODUCT_ROOT`, never relative to the
selected vault's `wiki/` directory.

This skill needs no network egress. Do not call external services.

## Select a bounded range

Use batch exponent `k` with size `2^k`; default to `k=4`. An explicit entry range
may override it. If fewer entries exist than requested, report the shortfall and
stop rather than folding a partial batch.

Read the selected log entries completely. Read referenced child pages only when
the log lacks enough context: target 0-10 reads, hard ceiling 15. Missing pages
remain explicit `page_missing` records.

Derive the structural ID only from inputs:

```text
fold-k{K}-from-{EARLIEST-DATE}-to-{LATEST-DATE}-n{COUNT}
```

If `wiki/folds/{FOLD_ID}.md` already exists, return a no-op. Replacing it requires
an explicit force request and a separately reviewed `replace` proposal.

## Draft extractively

Follow [fold-template.md](references/fold-template.md). Every child log entry must
have one deterministic `child_key` in frontmatter and exactly one matching row
in the Child Entries table. Do not deduplicate children by page, although the
final Child Pages link list may be deduplicated.

The rest: https://github.com/AgriciDaniel/claude-obsidian/blob/HEAD/skills/wiki-fold/SKILL.md
