agentleFS
moltbotmoltbot/moltbot/.agents/skills/openclaw-refactor-docs/SKILL.md

openclaw-refactor-docs

Skill393k starsChanged 7 days agoMITView on GitHub

Refactor an existing OpenClaw docs page with source-audited preservation, restructuring, and verification.

We split this skill into the rules it gives an agent

30 rules. About 0 are common, 26 are distinctive, and 4 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.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user gives a target OpenClaw docs page and asks to rewrite, refactor, reorganize, split, shorten, or improve it.

    line 10
  2. Distinctive:

    If the target page is missing or ambiguous, ask one concise question before editing.

    line 31
  3. Distinctive:

    Do not treat a rewrite as permission to discard behavior facts.

    line 39
  4. Very specific:

    Read ../technical-documentation/SKILL.md first.

    line 56
  5. Very specific:

    Run pnpm docs:list when available, then read only the target page and the likely entry points, references, or related pages needed for the …

    line 59
  6. Very specific:

    Before editing, decide the intended page type from technical-documentation.

    line 64
  7. Distinctive:

    If the current page mixes page types, choose the main page type and plan where the other material belongs:

    line 66
  8. Distinctive:

    Keep concise routing, decision, and safety details in the main page when readers need them to complete the workflow.

    line 72
  9. Distinctive:

    Create a working inventory from the old page before rewriting.

    line 77
  10. Distinctive:

    Keep it in the refactored target page.

    line 92
  11. Distinctive:

    Delete it because current source proves it is obsolete or out of scope.

    line 95
  12. Distinctive:

    Do not infer defaults, permissions, policy, timeout behavior, or safety posture from names or intent.

    line 97
  13. Distinctive:

    Use the nearest authoritative source for each behavior-sensitive claim:

    line 102
  14. Distinctive:

    If a page promises a reference, compare its tables against the schema, manifest, CLI help, generated docs, or exported types.

    line 114
  15. Distinctive:

    When moving detail out of the target page, record the destination before editing:

    line 120
  16. Distinctive:

    Avoid duplicate truth. If the same contract appears in multiple places, choose one canonical page and link to it.

    line 129
  17. Distinctive:

    Put the recommended path before alternatives.

    line 137
  18. Distinctive:

    Keep only decision-making and common operational detail in the main flow.

    line 138
  19. Distinctive:

    Add troubleshooting from observable symptoms, not internal guesses.

    line 142
  20. Very specific:

    Add doc-schema-version: 1 to the YAML frontmatter of every docs page that the refactor migrates, creates, or materially rewrites.

    line 145
  21. Distinctive:

    Do not leave placeholders such as "TODO", "TBD", or "see docs" unless the user explicitly asks for a draft.

    line 151
  22. Distinctive:

    After editing, compare the old and new page:

    line 156
  23. Distinctive:

    Check that the main page still covers the 80/20 scenario end to end.

    line 160
  24. Distinctive:

    Check that reference pages remain exhaustive for the scope they claim.

    line 161
  25. Distinctive:

    Check that links from the target page reach moved details.

    line 162
  26. Distinctive:

    Check that headings are stable, searchable, and action-oriented.

    line 163
  27. Distinctive:

    If the refactor deliberately removes relevant material, say where it went or why it was removed in the final report.

    line 165
  28. Distinctive:

    Run the smallest reliable docs checks for the touched surface:

    line 170
  29. Distinctive:

    Run commands and examples from the page whenever feasible.

    line 182
  30. Distinctive:

    Do not include a long rewrite diary.

    line 195

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

OpenClaw Refactor Docs

Overview

Use this skill when the user gives a target OpenClaw docs page and asks to rewrite, refactor, reorganize, split, shorten, or improve it.

This skill builds on technical-documentation: use that skill for style, page types, structure, examples, discoverability, and verification. This skill adds the rewrite workflow needed to avoid losing accurate behavior during a major docs refactor.

Inputs

Required:

  • A target docs page path, such as docs/plugins/codex-harness.md.

Optional:

  • Desired page type, such as topic page, guide, reference, or troubleshooting.
  • Specific goals, such as shorter main page, move details to reference pages, or align with current CLI behavior.
  • Related source files, schemas, commands, tests, specs, or PRs.

If the target page is missing or ambiguous, ask one concise question before editing. Otherwise, proceed.

Working Contract

Refactor the target page to be more useful, concise, and comprehensive within its stated scope.

Do not treat a rewrite as permission to discard behavior facts. Preserve, verify, move, or explicitly retire existing material. Incorrect docs are worse than verbose docs.

Prefer this split:

  • Topic or guide pages cover the 80/20 path, decisions readers must make, safe setup, smallest reliable verification, common failures, and links onward.
  • Reference pages cover exhaustive fields, defaults, enums, limits, precedence rules, API contracts, narrow internals, and rare debugging details.
  • Troubleshooting pages start from observable symptoms and map to checks, causes, and fixes.

Workflow

1. Load the doc standard

Read ../technical-documentation/SKILL.md first. Apply its page-type, style, examples, navigation, and verification guidance throughout the refactor.

Run pnpm docs:list when available, then read only the target page and the likely entry points, references, or related pages needed for the refactor.

2. Classify the page

Before editing, decide the intended page type from technical-documentation.

If the current page mixes page types, choose the main page type and plan where the other material belongs:

  • Move exhaustive contracts to an existing or new reference page.
  • Move symptom-driven material to an existing or new troubleshooting page.
  • Move narrow setup workflows to a guide when they interrupt the main path.
  • Keep concise routing, decision, and safety details in the main page when readers need them to complete the workflow.

3. Preserve and audit existing facts

Create a working inventory from the old page before rewriting. Include:

  • Config fields, flags, commands, slash commands, env vars, defaults, enums, nullable values, and constraints.
  • Precedence rules, fallback behavior, caps, limits, rate limits, timeouts, lifecycle states, queueing behavior, and compatibility rules.
  • Auth, permission, approval, sandbox, safety, privacy, and destructive-action behavior.
  • Setup requirements, supported versions, dependencies, operating systems, credentials, and account requirements.
  • Error messages, troubleshooting symptoms, diagnostics, and recovery steps.
  • Examples, expected output, command routing tables, and cross-links.

For each fact, choose one outcome:

  • Keep it in the refactored target page.
  • Move it to a specific existing page.
  • Move it to a specific new page.
  • Delete it because current source proves it is obsolete or out of scope.

Do not infer defaults, permissions, policy, timeout behavior, or safety posture from names or intent. Verify them.

4. Find source of truth

Use the nearest authoritative source for each behavior-sensitive claim:

  • Public schema, plugin manifest, generated config docs, or exported types for config fields.
  • CLI implementation, slash-command handlers, help text, and command tests for commands and flags.
  • Runtime source and tests for lifecycle, queueing, permission, fallback, timeout, and provider behavior.
  • Protocol docs, SDK facades, and contract tests for APIs and plugin surfaces.
  • Existing docs only as secondary evidence unless the target is purely conceptual.

If a page promises a reference, compare its tables against the schema, manifest, CLI help, generated docs, or exported types. Missing public fields, defaults, precedence rules, caps, or side effects are correctness bugs.

5. Plan moved material

When moving detail out of the target page, record the destination before editing:

  • Existing page: name the page and section.
  • New page: choose the page type, slug, title, frontmatter summary, doc-schema-version: 1, and read_when hints.
  • Target page: keep a short summary and link from the point where readers need the deeper detail.

Avoid duplicate truth. If the same contract appears in multiple places, choose one canonical page and link to it.

6. Rewrite

Rewrite in this order:

  1. Make the first screen answer what the reader can do and why this page exists.
  2. Put the recommended path before alternatives.
  3. Keep only decision-making and common operational detail in the main flow.
  4. Move exhaustive tables and rare details to the planned reference pages.
  5. Preserve concise routing tables when they help readers choose commands, config paths, harnesses, plugins, providers, or references.
  6. Add troubleshooting from observable symptoms, not internal guesses.
  7. Link related concepts, guides, references, diagnostics, and adjacent tools.

Add doc-schema-version: 1 to the YAML frontmatter of every docs page that the refactor migrates, creates, or materially rewrites. Apply it only to docs page files, not docs.json, glossary JSON, or other non-page metadata. If a migrated page is generated, update the generator so regeneration preserves the marker instead of hand-editing generated output.

Do not leave placeholders such as "TODO", "TBD", or "see docs" unless the user explicitly asks for a draft.

7. Compare old and new

After editing, compare the old and new page:

  • Confirm all behavior-sensitive facts were kept, moved, or intentionally deleted with source-backed reason.
  • Check that the main page still covers the 80/20 scenario end to end.
  • Check that reference pages remain exhaustive for the scope they claim.
  • Check that links from the target page reach moved details.
  • Check that headings are stable, searchable, and action-oriented.

If the refactor deliberately removes relevant material, say where it went or why it was removed in the final report.

8. Verify

Run the smallest reliable docs checks for the touched surface:

  • pnpm docs:list
  • git diff --check -- <touched-files>
  • Targeted pnpm exec oxfmt --check --threads=1 <touched-files>
  • pnpm docs:check-mdx
  • pnpm docs:check-links
  • pnpm docs:check-i18n-glossary when link text, navigation, labels, or glossary surfaces changed
  • Generated-doc checks when schemas, generated config docs, API docs, or generated baselines are touched

Run commands and examples from the page whenever feasible. If you cannot verify a behavior-sensitive claim, either remove the claim, mark the uncertainty in the work-in-progress report, or ask for the missing source.

Final Report

Report:

  • What changed in the target page.
  • What details moved and their destination pages.
  • What source-of-truth checks backed behavior-sensitive claims.
  • What validation ran and what failed for unrelated reasons.

Do not include a long rewrite diary. Lead with remaining risks only if there are any.

Download now (ZIP)

Trending

Quiet since March.about the whole repository

Dec 2025: 0 mentionsJan 2026: 48 mentionsFeb 2026: 5 mentionsMar 2026: 1 mentionApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the moltbot/moltbot repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about moltbot/moltbot

The biggest 5 of 54 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 54

Talked about on GitHub, the web, Bluesky and Hacker News (54 times).

On GitHub · 32

27 more on GitHub

On the web · 14

9 more on the web

On Bluesky · 5

On Hacker News · 3

Does it work?

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

Reviews can't be read right now.

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.