Skip to content

hoangsonww/Claude-Code-Agent-Monitor / .claude/skills/update-project-docs

update-project-docs

Verified

MANDATORY for every coding agent (Claude Code, Codex, or any other) — keep this repository's documentation in sync after any change to behavior, configuration, interfaces, events, schema, or features. Use automatically at the end of change-sets that alter an env var, event type, hook or state behavior, API, schema, WebSocket message, MCP tool, CLI command, or user-facing feature, and whenever the user asks to update documentation.

FileKindSize
SKILL.mdskill md10.2 KB
references/doc-map.mdmarkdown6.9 KB
scripts/doc-coverage.shexecutablescript1.8 KB
scripts/wiki-block-lengths.shexecutablescript3.4 KB

scripts/wiki-block-lengths.sh

View on GitHub
#!/usr/bin/env bash
# wiki-block-lengths.sh — measure the length of the wiki's fixed-size prose
# blocks so a new entry matches the ones already there instead of blowing up
# the layout. The feature carousel gives every card the same box: a card that
# is far longer than its neighbours overflows or squashes the whole carousel.
#
# Usage (from the repo root):
#   .claude/skills/update-project-docs/scripts/wiki-block-lengths.sh          # both groups
#   .claude/skills/update-project-docs/scripts/wiki-block-lengths.sh cards
#   .claude/skills/update-project-docs/scripts/wiki-block-lengths.sh captions
#
# Prints one line per block (character count of the tag-stripped text) plus the
# min/median/max of the group and flags any block outside the existing range.
# @author Son Nguyen <hoangson091104@gmail.com>

set -u
cd "$(git rev-parse --show-toplevel 2>/dev/null || echo .)" || exit 1
WHICH="${1:-all}"

python3 - "$WHICH" <<'PY'
import re, statistics, sys
from html import unescape

which = sys.argv[1]
html = open("wiki/index.html", encoding="utf-8").read()
strip = lambda s: unescape(" ".join(re.sub(r"<[^>]+>", "", s).split()))
status = 0


def report(title, items, tolerance):
    """tolerance is the multiple of the group median a block may not exceed.
    Carousel cards share one fixed-height box, so they get the tighter bound."""
    global status
    if not items:
        return
    lengths = [n for _, n in items]
    lo, hi = min(lengths), max(lengths)
    # Keep this arithmetic identical to the gate in client/tests/wiki-i18n.test.ts:
    # statistics median (mean of the two middles when the group is even), then
    # truncate both it and the budget, so the two never disagree on a block.
    med = int(statistics.median(lengths))
    budget = int(med * tolerance)
    print(
        f"\n{title} — {len(items)} blocks | min {lo} · median {med} · max {hi} chars"
        f" | budget {budget}"
    )
    for name, n in items:
        flag = ""
        if n > budget:
            flag = "  <-- TOO LONG: trim toward the median"
            status = 1
        print(f"  {n:5d}  {name}{flag}")


if which in ("all", "cards"):
    # The carousel runs to the end of its section; `.feature-card` is also used
    # in grids elsewhere on the page, so bound the slice instead of scanning all.
    start = html.index('<div class="carousel" id="feature-carousel">')
    seg = html[start : html.index("</section>", start)]
    # Most cards carry an `id` on their <h3> (they are cross-referenced from the
    # nav and from other docs), but plenty do not — match the card container and
    # fall back to the heading text so no card escapes the budget.
    card_re = re.compile(
        r'<div\b[^>]*\bclass="[^"]*\bfeature-card\b[^"]*"[^>]*>'
        r'.*?<h3(?:[^>]*\bid="([^"]+)")?[^>]*>(.*?)</h3>\s*<p>(.*?)</p>',
        re.S,
    )
    cards = [
        (m.group(1) or strip(m.group(2)), len(strip(m.group(3))))
        for m in card_re.finditer(seg)
    ]
    report("Feature carousel cards", cards, 1.5)

if which in ("all", "captions"):
    # Same class-token match as the cards: one caption carries an inline style,
    # and an exact-tag pattern would skip it.
    caption_re = re.compile(
        r'<div\b[^>]*\bclass="[^"]*\bscreenshot-caption\b[^"]*"[^>]*>(.*?)</div>', re.S
    )
    caps = [
        (strip(m.group(1))[:48], len(strip(m.group(1)))) for m in caption_re.finditer(html)
    ]
    report("Screenshot captions", caps, 2.0)

print()
sys.exit(status)
PY
rea-changelog-updatemorluto/reaPrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
academy-guideanthropics/skillsStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
claude-apianthropics/skillsReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file).Stars: 198kUpdated Claude CodeCodexUnverifiedInstall
doc-coauthoringanthropics/skillsGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.Stars: 198kUpdated Claude CodeCodexVerifiedInstall