agentleFS
po4ykapo4yka/llm-wiki-skills/skills/llm-wiki-refactor/SKILL.md

llm-wiki-refactor

Skill3 starsChanged 5 months agoMITView on GitHub

Refactor an existing docs folder, Obsidian vault, or messy note collection into an LLM-Wiki structure. Use for applying an approved migration plan, with frontmatter normalization, raw/wiki separation, link repair, and review-safe restructuring; route no-write migration planning to llm-wiki-migration-planner.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 11 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not use this skill for planning-only work with no filesystem writes.

    line 23
  2. Distinctive:

    If no backup/git exists, produce a migration plan only.

    line 44
  3. Distinctive:

    Do not move files immediately.

    line 76
  4. Distinctive:

    When the user approves apply mode:

    line 89
  5. Distinctive:

    add or normalize frontmatter.

    line 94
  6. Very specific:

    create wiki/index.md and wiki/log.md if missing.

    line 95
  7. Very specific:

    run wiki-lint and re-verify that internal links resolve after each batch, before moving on to the next one.

    line 96
  8. Distinctive:

    Do not rewrite these sections.

    line 107
  9. Distinctive:

    No deletion without explicit confirmation.

    line 129
  10. Distinctive:

    No apply mode without git or backup.

    line 130
  11. Distinctive:

    No silent conversion of wikilinks to Markdown links.

    line 131
  12. Distinctive:

    No flattening of raw sources into summaries.

    line 132
  13. Distinctive:

    No bulk frontmatter migration without dry-run.

    line 133

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

LLM-Wiki Refactor

Goal

Reorganize existing documents into a safe LLM-Wiki without losing provenance, breaking links, or overwriting human synthesis.

When to use

  • The user has an approved migration plan and wants to physically reorganize an existing docs folder, Obsidian vault, or note collection into LLM-Wiki structure.
  • Existing notes contain human-authored synthesis, Obsidian wikilinks, or attachments that must survive the move without breaking.
  • The user needs frontmatter normalized, raw/wiki content separated, or protected pages preserved during restructuring.
  • Do not use this skill for planning-only work with no filesystem writes; route that to llm-wiki-migration-planner instead.

Inputs

  • Existing docs/vault/repository path.
  • Desired target: personal vault, repo wiki, team knowledge base or product prototype.
  • Whether changes should be dry-run only or applied.
  • Existing conventions: folders, tags, frontmatter, wikilinks, docs generator.

Procedure

1. Preflight

Before applying changes:

  • confirm git or backup exists;
  • identify generated vs human-authored content;
  • identify sensitive data;
  • detect Obsidian wikilinks and attachments;
  • find existing indexes, READMEs, ADRs, changelogs and source folders.

If no backup/git exists, produce a migration plan only.

2. Inventory

Produce counts by file type and rough category:

  • raw sources;
  • source summaries;
  • entity/concept pages;
  • project docs;
  • decisions/ADRs;
  • query-like notes;
  • assets;
  • unknown or mixed files.

3. Propose target mapping

Default mapping:

original raw documents -> raw/sources/
images/media/assets    -> raw/assets/
source summaries       -> wiki/sources/
people/orgs/tools      -> wiki/entities/
mechanisms/ideas       -> wiki/concepts/
trade-off docs         -> wiki/comparisons/
reviewed conclusions   -> wiki/synthesis/
chat/research answers  -> wiki/queries/

4. Create a dry-run plan

Do not move files immediately. Produce:

## Migration plan

| Current path | Proposed path | Page type | Confidence | Notes |
|---|---|---|---:|---|

Flag low-confidence moves and protected pages.

5. Apply in batches only when approved

When the user approves apply mode:

  • create a branch;
  • move files in small batches;
  • preserve links and attachments;
  • add or normalize frontmatter;
  • create wiki/index.md and wiki/log.md if missing;
  • run wiki-lint and re-verify that internal links resolve after each batch, before moving on to the next one.

6. Preserve human synthesis

Detect and preserve sections such as:

  • ## My synthesis
  • ## Opinion
  • ## Notes to self
  • <!-- human-owned:start -->

Do not rewrite these sections. Add protected markers if useful.

Output

## Refactor summary

## Inventory

## Proposed structure

## Migration table

## High-risk items

## Commands or file operations

## Post-migration lint findings

Safety gates

  • No deletion without explicit confirmation.
  • No apply mode without git or backup.
  • No silent conversion of wikilinks to Markdown links.
  • No flattening of raw sources into summaries.
  • No bulk frontmatter migration without dry-run.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.