Install
openclaw skills install @iliaal/compound-eng-md-docsManages project documentation: CLAUDE.md, AGENTS.md, README.md, CONTRIBUTING.md, DOCS.md. Use when asked to update, create, or init these context files. Not for general markdown editing.
openclaw skills install @iliaal/compound-eng-md-docsManage project documentation by verifying against actual codebase state -- analyze structure, files, and patterns before writing; never generate blind.
AGENTS.md is the universal context file (works with Claude Code, Codex, Kilocode). During Initialize Context or Update Context Files workflows only: if CLAUDE.md exists without AGENTS.md, confirm with the user first (Ask via AskUserQuestion (Claude Code; load with ToolSearch select:AskUserQuestion if not loaded) or request_user_input (Codex); fall back to numbered options in chat), then mv CLAUDE.md AGENTS.md && ln -sf AGENTS.md CLAUDE.md. Never migrate as a side effect of another task.
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:
Merge advisory. When CONTRIBUTING.md sits next to an AGENTS.md (repo root or any package root), surface a one-line recommendation: merge the contribution workflow section into the sibling AGENTS.md so the context file owns dev workflow, branch conventions, and review process as a single source of truth. Then suggest the user delete CONTRIBUTING.md after the merge. Never auto-merge and never auto-delete -- the user performs both. Continue the requested workflow regardless; the CONTRIBUTING file is advisory only.
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.
When a doc prescribes a machine-consumed shape (a JSON artifact, config file, or request body) that code then validates, the two drift silently and each drift costs one caller a rejected write. A test that greps the doc for key names is a second copy of the doc: it goes green when both copies are wrong together, which is the only failure that matters. Have the tool report its validators' key sets as a versioned subcommand, sourced from the same constants the validators read — a constant only the report reads is decoration — then compare the doc against that report in both directions: a documented key no validator accepts, and a required key no example shows. Guard the guard: an example nothing can classify is a failure rather than a skip, and a validated artifact with no example is a failure.
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.
What earns the space is the inverse: document what the agent cannot discover by reading the repo -- the unwritten convention, the reason behind a choice, the gotcha no config file confesses. The environment is a source of truth too, so a section restating it is a cache, and a cache earns its load only when the lookup is expensive. Naming the one test command among forty package.json scripts is an expensive lookup and belongs here (see Commands below); a raw ls -R dump or a paraphrase of --help is a cheap one the agent can re-derive on demand. A curated structure note -- what a new top-level directory is for -- is not the same thing, and still belongs here.
Treat fewer words as an optimization signal, not an acceptance criterion. Before condensing or merging rules in a context file, capture a baseline and predeclare the decisions the file exists to control: request authority, external actions, when to ask, proof standards, failure attribution. Compare baseline and candidate on the same cases; any safety, authority, or honesty regression rejects the candidate however much smaller it is. Prefer merging duplicated rules and deleting procedural restatement; preserve exact wording where it is what changes behavior. Change one rule group at a time, and add a case when a new failure mode appears rather than growing the file pre-emptively.
Structure CLAUDE.md (and AGENTS.md) content by priority so the most critical information loads first when context is compacted:
Rules that prevent mistakes outweigh background information.
Multi-package repo? Read monorepo.md before any update-*/init-* sweep (discovery commands, per-file scoping, context-loading rules). Enumerate targets; if the sweep would create or rewrite more than 3 files, stop: list planned targets and confirm before writing (same ask mechanism as in Portability above).
Treat these as user-request modifiers: apply when the request contains the flag or equivalent phrasing. All workflows support:
--dry-run: preview changes as a diff, write nothing--preserve: keep existing structure, fix inaccuracies only--minimal: quick pass, high-level structure only--thorough: deep analysis of all filesBefore overwriting: cp FILE FILE.backup; never auto-delete backups.
must/never for requirements, should/may for latitude. A requirement phrased as "should" reads as optional and gets skipped.PR-120, issue 99) is the usual failure — it gets treated as the real ID by everything downstream and fans out into every artifact built from that file. Write the canonical form (owner/repo#N), and re-verify state claims ("merged", "fixed in") before publishing, since those rot fastest. One lookup per cited ID is cheaper than correcting the same wrong link in N places after it ships.<details> blocks instead of deleting content (blank line required after <summary> for GitHub rendering).Flag during Update README workflows:
docs/, and CHANGELOG, release notes, migration guides, and decision records are exempt -- being version-scoped is their purposeAfter 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)