agentleFS
EasyJoy-TechnologiesEasyJoy-Technologies/openclaw-skills/skills/magic-docs/SKILL.md

magic-docs

Skill1 starsChanged 8 months agoMITView on GitHub

Automatically maintain markdown documentation files marked with a MAGIC DOC header. When a file containing "MAGIC DOC:" is read or mentioned, update it with new information from the current conversation. Use when asked to "create a magic doc", "auto-update this doc", "keep this document current", "maintain documentation", or when encountering a file with a MAGIC DOC header. Also use for creating self-maintaining documentation like port lists, API references, architecture overviews, or runbooks.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 10 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When user asks to create a self-maintaining document:

    line 27
  2. Distinctive:

    Create the file with the MAGIC DOC header

    line 29
  3. Distinctive:

    Add optional instruction line in italics

    line 30
  4. Distinctive:

    When new information relevant to a Magic Doc is discovered during a conversation:

    line 54
  5. Distinctive:

    Read the current Magic Doc content

    line 61
  6. Distinctive:

    Update the "Last updated" timestamp at the bottom

    line 65
  7. Distinctive:

    Only add information that was verified during the conversation (not guessed)

    line 68
  8. Distinctive:

    If an existing entry is outdated, update it and note the change

    line 70
  9. Very specific:

    Add a "Last updated" line at the bottom: *Last updated: YYYY-MM-DD by magic-docs*

    line 71
  10. Distinctive:

    Do not reorganize the entire document — make minimal, targeted edits

    line 72
  11. Distinctive:

    If the document grows beyond 200 lines, suggest splitting into sections with references

    line 73

≈ “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

Magic Docs — Self-Maintaining Documentation

Automatically maintain documentation files marked with a special header. When a Magic Doc is encountered, update it with relevant new information discovered during the conversation.

Magic Doc Format

A Magic Doc is any markdown file whose first line matches:

# MAGIC DOC: <Title>

Optional second line (italics) provides update instructions:

# MAGIC DOC: Service Port Map
_Update whenever a new service, port, or domain is discovered_

Creating a New Magic Doc

When user asks to create a self-maintaining document:

  1. Create the file with the MAGIC DOC header
  2. Add optional instruction line in italics
  3. Populate with current known information
  4. Inform the user that this doc will be updated automatically when relevant information appears in conversation

Example:

# MAGIC DOC: Project Architecture
_Update when new services, dependencies, or architectural decisions are discovered_

## Services
- **OpenClaw Gateway**: port 18789, loopback
- **WeCom Bridge**: port 9000, loopback

## Dependencies
- Node.js v24
- Nginx (custom build at /usr/local/nginx)

---
*Last updated: 2026-03-31 by magic-docs*

Updating a Magic Doc

When new information relevant to a Magic Doc is discovered during a conversation:

Detection

  • The document was read earlier in the conversation
  • New facts related to its topic were discovered (new port, new service, config change, etc.)

Update Process

  1. Read the current Magic Doc content
  2. Identify new information from the conversation that belongs in the document
  3. Determine where it fits in the existing structure
  4. Apply the update using file edit (preserve existing structure)
  5. Update the "Last updated" timestamp at the bottom

Update Rules

  • Only add information that was verified during the conversation (not guessed)
  • Preserve existing entries unless they are confirmed outdated
  • If an existing entry is outdated, update it and note the change
  • Add a "Last updated" line at the bottom: *Last updated: YYYY-MM-DD by magic-docs*
  • Do not reorganize the entire document — make minimal, targeted edits
  • If the document grows beyond 200 lines, suggest splitting into sections with references

Good Candidates for Magic Docs

DocumentUpdate Trigger
Service port mapNew service deployed, port changed
Domain/URL referenceNew domain configured, URL changed
Docker container listContainer added/removed/updated
Deploy runbookDeploy process changed
API endpoint referenceNew endpoint added, signature changed
Dependency inventoryPackage added/upgraded/removed
Architecture overviewNew component, changed integration
Troubleshooting guideNew failure mode discovered and solved

Not Good Candidates

  • Files that change via git commits (the source of truth is git, not conversation)
  • Files with strict formatting requirements (generated configs, JSON, YAML)
  • Temporary notes (use session-summary instead)

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.