Skip to content

Unique-AG/ai / .claude/skills/entangled-mkdocs

entangled-mkdocs

Verified

Add documentation pages to an existing MkDocs + Entangled site, explain how to serve locally, help adapt documentation

FileKindSize
SKILL.mdskill md19.6 KB
assets/mkdocs-baseline.yamlconfig4.1 KB
scripts/regenerate_registry.pyscript3.0 KB

scripts/regenerate_registry.py

View on GitHub
"""
Regenerate docs/entangled-registry.json from all Markdown files under docs/.

Usage:
    python scripts/regenerate_registry.py

Run from the project root (where mkdocs.yaml lives). Add to mkdocs.yaml:

    exclude_docs: |
      entangled-registry.json

Exit codes:
    0  registry written (or unchanged)
    1  duplicate block IDs or file= targets detected
"""

import json
import pathlib
import re
import sys

DOCS_DIR = pathlib.Path("docs")
REGISTRY_PATH = DOCS_DIR / "entangled-registry.json"


# Fence: optional leading whitespace (indented list items), then 3+ backticks. Group 1 = backticks.
_FENCE_OPEN = re.compile(r"^\s*(`{3,})")
# Closing fence: optional indent, then only backticks and optional trailing whitespace.
_FENCE_CLOSE = re.compile(r"^\s*(`{3,})\s*$")


def build_registry(docs_dir: pathlib.Path) -> dict[str, list[str]]:
    blocks: dict[str, list[str]] = {}
    for md in sorted(docs_dir.rglob("*.md")):
        fence_stack: list[int] = []  # backtick count of each open fence
        for line in md.read_text(encoding="utf-8").splitlines():
            close_m = _FENCE_CLOSE.match(line)
            if close_m:
                n = len(close_m.group(1))
                if fence_stack and fence_stack[-1] == n:
                    _ = fence_stack.pop()
                continue
            open_m = _FENCE_OPEN.match(line)
            if not open_m:
                continue
            n = len(open_m.group(1))
            if fence_stack:
                if fence_stack[-1] == n:
                    # Same count: in Markdown the next fence line closes the previous and opens new (sequential blocks).
                    _ = fence_stack.pop()
                else:
                    # Different count = nested (e.g. 3 inside 4-backtick doc example); do not register.
                    fence_stack.append(n)
                    continue
            # Top-level fence (or just closed same-count): register #id and file= for this block.
            id_m = re.search(r"#([\w-]+)", line)
            file_m = re.search(r"file=([^\s}]+)", line)
            if id_m:
                blocks.setdefault("#" + id_m.group(1), []).append(str(md))
            if file_m:
                blocks.setdefault("file=" + file_m.group(1), []).append(str(md))
            fence_stack.append(n)
    return blocks


def main() -> int:
    if not DOCS_DIR.exists():
        print(f"Error: docs directory not found at '{DOCS_DIR}'", file=sys.stderr)
        return 1

    blocks = build_registry(DOCS_DIR)

    REGISTRY_PATH.write_text(
        json.dumps(blocks, indent=2, sort_keys=True), encoding="utf-8"
    )
    print(f"Registry written: {len(blocks)} entries → {REGISTRY_PATH}")

    duplicates = {k: v for k, v in blocks.items() if len(set(v)) > 1}
    if duplicates:
        print(f"\nWARNING: {len(duplicates)} duplicate(s) found:", file=sys.stderr)
        for key, files in duplicates.items():
            print(f"  {key}", file=sys.stderr)
            for f in files:
                print(f"    {f}", file=sys.stderr)
        return 1

    return 0


if __name__ == "__main__":
    sys.exit(main())
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: 471kUpdated 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