Answer architecture question using arch-query CLI
Ships in rhoai-security-reviewer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Answer an architecture-context question using the arch-query CLI tool. Produce a machine-readable JSON answer and a human-readable markdown summary.
You will receive the following in the prompt:
QUESTION — the architecture question to answerQUESTION_ID — the corpus question ID (e.g., t1-001)ARCH_QUERY_BIN — path to the arch-query binary (e.g., /usr/local/bin/arch-query). Architecture data is embedded in the binary — no --base-dir needed.OUTPUT_DIR — directory to write your output filesarch-query subcommands to look up architecture context. Do NOT use cat, ls, find, grep, head, tail, or any other command to read architecture-context files directly.Always invoke arch-query using $ARCH_QUERY_BIN (which includes --base-dir):
$ARCH_QUERY_BIN search <term> Find components by name or purpose
$ARCH_QUERY_BIN component <name> Component fact sheet (CRDs, ports, deps, constraints)
$ARCH_QUERY_BIN component <name> --raw Full markdown doc for deep questions
$ARCH_QUERY_BIN exists <name> Check if component is in RHOAI inventory (exit 0/1)
$ARCH_QUERY_BIN list List all components grouped by domain
$ARCH_QUERY_BIN list --names-only Component names only, one per line
$ARCH_QUERY_BIN deps <name> Dependency graph (forward + reverse)
$ARCH_QUERY_BIN crds [component] CRD index (all or per-component)
$ARCH_QUERY_BIN ports [component] Port index (all or per-component)
$ARCH_QUERY_BIN platform Condensed platform summary
$ARCH_QUERY_BIN overlays Active overlays and affected components
$ARCH_QUERY_BIN versions Available versions with aliases
$ARCH_QUERY_BIN diff <component> <ver-a> <ver-b> Structured diff between versions
$ARCH_QUERY_BIN diff --all <ver-a> <ver-b> Platform-wide diff between versions
$ARCH_QUERY_BIN grep <term> Deep search across all parsed fields
$ARCH_QUERY_BIN --version <ver> <subcommand> Query a specific version
Tier 1 — Inventory lookup ("Is X a RHOAI component?"):
arch-query exists <name>arch-query search <term> with alternate namesarch-query listTier 2 — Fact extraction ("What port does X use?", "What CRDs does X manage?"):
arch-query component <name> for the fact sheetarch-query crds <name> or arch-query ports <name> for specific lookupsarch-query component <name> --raw for the full markdown doc before answeringTier 3 — Cross-component integration ("How do X and Y interact?"):
arch-query deps <name> on both components to check for direct dependency linksarch-query component <name> on each component — look for the other component's name in the deps, ports, or constraints sectionsarch-query grep <term> using each component's name to find cross-references in the other's docsarch-query component <name> --raw on both to check for indirect relationships (shared APIs, shared CRDs, common controller)Tier 4 — Navigation ("What versions exist?", "Where are the docs?"):
arch-query versions for version listingarch-query list for component inventoryarch-query platform for platform overviewYour primary output is a JSON file conforming to this schema.
STRICT SCHEMA RULE: The JSON must contain ONLY the exact keys shown below — no extra fields at any level. The schema uses additionalProperties: false and any extra key will cause validation failure.
{
"question_id": "t1-001",
"question": "Is InstructLab a RHOAI component?",
"answer": "No. InstructLab is not found in the RHOAI component inventory.",
"answerable": false,
"sources_cited": [
{
"source": "arch-query exists InstructLab",
"excerpt": "Not found in RHOAI component inventory. Closest matches: none."
}
],
"confidence": "high"
}
Field definitions:
question_id: string — the corpus question ID from QUESTION_IDquestion: string — the question text from QUESTIONanswer: string — your answer, or "Not documented in the architecture-context." if the information is not presentanswerable: boolean — true if arch-query returned the answer, false if the information is not documentedsources_cited: array of objects, each with:
source: string — the arch-query command you ran (e.g., arch-query component kserve, arch-query exists InstructLab)excerpt: string — the relevant portion of arch-query's output (max 200 chars)confidence: string enum — one of:
high — arch-query returned an exact answermedium — inferred from partial information across multiple arch-query callslow — uncertain; arch-query output was ambiguous or only tangentially relevantUnderstand the question. Determine the question type (inventory, fact, integration, navigation) and plan which arch-query subcommands to use.
Query arch-query. Run the appropriate subcommands. Start with the most targeted command for the question type.
Formulate your answer. Base it strictly on arch-query output. If arch-query doesn't return the information, say so.
Cite your sources. List every arch-query command you ran that contributed to your answer, with the relevant excerpt from the output.
Assess your confidence. High if arch-query directly answered, medium if you combined multiple outputs, low if the output was unclear.
Write two files in OUTPUT_DIR:
{QUESTION_ID}.json — the JSON object described above{QUESTION_ID}.md — a human-readable rendering:# Answer: {QUESTION_ID}
## Question
{question text}
## Answer
{answer text}
## Sources
- **`{arch-query command}`**: {excerpt}
## Confidence: {high/medium/low}
## Answerable: {yes/no}
What SKILL.md sets; muted values are Claude Code's defaults
/rhoai-security-reviewer:bench-answer-queryfrom rhoai-security-reviewer
rhoai-security-reviewer@opendatahub-skills is listed by opendatahub-io/skills-registry — review the source before installing
npx claudepluginhub opendatahub-io/skills-registry --plugin rhoai-security-reviewer28 skills in this plugin
/bug-context-mapMap bug to available architecture contextOther plugins' skills for the same job