agentleFS
scchearnscchearn/agent-skills/skills/do-wiki-add/SKILL.md

do-wiki-add

Skill0 starsChanged 6 months agoApache-2.0View on GitHub

Read a local source file or synthesize conversation context, then integrate the content directly into topic, entity, concept, and analysis pages in an existing Obsidian-friendly markdown wiki. Use this when the user wants to add a source to the wiki, add a document, ingest a local note, transcript, article, report, or PDF, or explicitly preserve the current conversation as a topic note. Not for proposal-first session learnings that directly update existing pages; use /do-wiki-learnings.

The file

Show its rules and text

We split this skill into the rules it gives an agent

39 rules. About 0 are common, 26 are distinctive, and 13 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈26

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 13

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the user wants a proposal-first review of session learnings that directly updates existing pages, use /do-wiki-learnings instead.

    line 23
  2. Distinctive:

    Use the argument plus the current workspace to identify the source file or a very small intended batch of related files.

    line 35
  3. Distinctive:

    Prefer an exact local path when the user provided one.

    line 39
  4. Very specific:

    If the user gave a title or description instead of a path, search for the best candidate under likely raw-source locations such as raw/, …

    line 40
  5. Distinctive:

    If more than one candidate is plausible, ask the smallest follow-up question needed.

    line 41
  6. Distinctive:

    If the user clearly requested a large batch, stop and ask them to narrow it or to run repeated adds.

    line 42
  7. Distinctive:

    If the workspace uses a different but clearly established wiki root, reuse it.

    line 53
  8. Distinctive:

    If multiple wiki roots are present and the target is ambiguous, ask the smallest possible follow-up question.

    line 55
  9. Distinctive:

    If no existing wiki can be found, stop and recommend:

    line 57
  10. Very specific:

    If $ARGUMENTS resolves to an existing local file (or is clearly a file path with an extension), use file mode.

    line 65
  11. Very specific:

    If $ARGUMENTS does not resolve to a file and instead looks like a topic, question, or natural-language summary, use chat-context mode.

    line 66
  12. Distinctive:

    If ambiguous, ask the user: "Did you mean a local file path, or should I synthesize from our conversation?"

    line 67
  13. Very specific:

    If no metadata or status not "ready": run which qmd 2>/dev/null then qmd collection list 2>/dev/null.

    line 72
  14. Distinctive:

    If qmd is still not ready: use Grep/Glob to find existing notes.

    line 73
  15. Very specific:

    If qmd is ready, read ${CLAUDE_SKILL_DIR}/references/qmd-usage.md for finding existing related notes.

    line 76
  16. Very specific:

    if chat-context mode: ${CLAUDE_SKILL_DIR}/references/chat-context-ingest.md

    line 87
  17. Distinctive:

    Always read the actual candidate pages before editing.

    line 93
  18. Very specific:

    File mode: Read the source file carefully.

    line 97
  19. Distinctive:

    Treat the wiki as a compiled artifact that must stay internally coherent.

    line 105
  20. Distinctive:

    Only touch pages materially affected by the source.

    line 111
  21. Distinctive:

    If an important entity, concept, or topic lacks a dedicated page, create a minimal canonical note.

    line 112
  22. Distinctive:

    Prefer small linked updates over copying the same summary text into many pages.

    line 113
  23. Distinctive:

    If the new source contradicts an existing page, make the conflict explicit.

    line 114
  24. Distinctive:

    If the new source supersedes an old claim, say so clearly.

    line 115
  25. Very specific:

    Update reciprocal links under Related pages or Mentioned in when materially useful.

    line 116
  26. Very specific:

    Avoid isolated durable notes.

    line 117
  27. Very specific:

    Update index.md so every durable page touched remains discoverable with a one-line description.

    line 137
  28. Very specific:

    If qmd was ready and you wrote to the wiki, run qmd update -c <collection> 2>/dev/null.

    line 157
  29. Distinctive:

    Avoid overstating weak evidence.

    line 167
  30. Distinctive:

    Never rewrite raw-source files.

    line 168
  31. Distinctive:

    If the source was already represented and you refreshed it, say so explicitly.

    line 203
  32. Distinctive:

    Prefer one source per run.

    line 211
  33. Distinctive:

    Read the wiki schema before editing.

    line 212
  34. Distinctive:

    If qmd is ready, use it for finding existing related notes.

    line 213
  35. Distinctive:

    Never edit a wiki page based only on qmd output.

    line 214
  36. Very specific:

    Update index.md and log.md on every add.

    line 217
  37. Distinctive:

    Do not leave avoidable broken wikilinks after the add pass.

    line 219
  38. Distinctive:

    Prefer incremental linked updates over large rewrites.

    line 222
  39. Distinctive:

    After wiki writes, refresh qmd if the collection is ready.

    line 224

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

You are a senior engineer and disciplined wiki maintainer working in the current workspace. Your job is to compile content into the persistent wiki so future sessions inherit the knowledge instead of rediscovering it.

The target output is an Obsidian-friendly note graph:

  • canonical kebab-case filenames for durable category notes
  • internal links written as [[kebab-case-note-name]]
  • small linked topic, entity, concept, and analysis notes
  • reciprocal backlinks where the relationship is materially useful

This skill supports two modes: file mode (local file ingestion) and chat-context mode (synthesize from the current conversation into topic/entity/concept pages). Do not fetch URLs directly in this skill.

If the user wants a proposal-first review of session learnings that directly updates existing pages, use /do-wiki-learnings instead.

Input

The content to add is: $ARGUMENTS


Step 1 — Resolve source, wiki & discover related notes

Source resolution

Use the argument plus the current workspace to identify the source file or a very small intended batch of related files.

Rules:

  1. Prefer an exact local path when the user provided one.
  2. If the user gave a title or description instead of a path, search for the best candidate under likely raw-source locations such as raw/, research/, docs/, notes/, or similar directories.
  3. If more than one candidate is plausible, ask the smallest follow-up question needed.
  4. If the user clearly requested a large batch, stop and ask them to narrow it or to run repeated adds. This skill is optimized for one source at a time.

Wiki resolution

Find the existing wiki by looking for files such as:

  • wiki/SCHEMA.md
  • wiki/index.md
  • wiki/log.md
  • wiki/overview.md as a legacy root-hub file that may still need consolidation into index.md

If the workspace uses a different but clearly established wiki root, reuse it.

If multiple wiki roots are present and the target is ambiguous, ask the smallest possible follow-up question.

If no existing wiki can be found, stop and recommend:

/do-wiki-build <topic or wiki goal>

Mode detection

  1. If $ARGUMENTS resolves to an existing local file (or is clearly a file path with an extension), use file mode.
  2. If $ARGUMENTS does not resolve to a file and instead looks like a topic, question, or natural-language summary, use chat-context mode.
  3. If ambiguous, ask the user: "Did you mean a local file path, or should I synthesize from our conversation?"

Check qmd readiness

  1. Glob for .wiki-metadata.json. If found, read it immediately. If retrieval.status is "ready", qmd is ready — use retrieval.collection_name and skip to discovery below. Do not run fallback checks.
  2. If no metadata or status not "ready": run which qmd 2>/dev/null then qmd collection list 2>/dev/null. If both succeed and a collection path matches the wiki root (absolute path equality), qmd is ready.
  3. If qmd is still not ready: use Grep/Glob to find existing notes.
  4. Runtime guard: if any qmd command fails or returns stale results, treat as degraded — fall back to Grep/Glob.

If qmd is ready, read ${CLAUDE_SKILL_DIR}/references/qmd-usage.md for finding existing related notes.

Read the wiki contract & discover related notes

Read before editing:

  1. <wiki root>/SCHEMA.md
  2. <wiki root>/index.md
  3. the most recent relevant parts of <wiki root>/log.md
  4. any existing topic/entity/concept pages that look directly related to the source
  5. ${CLAUDE_SKILL_DIR}/references/ingest-checklist.md
  6. if chat-context mode: ${CLAUDE_SKILL_DIR}/references/chat-context-ingest.md

If qmd is ready, follow references/qmd-usage.md to find existing related notes before editing.

If qmd is not ready, use Grep and Glob to find existing notes that mention the same entities, topics, or concepts.

Always read the actual candidate pages before editing.

Read the source

File mode: Read the source file carefully. Distinguish facts, claims/interpretations, open questions, and entities/concepts/topics to link. When the source is large, read enough for a faithful summary and use targeted follow-up reads for the most relevant sections.

Chat-context mode: Synthesize the current conversation context. Distinguish decisions/facts, claims not fully settled, open questions, and entities/concepts/topics to link. Err toward uncertainty. Prefer "X was discussed as a likely approach" over "X is the approach."


Step 2 — Update the wiki incrementally

Treat the wiki as a compiled artifact that must stay internally coherent.

A. Related pages

Synthesize the source's content directly into the most relevant topic, entity, concept, or analysis pages. Graph fan-out is required, not optional.

  1. Only touch pages materially affected by the source.
  2. If an important entity, concept, or topic lacks a dedicated page, create a minimal canonical note.
  3. Prefer small linked updates over copying the same summary text into many pages.
  4. If the new source contradicts an existing page, make the conflict explicit.
  5. If the new source supersedes an old claim, say so clearly.
  6. Update reciprocal links under Related pages or Mentioned in when materially useful.
  7. Avoid isolated durable notes. Every new note should be reachable from index.md or another durable note.
  8. For file mode: note the source path in relevant pages where it materially aids retrieval (e.g., in a ## References or ## Source material section).
  9. For chat-context mode: mark conversation-sourced claims with appropriate uncertainty (discussed, suggested, agreed in conversation).

Minimal new-note shape:

# Human Readable Title

## Summary

<short durable summary>

## Related pages

- [[another-note]]

B. Index

Update index.md so every durable page touched remains discoverable with a one-line description. Use grouped [[wikilinks]] where appropriate.

C. Log

Append a new entry to log.md:

File mode:

## [YYYY-MM-DD] add (file) | <source title>

Chat-context mode:

## [YYYY-MM-DD] add (chat) | <topic>

Capture: the source path or conversation topic, pages created or updated, important contradictions, gaps, or follow-up leads.

D. Refresh qmd after writes

If qmd was ready and you wrote to the wiki, run qmd update -c <collection> 2>/dev/null. If refresh fails, report it but do not roll back wiki edits.


Step 3 — Preserve uncertainty

  • For file mode: note the source path in relevant pages where it materially aids retrieval.
  • For chat-context mode: note the conversation date in relevant pages where appropriate.
  • Make uncertainty explicit.
  • Separate the source's claims from the wiki's cross-source synthesis when they differ.
  • Avoid overstating weak evidence.
  • Never rewrite raw-source files.

Step 4 — Report back

Wiki updated from <source path or conversation topic>

### Mode

- file | chat

### Touched pages

- <path>

### New pages

- <path>

### Index and log

- Index: <path>
- Log: <path>

### Open questions

- <question or "none">

### Next useful command

- `/do-wiki-add <another local source path or topic>`

If the source was already represented and you refreshed it, say so explicitly.


Rules

  • File mode: local files only. Do not fetch URLs.
  • Chat-context mode: synthesize from the current conversation context only.
  • Prefer one source per run.
  • Read the wiki schema before editing.
  • If qmd is ready, use it for finding existing related notes; otherwise fall back to Grep/Glob.
  • Never edit a wiki page based only on qmd output. Always read the actual wiki files first.
  • Durable category notes use canonical kebab-case filenames.
  • Internal note links use [[kebab-case-note-name]].
  • Update index.md and log.md on every add.
  • Raw-source files are immutable.
  • Do not leave avoidable broken wikilinks after the add pass.
  • Strengthen reciprocal links when the relationship is materially useful.
  • Make contradictions and stale claims explicit.
  • Prefer incremental linked updates over large rewrites.
  • In chat-context mode, conversation-sourced claims carry less authority. Mark uncertainty explicitly.
  • After wiki writes, refresh qmd if the collection is ready. If refresh fails, report it but do not roll back.

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.