[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ED0MQBA8JGNSAHXPNBJ7PC":3,"skill-same:01M7ED0MQBA8JGNSAHXPNBJ7PC":49},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":13,"repositoryHtmlUrl":25,"repositoryHomepageUrl":6,"ownerHtmlUrl":26,"ownerBlogUrl":6,"ownerDescription":27,"updatedAt":28,"install":29,"resources":42},"01M7ED0MQBA8JGNSAHXPNBJ7PC","api-docs-quality-report",null,"jonahthan433\u002FCortexOS","jonahthan433","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F211465495?v=4","01M7ECH9HPHGA89DCXHHJBTS3C","jonah.ai","01M7ECH9JCEM45DZMWPT7148S1",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fimported\u002Fproductivity\u002Fapi-docs-quality-report\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"# api-docs-quality-report\n\n# API Docs Audit Skill\n\nCrawls every API reference endpoint page on a documentation site, scores each against\n5 quality checks, detects site-wide patterns, and outputs an interactive HTML report\nmatching the style of previously-generated audits in this session.\n\n---\n\n## STEP 0 — COLLECT INPUT\n\nYou need exactly one input: the docs URL.\n\nIf the user hasn't provided it, ask:\n> Which API docs URL should I audit?\n\nIf the URL is provided, strip trailing slashes and confirm it before proceeding.\n\n**Special case — \"do the same for X\":**\nIf the user says \"do the same\" or \"same audit for X\", they want the identical workflow\nand HTML report format applied to the new URL. Proceed directly to Step 1.\n\n---\n\n## STEP 1 — DISCOVER ALL ENDPOINT PAGES\n\n### 1a. Try llms.txt first\n\nFetch `\u003Cdocs_url>\u002Fllms.txt`.\n\nIf found:\n- Extract every line matching the pattern `- [Page Title](URL): description`\n- Filter to API reference pages only — look for paths containing any of:\n  `api-reference`, `api-reference\u002F`, `\u002Fapi\u002F`, `\u002Fendpoints\u002F`, `\u002Frest\u002F`, `\u002Fdocs\u002F`, `\u002Freference\u002F` or versioned paths (e.g., `\u002Fv1\u002F`)\n- Exclude: overview\u002Findex pages (no HTTP method implied), SDK docs, CLI docs,\n  Terraform docs, guides, quickstart pages\n- Store as `ENDPOINT_PAGES[]` — list of `{title, url, description}`\n\nIf not found or returns 404:\n- Fetch the docs homepage\n- Look for a nav sidebar or sitemap link referencing API\u002Fendpoints\n- Extract all API reference page URLs from the nav structure\n- Note in the report that llms.txt was unavailable\n\n### 1b. Identify categories\n\nGroup discovered pages by their URL path prefix or nav section:\n- e.g. `\u002Fapi-reference\u002Fagents\u002F` → Agents category\n- e.g. `\u002Fapi-reference\u002Fexecutions\u002F` → Executions category\n- Pages at the root level of api-reference → Uncategorized or infer from title\n\nStore `CATEGORIES[]` — list of `{name, page_count, pages[]}`.\n\nReport discovery summary:\n> Found N endpoint pages across K categories. Fetching now...\n\n---\n\n## STEP 2 — CHECK OPENAPI SPEC AVAILABILITY\n\nBefore fetching individual pages, check if a standalone OpenAPI spec exists.\n\nTry these discovery methods in order (stop at first success):\n1. Inspect the `Link` HTTP header (RFC 8288) on the homepage or docs root for `rel=\"openapi\"` or `rel=\"describedby\"` — this is the standard discovery mechanism for API specifications\n2. `\u003Cdocs_url>\u002Fopenapi.json`\n3. `\u003Cdocs_url>\u002Fopenapi.yaml`\n4. `\u003Cdocs_url>\u002Fapi\u002Fopenapi.json`\n5. Any URL referenced in llms.txt under \"## OpenAPI Specs\"\n\n**Result:**\n- If accessible: `SPEC_AVAILABLE = true`, store the URL\n- If 404 on all attempts and no Link header found: `SPEC_AVAILABLE = false`\n\nA missing spec is itself a **top-priority finding** — record it as Issue #1.\n\n---\n\n## STEP 3 — FETCH AND PARSE ALL ENDPOINT PAGES\n\nFetch each URL in `ENDPOINT_PAGES[]`. For each page, extract:\n\n### 3a. Page-level prose description\nThe text that appears **above** the OpenAPI block (or between the `#` title and the\nfirst `## OpenAPI` heading). This is the human-written description.\n\n### 3b. OpenAPI block\nLook for a fenced code block with language hint `yaml` or `json` that contains\nan OpenAPI spec. Extract:\n- `HTTP_METHOD` — e.g. `GET`, `POST`, `PUT`, `DELETE`, `PATCH`\n- `HTTP_PATH` — e.g. `\u002Fapi\u002Fv1\u002Fagents\u002F{agent_id}\u002Fexecute`\n- `REQUEST_BODY_SCHEMA` — the requestBody schema section (if any)\n- `PARAMETERS` — path + query params (if any)\n- `RESPONSES` — the full responses object\n- `RESPONSE_200_SCHEMA` — the schema under responses.200 or 201\n\nIf no OpenAPI block found, mark `SPEC_INLINE = false`.\n\n---\n\n## STEP 4 — SCORE EACH ENDPOINT (5 CHECKS)\n\nFor every endpoint, evaluate all 5 checks. Store results as\n`{check_name: \"pass\"|\"warn\"|\"fail\", current_state: string, fix_guidance: string}`.\n\nRead `references\u002Fscoring-rules.md` for the exact scoring criteria per check.\n\n**Check 1 — Endpoint Description**\n**Check 2 — OpenAPI Spec**\n**Check 3 — Body Param Descriptions**\n**Check 4 — Response Codes**\n**Check 5 — Response Schema**\n\n---\n\n## STEP 5 — DETECT SITE-WIDE PATTERNS\n\nAfter scoring all endpoints, look for patterns that repeat across many pages.\n\nA pattern qualifies if it affects **≥ 60% of endpoints**:\n\n| Pattern to detect | How to identify |\n|---|---|\n| Universal missing error codes | All endpoints missing 401, 429, 500 etc. |\n| Universal empty response schemas | `schema: {}` on most endpoints |\n| Free-form body schemas | `additionalProperties: true` on most request bodies |\n| Inline spec only \u002F broken canonical spec | All pages embed spec inline but canonical 404s |\n| One-liner descriptions everywhere | Descriptions under 10 words on most pages |\n| 422-only validation errors | Only FastAPI's 422 documented, not business errors |\n\nFor each detected pattern, write a **single paragraph** summarising:\n- What the pattern is\n- How many endpoints it affects\n- Root cause (e.g. FastAPI auto-generation, missing middleware docs)\n- Impact on developer experience\n\nStore as `SITE_WIDE_PATTERNS[]`.\n\n---\n\n## STEP 6 — COMPILE TOP ISSUES\n\nRank the **10 most impactful issues** across all findings. Prioritise by:\n\n1. Issues affecting the most endpoints\n2. Issues on the highest-traffic \u002F most important endpoints\n3. Security-sensitive gaps (auth endpoints, credential endpoints with empty schemas)\n4. Deprecated endpoints with no migration path\n5. Spec availability (404 canonical spec blocks all SDK tooling)\n\nFor each issue, write:\n- A concise `\u003Cstrong>title\u003C\u002Fstrong>`\n- 1-2 sentence description with specific endpoint names or counts\n- Badge: FAIL or WARN\n\nStore as `TOP_ISSUES[]` (max 10).\n\n---\n\n## STEP 7 — BUILD SCORECARD\n\nFor each category, calculate:\n- `total` — endpoint count\n- `pass_count` — endpoints with all 5 checks passing\n- `warn_count` — endpoints with at least one WARN and no FAIL\n- `fail_count` — endpoints with at least one FAIL\n\nCalculate overall totals.\n\nStore as `SCORECARD[]`.\n\n---\n\n## STEP 8 — GENERATE HTML REPORT\n\nRead `references\u002Fhtml-template.md` for the complete HTML structure, CSS variables,\nJavaScript, and all section markup.\n\nSubstitute all `{{VARIABLE}}` placeholders with real audit data, ensuring all values are HTML-escaped to prevent XSS.\n\n**Key variable map:**\n\n| Variable | Source |\n|---|---|\n| `{{DOCS_URL}}` | Input URL |\n| `{{AUDIT_DATE}}` | Today's date |\n| `{{TOTAL_ENDPOINTS}}` | Count of ENDPOINT_PAGES |\n| `{{TOTAL_PASS}}` | Sum of all pass_count across categories |\n| `{{TOTAL_WARN}}` | Sum of all warn_count |\n| `{{TOTAL_FAIL}}` | Sum of all fail_count |\n| `{{SPEC_COUNT}}` | 1 if SPEC_AVAILABLE, else 0 |\n| `{{SCORECARD_ROWS}}` | Generated `\u003Ctr>` rows from SCORECARD |\n| `{{PATTERN_BOX}}` | Pattern box HTML (if SITE_WIDE_PATTERNS found) |\n| `{{TOP_ISSUES_HTML}}` | Generated issue row HTML from TOP_ISSUES |\n| `{{SIDEBAR_LINKS}}` | Generated sidebar `\u003Cdiv class=\"sbl\">` links |\n| `{{SECTIONS_HTML}}` | All section HTML for each category |\n\nFor section HTML generation rules, see `references\u002Fhtml-template.md` → Section: SECTIONS_HTML.\n\n**Output the file to:**\n```\n\u002Fmnt\u002Fuser-data\u002Foutputs\u002F\u003Cslug>-api-audit-report.html\n```\nWhere `\u003Cslug>` is the domain name with dots replaced by hyphens\n(e.g. `docs.kubiya.ai` → `kubiya-ai`).\n\nThen call `present_files` to deliver it.\n\n---\n\n## ERROR HANDLING\n\n| Situation | Action |\n|---|---|\n| `llms.txt` returns 404 | Crawl nav links from homepage; note in report |\n| Individual endpoint page returns 404 | Skip it; add to \"inaccessible pages\" count in footer |\n| Page has no OpenAPI block | Score Spec check as FAIL; still score other checks from prose |\n| Page has no prose description | Score Description as FAIL with note \"No prose description\" |\n| Endpoint page is robots.txt blocked | Note in report; do not fetch |\n| More than 200 endpoints found | Batch fetching — process in groups of 20, progress-report to user |\n| Canonical spec accessible | Note as positive finding; do not flag as issue |\n\n---\n\n## WHAT NOT TO DO\n\n- ❌ Never start generating HTML before all pages are fetched and scored\n- ❌ Never skip an endpoint page — fetch every one listed in llms.txt\n- ❌ Never infer scores from page titles alone — fetch the actual page content\n- ❌ Never mark Response Codes as PASS just because 200 is documented\n- ❌ Never mark Response Schema as PASS for `schema: {}` — that is FAIL\n- ❌ Never mark Body Params as PASS for `additionalProperties: true` — that is WARN at minimum\n- ❌ Never report a pattern as site-wide unless it affects ≥ 60% of endpoints\n- ❌ Never put generic fix text — every fix_guidance must reference the specific endpoint\n\n---\n\n## REFERENCE FILES\n\n- `references\u002Fscoring-rules.md` — Exact PASS\u002FWARN\u002FFAIL criteria for all 5 checks,\n  with worked examples. **Read before scoring any endpoint.**\n\n- `references\u002Fhtml-template.md` — Complete HTML\u002FCSS\u002FJS template with all section\n  markup, variable map, and rendering instructions.\n  **Read before writing any HTML.**\n",{},"main","38b32c99e7ed0b8e215d638e92cfa452c1ec3079","skills\u002Fimported\u002Fproductivity\u002Fapi-docs-quality-report","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS","https:\u002F\u002Fgithub.com\u002Fjonahthan433","AI Consultant","2026-10-24 05:13:39",{"source":7,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add jonahthan433\u002FCortexOS --skill api-docs-quality-report",{"tool":35,"command":36},"bunx","bunx skills add jonahthan433\u002FCortexOS --skill api-docs-quality-report",{"tool":38,"command":39},"pnpm","pnpm dlx skills add jonahthan433\u002FCortexOS --skill api-docs-quality-report","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fimported\u002Fproductivity\u002Fapi-docs-quality-report\u002FSKILL.md",true,[43],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},"skill.json","REFERENCE","参考文档",318,"https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fimported\u002Fproductivity\u002Fapi-docs-quality-report\u002Fskill.json",[50,56,62,68,74,80],{"skillNo":51,"name":52,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":18},"01M7EDQZDQX3Q8Y7GCQX6KN9V7","opportunity-brief","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fsales\u002Fopportunity-brief\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":18},"01M7EDQYA0V9Y99VKBREJJ3MRT","morning-intel","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fmorning-intel\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7EDQVX1JVY0B6PDHKKGM19G","decision-brief","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fdecision-brief\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M7EDQV1GENZAC2SZSD8KZ3GM","weekly-review","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fweekly-review\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M7EDQT2KETJ1Y3CGVN9EKW2J","system-health","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fops\u002Fsystem-health\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M7EDQQN2JK3XPWMS1M4T0F3K","backup-restore","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fops\u002Fbackup-restore\u002FSKILL.md",[],[]]