Agent skill

Openclaw Refactor Docs

by openclaw in openclaw/openclaw

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

MITAuto-check passedDevelopment

Install Openclaw Refactor Docs

skills CLI
$ npx skills add openclaw/openclaw --skill openclaw-refactor-docs -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install openclaw/openclaw openclaw-refactor-docs --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/openclaw/openclaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/openclaw-refactor-docs .claude/skills/openclaw-refactor-docs && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
openclaw-refactor-docs
GitHub stars
392k
Token cost
~1.9k tokens
SKILL.md length
1,063 words
Files
1
Skills in repo
97
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 8 steps: Load the doc standard → Classify the page → Preserve and audit existing facts → …
  • Tasks that involve Refactoring
  • SKILL.md covers Overview, Inputs, Working Contract and Workflow, plus 1 more section
  • Calls pnpm and git

What it does

Openclaw Refactor Docs is an agent skill from openclaw/openclaw. Refactor an existing OpenClaw docs page with source-audited preservation, restructuring, and verification.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Refactoring. The repository describes itself as: The AI that really does things. Any OS. Any Platform. The lobster way. 🦞. The licence is MIT.

When your agent uses it

  • Tasks that involve Refactoring

Example prompts

  • “/openclaw-refactor-docs”

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Load the doc standard
  2. Classify the page
  3. Preserve and audit existing facts
  4. Find source of truth
  5. Plan moved material
  6. Rewrite
  7. Compare old and new
  8. Verify

What it can do on your machine

Read from SKILL.md and the folder at commit 3193e15. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Openclaw Refactor Docs loads about 1.9k tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 1,063 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~32
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from openclaw/openclaw at commit 3193e15, republished under its MIT licence (© openclaw). 1,063 words, ~1,918 tokens.

Download SKILL.mdSave it as .claude/skills/openclaw-refactor-docs/SKILL.md (or your agent's skills folder).
name
openclaw-refactor-docs
description
Refactor an existing OpenClaw docs page with source-audited preservation, restructuring, and verification.

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.

Show full SKILL.md (459 more words)Show less
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.

© openclaw, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/openclaw-refactor-docs of openclaw/openclaw.

Open the folder on GitHubat commit 3193e15

Compare with similar skills

Openclaw Refactor Docs next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Openclaw Refactor Docs compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Openclaw Refactor Docs this skillopenclaw/openclaw392k—~1.9kAutomated safety check: PassMIT
Guidelinesakash-network/node1.1k20 repos~577Automated safety check: PassMIT
Migrate Core Code to Submodulestinyhumansai/openhuman42k—~2.6kAutomated safety check: PassGPL-3.0
Component Refactoringlangflow-ai/langflow155k—~3.5kAutomated safety check: PassMIT
Ponytail Lazy Developer ModeDietrichGebert/ponytail160k1 repos~873Automated safety check: PassMIT
ast-grep Structural Searchcode-yeongyu/oh-my-openagent70k—~3.3kAutomated safety check: PassMIT

Similar skills

  • Guidelines

    akash-network/node

    Behavioral guidelines to reduce common LLM coding mistakes. An agent skill from akash-network/node.

    1.1k GitHub starsUsed in 20 repos~577 tokens
    DevelopmentAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    42k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Component Refactoring

    langflow-ai/langflow

    Refactor high-complexity React components in Langflow frontend.

    155k GitHub stars~3.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Ponytail Lazy Developer Mode

    DietrichGebert/ponytail

    Makes the agent pick the laziest solution that works: skip unneeded work, reuse what exists, prefer the standard library and platform features, and keep diffs small.

    160k GitHub starsUsed in 1 repo~873 tokens
    DevelopmentAuto-check passed
  • ast-grep Structural Search

    code-yeongyu/oh-my-openagent

    Searches and rewrites code by syntax-tree shape across 25 languages with ast-grep, for codemods, structural queries and YAML lint rules, using a Python wrapper script.

    70k GitHub stars~3.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Systematic Code Refactoring

    luongnv89/claude-howto

    Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.

    42k GitHub stars~3k tokensUpdated 10 days ago
    DevelopmentAuto-check passed

More from openclaw/openclaw

All 97 skills in this repo
  • Model Usage

    openclaw/openclaw

    Summarize CodexBar local cost logs by model for Codex or Claude, including current or full breakdowns.

    392k GitHub starsUsed in 1 repo~637 tokens
    Auto-check passed
  • Openclaw Live Updater

    openclaw/openclaw

    Maintain the canonical live OpenClaw main checkout, macOS LaunchAgent-managed Gateway, local macOS app, exact-head main CI, and recurring full release validation.

    392k GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Feishu Doc

    openclaw/openclaw

    Feishu document read/write workflows. An agent skill from openclaw/openclaw.

    392k GitHub stars~516 tokensUpdated today
    Auto-check passed
  • Tmux

    openclaw/openclaw

    Control tmux sessions/panes for interactive CLIs: list, capture output, send keys, paste text, monitor prompts.

    392k GitHub starsUsed in 1 repo~640 tokens
    Auto-check passed
  • Openclaw PR Maintainer

    openclaw/openclaw

    Review, triage, repair, or land OpenClaw issues and pull requests with current-source evidence and the native maintainer workflow.

    392k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Browser Automation

    openclaw/openclaw

    A skill your agent uses when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

    392k GitHub stars~2.9k tokensUpdated today
    Auto-check passed

Categories

Questions about Openclaw Refactor Docs

What does Openclaw Refactor Docs do?

Refactor an existing OpenClaw docs page with source-audited preservation, restructuring, and verification. Openclaw Refactor Docs is an agent skill from openclaw/openclaw. Refactor an existing OpenClaw docs page with source-audited preservation, restructuring, and verification.

When should I use Openclaw Refactor Docs?

Openclaw Refactor Docs fits situations like: tasks that involve Refactoring.

How do I install Openclaw Refactor Docs in Claude Code?

Run `npx skills add openclaw/openclaw --skill openclaw-refactor-docs -a claude-code`. Or copy the skill folder (.agents/skills/openclaw-refactor-docs in openclaw/openclaw) into .claude/skills/openclaw-refactor-docs in your project. Claude Code loads it when a task matches its description.

How do I install Openclaw Refactor Docs in Codex?

Run `npx skills add openclaw/openclaw --skill openclaw-refactor-docs -a codex`. Or copy the skill folder (.agents/skills/openclaw-refactor-docs in openclaw/openclaw) into .agents/skills/openclaw-refactor-docs in your project. Codex loads it when a task matches its description.

Can I use Openclaw Refactor Docs in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add openclaw/openclaw --skill openclaw-refactor-docs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/openclaw-refactor-docs, .gemini/skills/openclaw-refactor-docs, .github/skills/openclaw-refactor-docs and .opencode/skills/openclaw-refactor-docs in your project.

What does Openclaw Refactor Docs need to run?

Going by SKILL.md and its folder, Openclaw Refactor Docs needs the command-line tools its instructions call (pnpm and git).

Does Openclaw Refactor Docs access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Openclaw Refactor Docs safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Openclaw Refactor Docs use?

Openclaw Refactor Docs is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Openclaw Refactor Docs use?

About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Openclaw Refactor Docs?

Skills that share tags, products or a category with Openclaw Refactor Docs: Guidelines (akash-network/node, 1.1k stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 42k stars), Component Refactoring (langflow-ai/langflow, 155k stars) and Ponytail Lazy Developer Mode (DietrichGebert/ponytail, 160k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Openclaw Refactor Docs?

openclaw (a GitHub organization) maintains it in openclaw/openclaw, which has 391,562 GitHub stars. The repository holds 97 skills in this directory. The repository was last updated on October 10, 2026.

Source: openclaw/openclaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.