Agent skill

Component Docs

by openshift-eng in openshift-eng/ai-helpers

Create lean component documentation for OpenShift repositories

Apache-2.0Auto-check passed

Install Component Docs

skills CLI
$ npx skills add openshift-eng/ai-helpers --skill component-docs -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install openshift-eng/ai-helpers component-docs --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/openshift-eng/ai-helpers.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/agentic-docs/skills/component-docs .claude/skills/component-docs && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
component-docs
GitHub stars
120
Token cost
~6.9k tokens
SKILL.md length
3,089 words
Files
10 (incl. scripts)
Skills in repo
118
Repo updated
First seen
Licence
Apache-2.0

At a glance

Create lean component documentation for OpenShift repositories

  • Works in 8 steps: Setup → Create AGENTS.md (40-60 lines) → ENHANCEMENTS.md (Optional) → …
  • SKILL.md covers Two-Tier Architecture, What Gets Created, What NOT to Include (lives in… and Hosted knowledge resources, plus 6 more sections
  • Runs Shell scripts from its folder; calls git and python3; reaches github.com

What it does

Component Docs is an agent skill from openshift-eng/ai-helpers. Create lean component documentation for OpenShift repositories

Its SKILL.md is about 6.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 12 other files, including scripts (for example `guides/REVIEW-GENERATION.md`, `scripts/cleanup-sources.sh` and `scripts/create-structure.sh`).

The repository describes itself as: Developer productivity tools for Claude Code & other AI assistants. The licence is Apache-2.0.

Example prompts

  • “/component-docs”

Requirements

  • A Bash shell

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Setup
  2. Create AGENTS.md (40-60 lines)
  3. ENHANCEMENTS.md (Optional)
  4. Component Architecture (ARCHITECTURE.md)
  5. Development & Testing Docs
  6. Generate REVIEW.md + .coderabbit.yaml (REQUIRED)
  7. Validation & Verification
  8. Verification (Recommended)

What it can do on your machine

Read from SKILL.md and the folder at commit a627176. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Component Docs loads about 6.9k tokens when it runs. Until then it costs about 19 tokens; SKILL.md has 3,089 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~19
When it runs · the whole SKILL.md, loaded when a task matches
~6.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from openshift-eng/ai-helpers at commit a627176, republished under its Apache-2.0 licence (© openshift-eng). 3,089 words, ~6,929 tokens.

Download SKILL.mdSave it as .claude/skills/component-docs/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
component-docs
description
Create lean component documentation for OpenShift repositories

Component Documentation Creator

Creates lean component agentic documentation for OpenShift component repositories.

Philosophy: Component docs contain ONLY component-specific knowledge. Generic platform patterns live in the openshift/enhancements repo (dev-guide/, guidelines/, CONVENTIONS.md). Code is the source of truth — read it, verify claims against it, but link to existing repo docs that explain the "why".

Two-Tier Architecture

Platform: openshift/enhancements

Contains: Development conventions (dev-guide/), coding standards (CONVENTIONS.md), enhancement guidelines (guidelines/), cross-repo architectural context

Component: Component Repos (LEAN)

Contains: Component-specific architecture, behavioral contracts, development guides, test patterns

Decision Rule: "Would another repo need to duplicate this?"

  • YES → Platform (platform)
  • NO → Component (component)

What Gets Created

text
component-repo/
├── AGENTS.md                      # Executive briefing (40-60 lines)
├── CLAUDE.md → AGENTS.md          # Symlink (Claude Code auto-loads)
├── REVIEW.md                      # Review instructions (Claude Code Review + CodeRabbit)
├── .coderabbit.yaml               # CodeRabbit config (points at REVIEW.md)
└── ai-docs/
    ├── ARCHITECTURE.md            # Internals, integrations, behavioral contracts, design refs
    ├── DEVELOPMENT.md             # Build, common tasks, mistakes
    ├── TESTING.md                 # Test suites and patterns
    └── ENHANCEMENTS.md            # Optional — enhancement/KEP/design doc catalog

What NOT to Include (lives in Platform)

❌ Generic framework patterns (controller-runtime, status conditions, common libraries) ❌ Testing practices (test pyramid, E2E framework) ❌ Security practices (STRIDE, RBAC guidelines) ❌ Reliability practices (SLO framework) ❌ Kubernetes fundamentals (Pod, Node, Service) ❌ Cross-repo ADRs (etcd, CVO orchestration, immutable nodes)

Hosted knowledge resources

If running inside the Chai Bot environment, use the documentation and other resources configured there, including Slack, Jira, and CodeRAG knowledge. Verify cross-repository facts against authoritative sources, such as upstream GitHub sources or Chai Bot's configured CodeRAG. See Phase 1 for specific query steps.

Execution Workflow

Phase 1: Setup
  • Read existing CLAUDE.md / AGENTS.md before overwriting: If the repo already has either file, read it first and extract important points (build instructions, critical warnings, repo conventions, key patterns, retrieval priorities, documentation maps, and useful direct links) to incorporate into the generated docs. Existing content is prior work — preserve it, don't overwrite blindly.
  • Back up prior agent docs before writing: Save any existing CLAUDE.md / AGENTS.md content under ai-docs/_sources/. Use them as temporary source material for review and recovery during generation.
  • Discover existing repo docs: Scan docs/, docs/enhancements/, design/, CONTRIBUTING.md, and any files with "design", "proposal", "enhancement" in the name. These will be linked from ENHANCEMENTS.md and ARCHITECTURE.md as appropriate. Also scan documentation files at the repository root and look elsewhere throughout the repository for relevant documentation, regardless of filename or location.
  • Record documentation sources used: As existing repository documents are used as sources, record each repo-relative path in ai-docs/_sources/repository-docs-used.txt, one path per line.
  • Resolve this skill directory from the location of the loaded SKILL.md. Resolve all scripts/, templates/, and guides/ paths relative to it. Do not search a plugin cache or assume the repository is the current directory.
  • Preflight required resources: scripts/create-structure.sh, scripts/validate.sh, scripts/cleanup-sources.sh, all referenced templates, and any guide required by the selected execution path. Stop before writing if a required resource is unavailable.
  • Determine repo path: REPO_PATH="${provided_path:-$PWD}"
  • Detect component name from repo (e.g., machine-config-operator → MCO)
  • Run the resolved scripts/create-structure.sh with "$REPO_PATH".
  • Gather tribal knowledge (Chai Bot / hosted environment): If knowledge tools (researcher, Slack, Jira) are available, query them for tribal knowledge about this repository:
    • Search for "<repo-name> convention OR pitfall OR mistake OR gotcha"
    • Search for "<repo-name> review process OR reviewer expectations"
    • Search for "<repo-name> common rejection OR frequently rejected"
    • Search for "<repo-name> design decision OR historical context"
    • Save findings to ai-docs/_sources/tribal-knowledge-notes.md for use in later phases
    • If no hosted knowledge tools are available, skip this step
Phase 2: Create AGENTS.md (40-60 lines)
  • Create initial AGENTS.md at repo root using templates/AGENTS-template.md
  • If existing AGENTS.md/CLAUDE.md was found in Phase 1, incorporate its critical warnings and conventions
  • Treat AGENTS.md as the executive summary only. If the old CLAUDE.md contains longer repo-specific operational detail (release/bundle commands, CI/Konflux notes, metrics/debugging guidance), move that detail into DEVELOPMENT.md or ARCHITECTURE.md instead of dropping it.
  • Preserve valuable navigation from prior agent docs. Keep compact, frequently used direct links in AGENTS.md. A detailed "need → start here" map may move to ARCHITECTURE.md or ENHANCEMENTS.md, but AGENTS.md must link directly to that map. Do not replace useful deep links with only a bare directory name.
  • Include architecture-at-a-glance summary
  • Revisit after Phase 4: Fill in the Critical Warnings section with 3-5 "never do X" rules discovered during architecture exploration
  • Create CLAUDE.md symlink: ln -sf AGENTS.md "$REPO_PATH/CLAUDE.md"
  • Validate line count: wc -l AGENTS.md (target: 40-60)
Phase 3: ENHANCEMENTS.md (Optional)
  • Search component repo for local design docs:
    • Check docs/, design/, enhancements/ directories
    • Check for files with "design", "proposal", "enhancement" in name
  • Search openshift/enhancements repo for component-specific proposals:
    • Check https://github.com/openshift/enhancements/tree/master/enhancements/{component-area}/
  • Search for related upstream KEPs (Kubernetes Enhancement Proposals)
  • Only create ai-docs/ENHANCEMENTS.md if content exists — do not create an empty file
  • Format: title, status (implemented/provisional/rejected), link only — keep concise
  • Link to all found docs — these are authoritative sources, the enhancement is the source of truth
  • Note: Enhancement proposals are feature designs (often cross-component). Key architectural decisions go inline in ARCHITECTURE.md "Design References" section, not here.
Phase 4: Component Architecture (ARCHITECTURE.md)
  • Read one complete implementation first: Pick one controller/component package (preferably the most recently added). Read ALL files in it — not just controller.go, but constants, utils, every reconciler file, install sequence, and tests. This is your reference implementation. Document every pattern you observe: how it applies resources, what shared utilities it calls, what predicates it uses, what constants it defines, what env vars it reads. If the repo has 2+ similar components, compare them — divergences in approach are the most valuable thing to document ("use X pattern from component A, not Y pattern from component B").
  • Detect repo type: Check for operator signals (controller-runtime, library-go, operator-sdk, OLM bundle in bundle/, CRDs in config/crd/). If operator detected, follow the Operator-Specific Discovery checklist below in addition to the generic checklist.
  • Explore remaining codebase: Read entrypoints, key packages, dependencies. Follow the Implementation Pattern Discovery checklist below.
  • Create ai-docs/ARCHITECTURE.md with the following required sections:

ARCHITECTURE.md Required Sections (target: 200-400 lines):

  1. Repository Layout — annotated directory tree with actionable annotations ("DO NOT use X for Y")
  2. Key Domain Concepts — the core abstractions an agent must understand before touching this codebase. Not struct fields (agents read types.go), but the mental model: what are the primary resources, how do they relate, what are the key lifecycle flows. For operators: trace the primary end-to-end workflow (e.g., "user creates CR → controller renders config → daemon applies to node → node reboots"). For libraries: what are the key interfaces and their contracts. This section answers "what does this system DO" before the next sections explain "how is it BUILT"
  3. Component/Controller Details — framework, startup sequence, per-controller tables
  4. Resource Management — apply methods per controller (SSA, strategic merge, Create/Update), image resolution, deployment hooks
  5. Feature Gates — definition → runtime check → startup wiring chain
  6. Error Classification — error types, requeue behavior, status condition effects
  7. OpenShift Integration Points — upstream project dependencies, OpenShift component integrations (CNO, CCO, OLM, proxy, TLS, etc.) with integration tables
  8. Generated Code Inventory — generated files/dirs with "NEVER hand-edit" + make target
  9. API Behavioral Contracts — behavioral knowledge that agents can't get from reading types.go alone: singleton constraints, naming conventions, merging order, lifecycle flows, config drift detection, plugin behaviors, gotchas, "DO NOT" rules. Point agents to types.go / api/ for actual struct field definitions
  10. Form Factor Behavior (if applicable) — how the component behaves across deployment topologies: Standalone, SNO (replica adjustments, resource constraints), HCP/Hosted Control Planes (which cluster does it run in, cross-cluster communication), MicroShift (does it run, config alternatives). Only document form factors the code actually handles. Table format preferred
  11. Design References — 2-3 key architectural decisions inline (5-8 lines each: title, decision, rationale, consequences). Link to existing repo design docs (from docs/) where they provide deeper detail
  12. Platform Documentation — link to the openshift/enhancements repo for generic platform patterns. Reference stable paths: dev-guide/ for development conventions, guidelines/ for enhancement process, CONVENTIONS.md for coding standards. Do NOT link to specific files under ai-docs/ — that structure is subject to change
  • Document discovered patterns using the discovery checklist results
  • Link to existing repo docs (from docs/, design docs) where they provide deeper detail — ARCHITECTURE.md is a map, not a replacement for existing documentation
  • Keep lean but dense (every line should tell the reader something they can't infer from file names alone)
  • Every pattern claim must include a file:line reference. If you can't point to source, flag as unverified
  • Integrate tribal knowledge: If ai-docs/_sources/tribal-knowledge-notes.md exists from Phase 1, incorporate relevant findings:
    • Historical design decisions → "Design References" section
    • Cross-repo interaction patterns → "OpenShift Integration Points" section
    • Attribute integrated knowledge where it adds credibility (e.g. "Historically, the team has...")
Phase 5: Development & Testing Docs
  • VERIFY FIRST:
    bash
    # Go version
    grep "^go " "$REPO_PATH/go.mod"
    
    # Branch name (no clone needed) — uses first remote found
    _remote=$(git remote | head -1)
    git ls-remote --symref "$(git remote get-url "$_remote")" HEAD | grep 'ref:' | awk '{print $2}' | cut -d/ -f3
    
    # Makefile targets
    grep "^[a-zA-Z-]*:" Makefile | cut -d: -f1
    
    # Directory structure
    ls -d cmd pkg test manifests 2>/dev/null
  • Create ai-docs/DEVELOPMENT.md using templates/DEVELOPMENT-template.md:
    • Do not repeat repo layout — it is in ARCHITECTURE.md
    • Replace generic template placeholders with actual repo patterns discovered in Phase 4
    • Fill "Common Tasks" with repo-specific tasks, not generic placeholders
    • Fill "Common Mistakes" from anti-patterns discovered in Phase 4
    • Preserve still-relevant operational detail from the prior CLAUDE.md (for example: bundle/catalog/release commands, CI/Konflux notes, metrics/debugging commands, non-default environment variables)
    • If common tasks vary in complexity, document tiers with specific file modification lists
  • Create ai-docs/TESTING.md using templates/TESTING-template.md:
    • Replace generic code examples with actual test patterns from this repo
    • Fill "Component-Specific" sections with real test scenarios
  • Link to Platform for generic practices
  • Document ONLY verified component-specific details (target: 100-200 lines each)
  • Integrate tribal knowledge: If tribal knowledge notes exist, incorporate:
    • Undocumented conventions → DEVELOPMENT.md
    • Common pitfalls → "Common Mistakes" section
    • Review process norms → DEVELOPMENT.md or REVIEW.md as appropriate
Phase 6: Generate REVIEW.md + .coderabbit.yaml (REQUIRED)
  • Read and follow guides/REVIEW-GENERATION.md — all 8 steps are required
  • Do not skip — REVIEW.md and .coderabbit.yaml are mandatory outputs
Phase 7: Validation & Verification
  • Run the resolved scripts/validate.sh with "$REPO_PATH" (includes link validation and removal of broken external-link lines)
  • Verify ai-docs/_sources/ contains backups of any prior CLAUDE.md / AGENTS.md that existed
  • Verify AGENTS.md 40-60 lines, no generic duplication
  • Verify CLAUDE.md → AGENTS.md symlink exists
  • Verify ARCHITECTURE.md 200-400 lines, contains required sections (repo layout, API Behavioral Contracts, Design References, Platform Documentation)
  • Verify specificity: Pattern claims backed by code evidence, not generic placeholders
  • Anti-hallucination checks: Spot-check type fields if applicable, verify branch names in examples match repo, confirm pattern claims reference actual code
  • Operator-specific checks (if operator repo): Verify apply method claims per-controller (grep -r "client.Apply\|r.Update\|resourceapply" pkg/controller/<name>/). Verify feature gate claims trace to actual runtime code. Verify image env var names match Makefile/CSV.
  • REVIEW.md checks: exists at repo root, ≤100 lines (wc -l REVIEW.md), skip paths reference real directories (test -d), platform citations present (grep for "dev-guide" or "CONVENTIONS"), no content overlap with AGENTS.md
  • .coderabbit.yaml checks: valid YAML (python3 -c "import yaml; yaml.safe_load(open('.coderabbit.yaml'))"), filePatterns contains "REVIEW.md" but NOT "CLAUDE.md", path_filters match "Do not report" globs, path_instructions match "Path-specific rules"
  • Cross-check with openshift-docs if time permits
  • Verify tribal knowledge integration: If tribal knowledge was gathered in Phase 1, confirm that relevant findings were integrated into the documentation. If relevant findings were discovered but none were integrated, flag this as incomplete and explain why each finding was excluded.
  • Flag discovery gaps: At the end of ARCHITECTURE.md and DEVELOPMENT.md, add a brief "SME Review Recommended" note listing areas where automated discovery may be incomplete
  • No silent drops: Compare the prior CLAUDE.md / AGENTS.md against the generated docs and ensure repo-specific commands, CI notes, metrics/debug tips, hard warnings, retrieval instructions, documentation maps, and useful direct links were preserved. For every relocated item, verify the new location and leave a discoverable route from AGENTS.md. Record any intentional drop and its rationale in the completion report.
  • Source-document links: For every path recorded in _sources/repository-docs-used.txt, verify the document is linked from AGENTS.md or ai-docs/. Record any intentional exception and its rationale in the completion report.
  • Cleanup: After validation passes, run the resolved scripts/cleanup-sources.sh with "$REPO_PATH". Do not leave temporary source backups in the final repo tree.

Link Validation:

  • Link validation always runs — broken links (wrong relative paths, 404 URLs) are a common source of documentation errors
  • Automatically checks all HTTP/HTTPS links (with timeout and user agent)
  • Validates internal/relative links (file existence)
  • Use VERBOSE=true with the resolved validator to see successful links. Use CHECK_EXTERNAL_LINKS=false when the host intentionally has no network access; report external links as unverified in that mode.
Show full SKILL.md (1,164 more words)Show less
  • Ask user: "Run /review-docs to verify claims?"
    • If YES: Run /review-docs --path "$REPO_PATH"
    • If NO: Warn user:
      Skipping verification. Documentation may contain:
      - Incorrect API field claims
      - Wrong branch/version references
      - Unverified pattern claims (SSA vs strategic merge, etc.)
      
      Recommend running `/review-docs` before creating PRs to catch hallucinations.

Note: /review-docs verifies claims locally against the repository source and vendored dependencies first, then checks cross-repository claims against available authoritative resources.

Implementation Pattern Discovery

Use this checklist during Phase 4 when exploring the codebase. These patterns produce the most valuable documentation — the kind that prevents an agent from writing subtly incorrect code.

What to Look For
PatternHow to DiscoverWhat to Document
Multiple paradigmsDo different packages use different frameworks or approaches for similar tasks?Comparison table with "use X for Y, never Z for Y" guidance
Shared utilitiesIs there a common/, shared/, utils/, or internal/ package used across components?Exact exported symbols with one-line usage contract
Wiring/registrationHow do new components get registered and started? How does work get dispatched to them?Startup sequence, event/trigger flow, where to hook in new components
Resource managementHow does code create/update external resources? (SSA, strategic merge, REST calls, etc.)Actual method with code reference — verify in code, don't assume
Naming conventionsGrep for patterns in env vars, labels, file names, package namesExact format with examples
Feature togglesAre there feature gates, flags, or config-driven enablement?Definition → runtime check → wiring chain
Anti-patternsSearch for "DO NOT", "NEVER", "MUST", "HACK" in code comments. Study 2-3 existing implementations to identify shared patterns and things they avoidNumbered "DO NOT" list with brief explanation
CI enforcementgrep -E "^(lint|fmt|vet|check|verify):" MakefileCI-enforced checks → "Do not report" in REVIEW.md
High-risk areasgit log --since="1 year" --name-only --pretty=format: | sort | uniq -c | sort -rn | head -20High-churn files → severity tuning in REVIEW.md
Vendored API boundariesls vendor/github.com/openshift/api 2>/dev/nullVendored API types → "Always check" in REVIEW.md
Operator-Specific Discovery

When the repo is a Kubernetes/OpenShift operator (detected via controller-runtime, library-go, OLM bundle, CRDs), also investigate these patterns. Skipping them produces docs that look correct but cause agents to write subtly wrong code.

PatternHow to DiscoverWhat to Document
Controller framework splitCheck imports in EACH controller package for library-go vs controller-runtime. Don't assume uniformity.Per-controller table: framework, apply method (client.Apply vs resourceapply vs Create+Update), code ref.
Reconciliation apply methodFor EACH controller: grep -r "client.Apply|r.Update|r.Create|resourceapply" pkg/controller/<name>/Actual method per controller. This is the #1 source of hallucinations.
Feature gate runtime behaviorRead features.go end-to-end. Trace from definition → runtime check → startup wiring.Full chain. For TechPreview: cluster-side gating (FeatureSet discovery, fail-closed). Don't just list gate names.
Image resolution & OLM bundlegrep -r RELATED_IMAGE Makefile bundle/. Check Makefile for *_VERSION vars. Check bundle/manifests/ for CSV.Env var naming convention, version variables, how OLM injects images. CSV update checklist (env vars, RBAC, relatedImages).
Error classificationCheck common/ for error wrapper types (IrrecoverableError, RetryRequiredError).Which types exist, effect on requeue behavior.
Generated code & bindata pipelinefind . -name "zz_generated*" -o -name "bindata.go" -o -path "*/clientset/*". Check Makefile for generation targets.Generated files/dirs with "NEVER hand-edit" + make target. For bindata: version var → hack script → output dir → Go loading.
FIPS complianceCheck for OpenShift fork references in go.mod (replace directives), FIPS build tags, or crypto constraints in Dockerfiles.Whether FIPS is build-time (fork/toolchain) or runtime. Only document if present.
OLM lifecycleCheck bundle/manifests/ CSV for spec.replaces, skips, skipRange, installModes, spec.relatedImages, channel annotations.Which upgrade strategy is used, relatedImages list, install mode constraints.
Status conditions & OpenShift integrationsCheck for library-go OperatorStatus vs custom conditions. Grep for proxy, trusted-CA, TLS profile, CCO references.Which condition system, which integrations exist — only document what's present.
Form factor behaviorGrep for topology detection: ControlPlaneTopology, InfrastructureTopology, SingleReplica, HighlyAvailable, External, single-node-cluster label, hypershift, HostedControlPlane, HostedCluster. Check for replica count adjustments, anti-affinity skips, or HCP-specific namespaces/RBAC.Form factor table: how the component behaves on Standalone, SNO (single replica? resource constraints?), HCP (which cluster does it run in? cross-cluster communication?), MicroShift (does it run at all? config file alternative?). Only document form factors the code actually handles — don't invent behavior.
Information Density
  • Exact symbol names over generic descriptions
  • Comparison tables for contrasting patterns
  • "Never" / "DO NOT" warnings for common confusion points
  • One table with symbols beats three paragraphs of prose
  • Every line should tell the reader something they can't infer from file names alone
  • Every pattern claim must include a file:line reference (e.g., pkg/controller/foo/deployments.go:40). If you can't point to source, you're inferring — flag it as unverified instead of stating it as fact

AGENTS.md Requirements

Length: 40-60 lines (strict limit)

Required Sections:

  1. Component metadata (name, repository)
  2. Purpose (1-2 sentences)
  3. Critical warnings (3-5 "never do X" rules — the most important architectural warnings)
  4. Architecture at a glance (brief orientation)
  5. Documentation structure (flat tree)
  6. Key files quick reference
  7. External references

Format: Compressed, table-based, links not prose. Use templates/AGENTS-template.md.

Symlink: CLAUDE.md → AGENTS.md must exist at repo root.

Validation Criteria

✅ AGENTS.md: At repo root, 40-60 lines, critical warnings, no generic duplication

✅ CLAUDE.md: Symlink to AGENTS.md

✅ Temporary sources cleaned up: Any working backups created under ai-docs/_sources/ were removed before finishing

✅ No duplication: No generic framework explanations, no testing pyramid, no security frameworks

✅ ARCHITECTURE.md: 200-400 lines, contains repo layout, API Behavioral Contracts, Design References, OpenShift Integration Points, Platform Documentation sections

✅ Link validation: All external links return 200 OK, all internal links resolve

✅ Implementation patterns: ARCHITECTURE.md has discovery checklist results, shared utilities listed with exact symbols, anti-patterns documented

✅ Operator accuracy (if operator repo): Apply method documented per-controller (not assumed uniform), feature gate runtime behavior traced, generated code inventory listed, image resolution mechanism documented

✅ REVIEW.md: At repo root, 60-80 lines (cap 100), skip paths valid, platform citations present, no AGENTS.md overlap, .coderabbit.yaml in sync

Anti-Patterns

❌ DON'T duplicate Platform content

Wrong: 187-line TESTING.md where 60% is generic test pyramid explanation Right: 90-line TESTING.md that's 100% component-specific, links to Platform

❌ DON'T explain generic framework patterns

Wrong: Explaining framework internals in component docs Right: Link to Platform, document component-specific usage only

❌ DON'T document without verification

Wrong: Type fields from memory, outdated conventions, pattern claims without code evidence Right: Verify in source code, check actual branch names, confirm patterns exist, link to sources

❌ DON'T write generic placeholders

Wrong: "Add new controller: 1. Create controller.go 2. Implement Reconcile() 3. Register" Right: Repo-specific steps with exact file paths, shared utilities to use, registration wiring, and naming conventions

Wrong: Scattering content across many small files — agents must read 8+ files Right: ARCHITECTURE.md as single authoritative source for internals, integrations, contracts, and key decisions

❌ DON'T ignore existing repo documentation

Wrong: Generating docs that don't link to existing design docs in docs/ Right: Discover and link to all existing repo docs — they are authoritative sources

Prerequisites

  1. ✅ openshift/enhancements repo accessible (dev-guide/, guidelines/, CONVENTIONS.md)
  2. ✅ Repository is an OpenShift component

Arguments

bash
/component-docs [--path <repository-path>]
  • --path <repository-path>: Path to component repository (default: current directory)

Success Output

text
✅ Component Documentation Created

Component: [component-name]
Repository: [path]

Structure:
  ✅ AGENTS.md (root): XX lines (target: 40-60)
  ✅ CLAUDE.md → AGENTS.md symlink
  ✅ REVIEW.md: XX lines (target: 60-80)
  ✅ .coderabbit.yaml: valid, synced with REVIEW.md
  ✅ ARCHITECTURE.md: XXX lines (target: 200-400)
  ✅ DEVELOPMENT.md
  ✅ TESTING.md
  ✅ ENHANCEMENTS.md (optional — only if content found)

Next Steps:
  1. Run `/review-docs` to verify local and cross-repository claims (recommended)
  2. Review generated documentation for accuracy
  3. Create PR with documentation changes

See Also

  • /review-docs - Verify documentation claims locally and against available authoritative resources
  • /update-platform-docs - Update Platform documentation
  • Platform Documentation (openshift/enhancements — dev-guide/, guidelines/, CONVENTIONS.md)

© openshift-eng, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (scripts) in plugins/agentic-docs/skills/component-docs of openshift-eng/ai-helpers.

  • SKILL.md
  • guides/REVIEW-GENERATION.md
  • scripts/cleanup-sources.sh
  • scripts/create-structure.sh
  • scripts/validate.sh
  • templates/AGENTS-template.md
  • templates/DEVELOPMENT-template.md
  • templates/REVIEW-template.md
  • templates/TESTING-template.md
  • templates/coderabbit-template.yaml

Open the folder on GitHubat commit a627176

Compare with similar skills

Component Docs next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Component Docs compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Component Docs this skillopenshift-eng/ai-helpers120—~6.9kAutomated safety check: PassApache-2.0
Openshiftsickn33/agentic-awesome-skills47k1 repos~2.4kAutomated safety check: PassMIT
Lean Formalizewanshuiyin/Auto-claude-code-research-in-sleep17k—~5.4kAutomated safety check: NotesMIT
Lean Canvasphuryn/pm-skills27k—~1.2kAutomated safety check: PassMIT
Lean BuildJuliusBrussee/caveman110k1 repos~273Automated safety check: PassApache-2.0
OpenshiftBagelHole/DevOps-Security-Agent-Skills1.1k—~2.2kAutomated safety check: PassMIT

Similar skills

  • Openshift

    sickn33/agentic-awesome-skills

    Manage Red Hat OpenShift clusters and deployments. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 1 repo~2.4k tokens
    DevOps & CloudAuto-check passed
  • Lean Formalize

    wanshuiyin/Auto-claude-code-research-in-sleep

    Develop and verify a mathematical proof in Lean, continue an incomplete Lean project, or audit whether it proves the original statement.

    17k GitHub stars~5.4k tokensUpdated yesterday
    Auto-check: notes
  • Lean Canvas

    phuryn/pm-skills

    Generate a Lean Canvas with problem, solution, metrics, cost structure, UVP, unfair advantage, channels, segments, and revenue.

    27k GitHub stars~1.2k tokensUpdated 24 days ago
    Product & Project ManagementAuto-check passed
  • Lean Build

    JuliusBrussee/caveman

    Build feature work with high overbuilding risk. Use for new behavior, product slices, or integrations where repository reuse, strict scope, and an explicit…

    110k GitHub starsUsed in 1 repo~273 tokens
    DevelopmentAuto-check passed
  • Openshift

    BagelHole/DevOps-Security-Agent-Skills

    Manage Red Hat OpenShift clusters and deployments. An agent skill from BagelHole/DevOps-Security-Agent-Skills.

    1.1k GitHub stars~2.2k tokensUpdated 4 mo ago
    DevOps & CloudAuto-check passed
  • Lean Comments

    github/awesome-copilot

    Official

    Audits, writes, and refines maintained first-party source-code comments and declaration-level documentation across languages.

    40k GitHub stars~5.3k tokensUpdated today
    DevelopmentAuto-check passed

More from openshift-eng/ai-helpers

All 118 skills in this repo
  • Investigate CI Reliability

    openshift-eng/ai-helpers

    Find and independently validate actionable reliability defects across OpenShift release jobs and presubmits, then export portable issue handoffs.

    120 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Address Review PR

    openshift-eng/ai-helpers

    Fetch and address all PR review comments — categorize by priority, make code changes, post replies, and push.

    120 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Categorize Activity Types

    openshift-eng/ai-helpers

    Categorize Jira issues into Red Hat Sankey Activity Type categories using MCP Jira tools.

    120 GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Has Review Work

    openshift-eng/ai-helpers

    Decide whether a GitHub PR has unanswered authorized review comments or new required CI failures worth a follow-up agent.

    120 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Must Gather Analyzer

    openshift-eng/ai-helpers

    Analyze OpenShift must-gather diagnostic data including cluster operators, pods, nodes, and network components.

    120 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Payload Autodl JSON

    openshift-eng/ai-helpers

    Schema for the autodl JSON data file produced by payload-analysis for database ingestion — you must use this skill whenever generating the autodl JSON file

    120 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check passed

Questions about Component Docs

What does Component Docs do?

Create lean component documentation for OpenShift repositories. Component Docs is an agent skill from openshift-eng/ai-helpers.

How do I install Component Docs in Claude Code?

Run `npx skills add openshift-eng/ai-helpers --skill component-docs -a claude-code`. Or copy the skill folder (plugins/agentic-docs/skills/component-docs in openshift-eng/ai-helpers) into .claude/skills/component-docs in your project. Claude Code loads it when a task matches its description.

How do I install Component Docs in Codex?

Run `npx skills add openshift-eng/ai-helpers --skill component-docs -a codex`. Or copy the skill folder (plugins/agentic-docs/skills/component-docs in openshift-eng/ai-helpers) into .agents/skills/component-docs in your project. Codex loads it when a task matches its description.

Can I use Component Docs in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add openshift-eng/ai-helpers --skill component-docs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/component-docs, .gemini/skills/component-docs, .github/skills/component-docs and .opencode/skills/component-docs in your project.

What does Component Docs need to run?

Going by SKILL.md and its folder, Component Docs needs a shell for the scripts in its folder and the command-line tools its instructions call (git and python3). Our summary lists: A Bash shell.

Does Component Docs access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Component Docs safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Component Docs use?

Component Docs is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Component Docs use?

About 6.9k tokens (SKILL.md is roughly 28k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Component Docs?

Skills that share tags, products or a category with Component Docs: Openshift (sickn33/agentic-awesome-skills, 47k stars), Lean Formalize (wanshuiyin/Auto-claude-code-research-in-sleep, 17k stars), Lean Canvas (phuryn/pm-skills, 27k stars) and Lean Build (JuliusBrussee/caveman, 110k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Component Docs?

openshift-eng (a GitHub organization) maintains it in openshift-eng/ai-helpers, which has 120 GitHub stars. The repository holds 118 skills in this directory. The repository was last updated on October 6, 2026.

Source: openshift-eng/ai-helpers on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.