Install
openclaw skills install compound-eng-md-docsManages project documentation: CLAUDE.md, AGENTS.md, README.md, CONTRIBUTING.md. Use when asked to update, create, or init these context files. Not for general markdown editing.
openclaw skills install compound-eng-md-docsManage project documentation by verifying against actual codebase state. Emphasize verification over blind generation -- analyze structure, files, and patterns before writing.
AGENTS.md is the universal context file (works with Claude Code, Codex, Kilocode). If the project uses CLAUDE.md, treat it as a symlink to AGENTS.md or migrate content into AGENTS.md and create the symlink:
# If CLAUDE.md exists and AGENTS.md doesn't
mv CLAUDE.md AGENTS.md && ln -sf AGENTS.md CLAUDE.md
When this skill references "context files", it means AGENTS.md (and CLAUDE.md if present as symlink).
Verify and fix AGENTS.md against the actual codebase. See update-agents.md for the full verification workflow.
ls, cat package.json, cat pyproject.toml, etc.)Generate or refresh README.md from project metadata and structure. See update-readme.md for section templates and language-specific patterns.
--preserve: keep custom sections (About, Features), regenerate standard sections (Install, Usage)Update existing CONTRIBUTING.md only -- never auto-create. See update-contributing.md.
When updating, detect project conventions automatically:
If DOCS.md exists, treat it as API-level documentation (endpoints, function signatures, type definitions). Verify against actual code the same way as AGENTS.md. Never auto-create DOCS.md -- only update existing.
Create AGENTS.md from scratch for projects without documentation. See init-agents.md.
Keep AGENTS.md / CLAUDE.md to durable signal. Do NOT enumerate:
package.json engines, .nvmrc, pyproject.toml Python constraint, composer.json PHP version. List the source-of-truth file path; do not duplicate the version inline..eslintrc, ruff.toml, phpcs.xml already enforce it, the file is the spec. List the command to run; do not paraphrase rules.The test: if a fact will be wrong in two months without anyone touching this file, it does not belong here. The file is for project-specific rules that survive tool churn.
Structure CLAUDE.md (and AGENTS.md) content by priority so the most critical information loads first when context is compacted:
package.json engines, .nvmrc, pyproject.toml, composer.json); do not duplicate the version inline.Rules that prevent mistakes outweigh background information. Place them at the top so they survive aggressive context compaction.
Claude Code's context-file loading in monorepos follows three rules -- understanding them determines where content belongs:
packages/api/AGENTS.md, apps/web/AGENTS.md).packages/a/AGENTS.md will NOT auto-load when working in packages/b/. Do not rely on sibling-package context leaking across.Implication for monorepo layouts: duplicate any rule that must apply across sibling packages into each package's AGENTS.md (or hoist it to the repo root). The loader will not discover it laterally. Conversely, avoid putting package-specific rules at the root -- they'll load into every session regardless of relevance and burn context.
All workflows support:
--dry-run: preview changes without writing--preserve: keep existing structure, fix inaccuracies only--minimal: quick pass, high-level structure only--thorough: deep analysis of all filesBefore overwriting, back up existing files:
cp AGENTS.md AGENTS.md.backup
cp README.md README.md.backup
Never delete backups automatically.
<details> blocks instead of deleting content (blank line required after <summary> for GitHub rendering).Flag during Update README workflows:
After every operation, display a summary:
[OK] Updated AGENTS.md
- Fixed build command
- Added new directory to structure
[OK] Updated README.md
- Added installation section
- Updated badges
[--] CONTRIBUTING.md not found (skipped)