Agent skill

Diagnose Generation Failure

by trycompai in trycompai/comp

A skill your agent uses when SDK generation failed or seeing errors.

Apache-2.0Auto-check passedBackend & APIs

Install Diagnose Generation Failure

skills CLI
$ npx skills add trycompai/comp --skill diagnose-generation-failure -a claude-code

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

GitHub CLI
$ gh skill install trycompai/comp diagnose-generation-failure --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/trycompai/comp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/diagnose-generation-failure .claude/skills/diagnose-generation-failure && 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
diagnose-generation-failure
GitHub stars
2k
Token cost
~938 tokens
SKILL.md length
240 words
Files
1
Skills in repo
31
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses when SDK generation failed or seeing errors.

  • Works in 2 steps: Run lint to get detailed errors → Categorize issues
  • SDK generation failed
  • SKILL.md covers When to Use, Inputs, Outputs and Diagnosis Steps, plus 6 more sections
  • Calls yq

What it does

Diagnose Generation Failure is an agent skill from trycompai/comp. Use when SDK generation failed or seeing errors. Triggers on "generation failed", "speakeasy run failed", "SDK build error", "workflow failed", "Step Failed", "why did generation fail"

Its SKILL.md is about 940 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering OpenAPI specifications. The repository describes itself as: AI Native platform to get companies compliant - Vanta & Drata Alternative. The licence is Apache-2.0.

When your agent uses it

  • SDK generation failed
  • Generation failed
  • Speakeasy run failed
  • SDK build error

Example prompts

  • “generation failed”
  • “speakeasy run failed”
  • “SDK build error”
  • “/diagnose-generation-failure”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Run lint to get detailed errors
  2. Categorize issues

What it can do on your machine

Read from SKILL.md and the folder at commit 0117612. 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

    Shell commands in SKILL.md call:

    • yq

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

  • Network

    No URLs in SKILL.md.

    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

Diagnose Generation Failure loads about 938 tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 240 words of instructions outside code blocks.

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

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from trycompai/comp at commit 0117612, republished under its Apache-2.0 licence (© trycompai). 240 words, ~938 tokens.

Download SKILL.mdSave it as .claude/skills/diagnose-generation-failure/SKILL.md (or your agent's skills folder).
name
diagnose-generation-failure
description
Use when SDK generation failed or seeing errors. Triggers on "generation failed", "speakeasy run failed", "SDK build error", "workflow failed", "Step Failed", "why did generation fail"
license
Apache-2.0

diagnose-generation-failure

When SDK generation fails, diagnose the root cause and determine the fix strategy.

When to Use

  • speakeasy run failed with errors
  • SDK generation produced unexpected results
  • User says: "generation failed", "SDK build error", "why did generation fail"

Inputs

InputRequiredDescription
OpenAPI specYesPath to spec that failed generation
Error outputHelpfulError messages from failed run

Outputs

OutputDescription
DiagnosisRoot cause of failure
Fix strategyOverlay vs spec fix vs user decision
Action itemsSpecific steps to resolve

Diagnosis Steps

  1. Run lint to get detailed errors:

    bash
    speakeasy lint openapi --non-interactive -s <spec-path>
  2. Categorize issues:

    • Fixable with overlays: Missing descriptions, poor operation IDs
    • Requires spec fix: Invalid schema, missing required fields
    • Requires user input: Design decisions, authentication setup

Decision Framework

Issue TypeFix StrategyExample
Missing operationIdOverlayUse speakeasy suggest operation-ids
Missing descriptionOverlayAdd via overlay
Invalid $refAsk userBroken reference needs spec fix
Circular referenceAsk userDesign decision needed
Missing securityAsk userAuth design needed

What NOT to Do

  • Do NOT disable lint rules to hide errors
  • Do NOT try to fix every issue one-by-one
  • Do NOT modify source spec without asking
  • Do NOT assume you can fix structural problems

Troubleshooting Tree

PROBLEM
  │
  ├─ ResponseValidationError at runtime?
  │    └─ SDK types don't match server responses
  │         ├─ Run contract tests to identify mismatches
  │         └─ Fix spec or create overlay to correct types
  │
  ├─ SDK doesn't match live API behavior?
  │    ├─ Spec may have drifted from API
  │    │    → Run contract tests to detect drift
  │    └─ Third-party spec may be inaccurate
  │         → Validate with contract testing before trusting
  │
  ├─ Type mismatch errors in generated SDK?
  │    ├─ At compile time → Check spec schema definitions
  │    └─ At runtime → Server returns unexpected types
  │                    → Contract testing required
  │
  └─ Enum value not recognized?
       └─ API returned value not in spec enum
            ├─ Add missing value to spec/overlay
            └─ Or use open enums for anti-fragility

Working with Large OpenAPI Specs

Use yq (YAML) or jq (JSON) to inspect specs without loading full content:

bash
# List all paths
yq '.paths | keys' spec.yaml

# Inspect a specific endpoint
yq '.paths["/users/{id}"]' spec.yaml

# List all schema names
yq '.components.schemas | keys' spec.yaml

# List all operationIds
yq '[.paths[][].operationId // empty] | unique' spec.yaml

Strategy Document

For complex issues, produce a document:

markdown
## OpenAPI Spec Analysis

### Blocking Issues (require user input)
- [List issues that need human decision]

### Fixable Issues (can use overlays)
- [List issues with proposed overlay fixes]

### Recommended Approach
[Your recommendation]
  • manage-openapi-overlays - Fix issues with overlays
  • setup-sdk-testing - Contract testing for validation
  • writing-openapi-specs - Spec design best practices

© trycompai, 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

Just SKILL.md in .agents/skills/diagnose-generation-failure of trycompai/comp.

Open the folder on GitHubat commit 0117612

Compare with similar skills

Diagnose Generation Failure 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.

Diagnose Generation Failure compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Diagnose Generation Failure this skilltrycompai/comp2k—~938Automated safety check: PassApache-2.0
ToolJet Marketplace Plugin BuilderToolJet/ToolJet41k—~2.1kAutomated safety check: PassAGPL-3.0
CLI Creatorhuangruiteng/CS-Notes4k2 repos~2.7kAutomated safety check: PassApache-2.0
Debug Oaselastic/kibana21k—~1.4kAutomated safety check: PassCustom licence
Api2clialexknowshtml/api2cli455—~2.9kAutomated safety check: PassMIT
Sync APImollie/mollie-api-node297—~3.6kAutomated safety check: PassBSD-3-Clause

Similar skills

  • Turns an API description, such as an OpenAPI file or a Postman collection, into a connector plugin for ToolJet's marketplace and checks it with the repo's validator.

    41k GitHub stars~2.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • CLI Creator

    huangruiteng/CS-Notes

    Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script.

    4k GitHub starsUsed in 2 repos~2.7k tokens
    Backend & APIsAuto-check passed
  • Debug Oas

    elastic/kibana

    Official

    A skill your agent uses 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…

    21k GitHub stars~1.4k tokensUpdated today
    Backend & APIsAuto-check passed
  • Api2cli

    alexknowshtml/api2cli

    Generate a working CLI from any API, then wrap it in a Claude Code skill.

    455 GitHub stars~2.9k tokensUpdated 7 mo ago
    Backend & APIsAuto-check passed
  • Sync API

    mollie/mollie-api-node

    Reconcile the SDK against the Mollie API spec — checks and optionally fixes types, JSDoc, enums, deprecations, endpoint coverage, and helper wiring.

    297 GitHub stars~3.6k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Vibex

    Raja0sama/vibex

    Diagrams and checkable docs from a codebase. An agent skill from Raja0sama/vibex.

    388 GitHub stars~7.8k tokensUpdated 3 days ago
    Backend & APIsAuto-check passed

More from trycompai/comp

All 31 skills in this repo
  • API Endpoint Contract

    trycompai/comp

    The contract every new or modified API endpoint must follow so it is correct for the public OpenAPI spec, the MCP server (npm @trycompai/mcp-server), the ValidationPipe, and the docs.

    2k GitHub stars~2.7k tokensUpdated 2 days ago
    Auto-check passed
  • Check Results Service

    trycompai/comp

    How to reuse ANY integration check's results in a feature via the universal CheckResultsService (apps/api integration-platform).

    2k GitHub stars~2.1k tokensUpdated 2 days ago
    Auto-check passed
  • Data

    trycompai/comp

    A skill your agent uses when implementing data fetching, API calls, server/client components, or SWR hooks

    2k GitHub stars~955 tokensUpdated 2 days ago
    Auto-check passed
  • Forms

    trycompai/comp

    A skill your agent uses when building forms - covers React Hook Form, Zod validation, and form patterns

    2k GitHub stars~1k tokensUpdated 2 days ago
    Auto-check passed
  • Code

    trycompai/comp

    A skill your agent uses when writing TypeScript/React code - covers type safety, component patterns, and file organization

    2k GitHub stars~909 tokensUpdated 2 days ago
    Auto-check: warnings
  • Generate MCP Server

    trycompai/comp

    A skill your agent uses when generating an MCP server from an OpenAPI spec with Speakeasy.

    2k GitHub stars~2.7k tokensUpdated 2 days ago
    Auto-check passed

Questions about Diagnose Generation Failure

What does Diagnose Generation Failure do?

A skill your agent uses when SDK generation failed or seeing errors. Diagnose Generation Failure is an agent skill from trycompai/comp. Use when SDK generation failed or seeing errors.

When should I use Diagnose Generation Failure?

Diagnose Generation Failure fits situations like: SDK generation failed; generation failed; speakeasy run failed; SDK build error.

How do I install Diagnose Generation Failure in Claude Code?

Run `npx skills add trycompai/comp --skill diagnose-generation-failure -a claude-code`. Or copy the skill folder (.agents/skills/diagnose-generation-failure in trycompai/comp) into .claude/skills/diagnose-generation-failure in your project. Claude Code loads it when a task matches its description.

How do I install Diagnose Generation Failure in Codex?

Run `npx skills add trycompai/comp --skill diagnose-generation-failure -a codex`. Or copy the skill folder (.agents/skills/diagnose-generation-failure in trycompai/comp) into .agents/skills/diagnose-generation-failure in your project. Codex loads it when a task matches its description.

Can I use Diagnose Generation Failure 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 trycompai/comp --skill diagnose-generation-failure -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/diagnose-generation-failure, .gemini/skills/diagnose-generation-failure, .github/skills/diagnose-generation-failure and .opencode/skills/diagnose-generation-failure in your project.

What does Diagnose Generation Failure need to run?

Going by SKILL.md and its folder, Diagnose Generation Failure needs the command-line tools its instructions call (yq).

Does Diagnose Generation Failure access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Diagnose Generation Failure 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. Review the folder before installing.

What licence does Diagnose Generation Failure use?

Diagnose Generation Failure is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Diagnose Generation Failure use?

About 938 tokens (SKILL.md is roughly 3.8k 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 Diagnose Generation Failure?

Skills that share tags, products or a category with Diagnose Generation Failure: ToolJet Marketplace Plugin Builder (ToolJet/ToolJet, 41k stars), CLI Creator (huangruiteng/CS-Notes, 4k stars), Debug Oas (elastic/kibana, 21k stars) and Api2cli (alexknowshtml/api2cli, 455 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Diagnose Generation Failure?

trycompai (a GitHub organization) maintains it in trycompai/comp, which has 2,023 GitHub stars. The repository holds 31 skills in this directory. The repository was last updated on October 7, 2026.

Source: trycompai/comp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.