agentleFS
DeL-TaiseiOzakiDeL-TaiseiOzaki/claude-code-orchestra/.claude/skills/update-lib-docs/SKILL.md

update-lib-docs

Skill199 starsChanged 2 months agoMITView on GitHub

Update library documentation in .claude/docs/libraries/ with latest information from web search.

2 other projects use a version of this, 2 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 3 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Update documentation in .claude/docs/libraries/ with latest information.

    line 9
  2. Very specific:

    Run lib_inventory.py instead of eyeballing the directory — it scans each doc's > Last Updated / > Version Checked metadata, resolves the …

    line 15
  3. Very specific:

    Update > Version Checked: to the inventory's locked_version (or the version satisfying declared_spec when nothing is locked)

    line 85
  4. Very specific:

    Update > Last Updated: to today

    line 87
  5. Distinctive:

    Add new features/constraints

    line 88
  6. Distinctive:

    Update code examples if needed

    line 90
  7. Very specific:

    After updating or creating a doc, validate it against the lib-doc contract:

    line 94
  8. Distinctive:

    After updating docs, verify:

    line 115
  9. Very specific:

    If step 5 leads to any change outside .claude/docs/libraries/, run the gates before reporting:

    line 122
  10. Very specific:

    After updating, report to the user per .claude/rules/language.md:

    line 160

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

Update Library Documentation

Update documentation in .claude/docs/libraries/ with latest information.

Steps

1. Inventory Library Docs

Run lib_inventory.py instead of eyeballing the directory — it scans each doc's > **Last Updated** / > **Version Checked** metadata, resolves the version the project declares and locks, and cross-checks declared dependencies:

python3 .claude/skills/update-lib-docs/lib_inventory.py \
  [--stale-days N] [--today YYYY-MM-DD] [--library NAME] [--project-root DIR]

Emits {ok, libraries_dir, stale_days, today, library, libraries, counts, missing_metadata, undocumented, declared_dependencies, dependencies, sources, manifest_errors, warnings, artifacts}.

FieldMeaning
libraries[]file, name, last_updated, version_checked, age_days, stale, stale_reasons, has_metadata, read_error, declared_spec, declared_in, locked_version, locked_in, ecosystem, version_drift, version_drift_basis, version_drift_note
countstotal, stale, missing_metadata, read_errors, version_drift, drift_unknown
missing_metadataDoc filenames with no Last Updated / Version Checked blockquote — invisible to staleness until fixed
undocumentedDeclared dependencies with no doc file at all
dependenciesVersion resolution per package: declared_spec + locked_version and where each came from
sourcesEvery dependency table actually parsed: file, table, ecosystem, kind (manifest/lock), dependency_count
manifest_errors{file, error} for a manifest or lockfile that failed to parse
warningse.g. a manifest with no readable dependency table, or no lockfile found

stale is the OR of two signals, and stale_reasons says which fired:

  • age — age_days > --stale-days (default 90).
  • version_drift — version_checked disagrees with locked_version, with a pinned declared_spec, or falls below the spec's lower bound. version_drift is true/false only when the comparison is decidable; null plus version_drift_note means it is not (no lockfile behind an open range, a non-numeric version). null is not "clean" — read the note.

Exit codes: 0 ok, 1 bad argument (--today not YYYY-MM-DD, --library not a package name, --project-root missing), 2 a manifest or lockfile could not be parsed, 3 a library doc could not be read. If ok is false, stop and report the manifest_errors / read_error entries — an empty scope from a broken manifest is not success.

This run's scope is the union of three lists from that output: entries with stale: true, every doc in missing_metadata, and every name in undocumented. Everything else is already current — skip it.

2. Web Search for Latest Info

For each library in scope, search for:

  • Breaking changes
  • Deprecated features
  • New features
  • Security updates
  • Newer upstream releases (an upgrade consideration, not the version recorded in the doc — > **Version Checked**: is the version this project uses, which the inventory already resolved)

3. Update Documents

Derive each doc path from the same authority research-lib uses, so an update and a creation can never disagree about the filename:

python3 .claude/skills/_shared/workspace.py --skill research-lib \
  --title "{library}" --create

Then, for each stale library, update paths.lib_doc; for each undocumented dependency, create it following the same template (see research-lib's documentation template for the full section layout):

  1. Update > **Version Checked**: to the inventory's locked_version (or the version satisfying declared_spec when nothing is locked)
  2. Update > **Last Updated**: to today
  3. Add new features/constraints
  4. Mark deprecated APIs
  5. Update code examples if needed

4. Validate Updated Documents

After updating or creating a doc, validate it against the lib-doc contract:

python3 .claude/skills/_shared/validate_doc.py --contract lib-doc \
  --file <paths.lib_doc>

Exit 0 means the four required ## sections (Overview, Core Features, Constraints & Notes, References) and the Last Updated / Version Checked metadata lines are all present. Exit 1 means the file does not exist or could not be read (there is no sections_missing on that path — check the path before editing anything). Exit 2 means the doc violates the contract: sections_missing lists absent sections, metadata_missing lists absent metadata lines. Fill both in; do not report the update as complete with either non-empty.

Re-running step 1 is the completion check: a doc you updated must no longer appear in stale, missing_metadata, or undocumented.

5. Check Impact on Code

After updating docs, verify:

  • Using any deprecated APIs?
  • Any breaking change impacts?
  • Need to update project dependencies?

Editing a manifest or source file is outside this skill's documentation scope. If step 5 leads to any change outside .claude/docs/libraries/, run the gates before reporting:

bash .claude/skills/_shared/verify.sh

Exit 0 means the gates passed; exit 2 means a gate failed or no gates ran. Do not report completion on a non-zero exit.

Key Items to Check

CategoryWhat to Look For
SecurityCVEs, security patches
BreakingAPI changes, removed features
DeprecatedAPIs marked for removal
PerformanceOptimization improvements
New FeaturesUseful additions

Update Format

There is one library-doc template, in research-lib/SKILL.md under ## Documentation Template, and it is the version pinned by tests/test_validate_doc.py against the lib-doc contract. Do not keep a second copy here: a template that no test pins is how the two skills came to disagree about the metadata block in the first place.

An update edits the existing document in place:

  • Refresh the > **Last Updated** / > **Version Checked** blockquote that already sits directly under the H1 — it is the only place a version lives, so do not add a second version line anywhere.
  • Optionally add a ## Recent Changes list after the blockquote; it is not a contract section, so keep the four required sections intact.

Report

After updating, report to the user per .claude/rules/language.md:

  • Which libraries were updated
  • Significant changes found
  • Any action items for the project

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.