generate-openapi-from-pr

Generates OpenAPI spec changes from Intercom PR URLs or numbers.

13|4|Updated Dec 15, 2022
One-click install
npx skills add https://github.com/intercom/Intercom-OpenAPI --skill generate-openapi-from-pr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generate-openapi-from-pr
Source: https://github.com/intercom/Intercom-OpenAPI/tree/main/.claude/skills/generate-openapi-from-pr
Command: npx skills add https://github.com/intercom/Intercom-OpenAPI --skill generate-openapi-from-pr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate OpenAPI spec changes from Intercom PRs and streamline the API documentation workflow.

Core Features & Use Cases

  • Parses Intercom PR URLs and numbers to drive OpenAPI generation
  • Fetches PR metadata and diffs, analyzes changes to API surface
  • Outputs OpenAPI changes into Intercom-OpenAPI following existing mapping rules
  • Supports large PRs by fetching affected files incrementally

Quick Start

Provide an Intercom PR URL or number and run the skill to generate the corresponding OpenAPI changes in this repo.

Frequently Asked Questions about generate-openapi-from-pr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate OpenAPI spec changes from a pull request?

To generate OpenAPI spec changes from a pull request, provide the PR URL or number to the skill. It analyzes PR diffs, identifies affected controllers and models, and outputs OpenAPI modifications following project conventions.

Can I use a PR number instead of a full URL to update API documentation?

Yes, you can use a PR number instead of a full URL to update API documentation. The skill accepts formats like intercom/intercom#12345 and fetches the necessary metadata and diffs to generate the OpenAPI updates.

How does OpenAPI codegen handle large PRs with many changed files?

OpenAPI codegen handles large PRs by fetching affected files incrementally. This approach ensures the analysis of API surface changes, including routes and version changes, remains efficient and accurate.

What is the best way to automate API docs updates from Intercom PRs?

The best way to automate API docs updates from Intercom PRs is using a skill that parses the PR details, analyzes diffs for affected models and controllers, and outputs OpenAPI changes into the target repository according to existing mapping rules.

Does generating OpenAPI specs from PRs require manual diff analysis?

Generating OpenAPI specs from PRs does not require manual diff analysis. The skill automatically fetches PR metadata, analyzes changes to the API surface, and applies existing mapping rules to output the necessary OpenAPI modifications.

When do I need to regenerate OpenAPI definitions after shipping code?

You need to regenerate OpenAPI definitions after shipping code when a PR modifies API surface elements such as controllers, models, routes, or version changes. The skill identifies these affected components from the PR diff to generate updates.