Skip to main content

debug-oas

Use when debugging OpenAPI (OAS) issues for a specific API area in Kibana by scoping validation output with one or more --path filters, then separating structural invalid-OAS failures from quality or documentation gaps such as missing descriptions.

소스 정보

저장소
elastic/kibana
최근 소스 활동
2026년 8월 3일 17:06
감지된 SKILL.md 언어
영어
스타
21,236
포크
8,623

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
3 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
debug-oas
description
Use when debugging OpenAPI (OAS) issues for a specific API area in Kibana by scoping validation output with one or more --path filters, then separating structural invalid-OAS failures from quality or documentation gaps such as missing descriptions.
user-invocable
true
disable-model-invocation
true
# Debug OAS ## Overview Use `node ./scripts/validate_oas_docs.js` to validate Kibana OAS, but always scope output with `--path` so developers can focus on the API area they are actively changing. Use this skill when the developer needs issue breakdown, categorization, or representative examples. For quick pass/fail only, use `validate-oas` first. If results look stale or surprising, refresh generated OAS first using the environment setup flow in `validate-oas`. Treat stale `oas_docs` as a setup problem, not a debugging conclusion. The validator can surface two broad categories of issues: - `structural`: invalid OAS problems that usually block correctness, such as schema violations, invalid shapes, unresolved references, or mismatches between path definitions and the spec structure. - `quality`: documentation completeness problems such as missing `description`, `summary`, `example`, or `examples`. When reporting results, always separate these categories. Lead with structural issues first. ## Required interaction flow 1. Ask what APIs the developer is working on. 2. Ask for one or more HTTP API paths (for example `/api/fleet/agent_policies`). 3. Refresh generated OAS first when needed by following the environment setup flow in `validate-oas`. 4. Run validation with those route-style `--path` filters. 5. Classify the resulting issues into `structural` vs `quality`. 6. Display the command output directly so the developer can see current issues. Do not skip questions (1) and (2) unless the developer already provided the API paths. ## Path format guidance Use normal route-style API paths for `--path` (human-readable): - `/api/fleet/agent_policies` - `/internal/fleet/outputs` Do not manually convert to JSON pointers. The CLI handles conversion for error filtering internally. Multiple path filters are supported: ```bash node ./scripts/validate_oas_docs.js \ --path /api/fleet/agent_policies \ --path /internal/fleet/outputs ``` ## Commands Default scoped validation: ```bash node ./scripts/validate_oas_docs.js --only traditional --path <api_route_prefix> ``` Scope to one offering when requested: ```bash node ./scripts/validate_oas_docs.js --only traditional --path <api_route_prefix> node ./scripts/validate_oas_docs.js --only serverless --path <api_route_prefix> ``` Default behavior: - Unless the developer asks otherwise, always include `--only traditional` so validation runs against a single OAS output file. - Prefer `--only traditional` by default because it matches the common local debugging path and keeps output narrower. - Use `--only serverless` only when the developer explicitly asks for it. Optional structural-only summary when the raw output is noisy: ```bash node ./scripts/validate_oas_docs.js --only traditional --path <api_route_prefix> 2>&1 \ | node .agents/skills/debug-oas/scripts/extract_structural_oas_issues.js ``` If the developer wants to keep documentation issues in that helper output: ```bash node ./scripts/validate_oas_docs.js --only traditional --path <api_route_prefix> 2>&1 \ | node .agents/skills/debug-oas/scripts/extract_structural_oas_issues.js --include-docs ``` Only use the helper summary as a supplement. Keep the raw validator output available for exact debugging. ## Issue categorization Classify issues using these defaults: - `quality`: - missing `description` - missing `summary` - missing `example` - missing `examples` - `structural`: - everything else by default - examples include invalid schemas, type mismatches, missing required non-doc fields, invalid parameter definitions, unresolved refs, or malformed response/request structures Heuristic: - If the message is a docs-completeness complaint about `description`, `summary`, `example`, or `examples`, treat it as `quality`. - Otherwise treat it as `structural` unless the developer explicitly asks for a finer split. Severity guidance: - `structural` = blocking invalid OAS - `quality` = docs completeness or polish problems If a run mixes both categories, report structural counts first, then quality counts. ## Scope narrowing If the initial scope is noisy, narrow in this order: - start with a broad product area such as `/api/fleet` - narrow to a feature area such as `/api/fleet/epm` - narrow again to a route family such as `/api/fleet/epm/packages` Suggest narrower scopes when one area dominates the structural issues. ## Output behavior - Use the CLI line `Found N errors in ...` as the source of truth for issue count. - If the run has 25 or fewer issues, show the exact CLI output with no summarization. - If the run has more than 25 issues, summarize key patterns and suggest a narrower `--path` scope. - When summarizing, include: - structural issue count - quality issue count - a few issues copied verbatim from CLI output, ideally one sample per dominant category - When summarizing, use language like: - `Structural issues (invalid OAS): ...` - `Quality issues (docs gaps): ...` - Prefer full issue output (do not use `--skip-printing-issues`) when debugging. - If no issues are shown for the selected path, suggest widening or adjusting the `--path` prefix. - If only quality issues remain, say that explicitly so the developer knows the remaining work is documentation-oriented rather than structural. ## Output template When summarizing, use this shape: ```text Total issues: N Structural issues: X Quality issues: Y ```
GitHub에서 보기