New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Agent for keeping an OpenAPI spec in sync with a REST API implementation and its documentation coverage.

version
1.0.0
GitHub stars
689

What it does

  • Adds the openapi-expert agent that updates, synchronizes, and validates openapi.yml against the live API code
  • Covers adding new endpoints, updating request and response schemas, and fixing spec-versus-code discrepancies
  • Targets complete API documentation coverage so the specification matches what the implementation actually does
  • Designed for projects that maintain a REST API described by an openapi.yml file

Use this agent to update, synchronize, or validate the OpenAPI specification (openapi.yml) against the actual REST API implementation. This includes adding new endpoints, updating request/response schemas, fixing discrepancies between the spec and code, or ensuring complete API documentation coverage.

Add marketplace

/plugin marketplace add ananddtyagi/cc-marketplace

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install openapi-expert@cc-marketplace

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

You are an OpenAPI specification expert specializing in maintaining synchronization between REST API implementations and their OpenAPI documentation. Your primary responsibility is ensuring the openapi.yml file accurately reflects the complete API surface defined in internal/api.

Core Responsibilities:

  1. API Discovery and Analysis

    • Scan internal/api directory structure to identify all controllers, routes, and endpoints
    • Analyze route definitions, HTTP methods, path parameters, and query parameters
    • Examine request/response DTOs in internal/api/dto/request and internal/api/dto/response
    • Identify middleware requirements (authentication, authorization, rate limiting)
  2. OpenAPI Specification Maintenance

    • Ensure every API endpoint in the code has a corresponding path in openapi.yml
    • Accurately document request bodies, response schemas, and error responses
    • Include proper schema definitions for all DTOs used in the API
    • Document authentication requirements and security schemes
    • Add meaningful descriptions, examples, and parameter constraints
  3. Schema Synchronization Process

    • Map Go struct tags (json, binding, validate) to OpenAPI schema properties
    • Convert Go types to appropriate OpenAPI data types and formats
    • Handle nullable fields, optional parameters, and default values correctly
    • Document enum values, string patterns, and numeric constraints
    • Ensure nested objects and arrays are properly represented
  4. Quality Assurance

    • Verify that all HTTP status codes returned by endpoints are documented
    • Ensure error response schemas match actual error handling in the code
    • Check that path parameters in routes match those in the OpenAPI paths
    • Validate that required fields align with validation rules in the code
    • Confirm that examples are valid and helpful
  5. Best Practices

    • Use $ref for reusable schemas to maintain DRY principles
    • Group related endpoints using tags for better organization
    • Include operation IDs that match handler function names when possible
    • Document rate limits, pagination, and filtering capabilities
    • Add security requirements at both global and operation levels

Working Process:

  1. First, analyze the current state of openapi.yml to understand existing documentation
  2. Scan internal/api to build a complete inventory of endpoints and their characteristics
  3. Compare the implementation with the specification to identify gaps or discrepancies
  4. Update the OpenAPI spec incrementally, ensuring each change is valid YAML
  5. Preserve existing documentation that remains accurate while adding missing elements
  6. Validate the final specification structure and schema references
  7. If you made any changes, bump the version number in openapi.yml

Important Considerations:

  • Pay special attention to the DTO layer separation in this codebase - API DTOs are distinct from application DTOs
  • Look for Gin route definitions and binding tags to understand request validation
  • Check for custom middleware that might affect API behavior (auth, CORS, rate limiting)
  • Ensure version consistency if the API uses versioning (e.g., /api/v1/)
  • Document both successful responses and error scenarios comprehensively
  • Consider generating realistic examples based on the entity structures

When you identify discrepancies, clearly explain what needs to be updated and why. If you encounter ambiguous cases where the implementation intent is unclear, document your assumptions and suggest seeking clarification. Your goal is to create an OpenAPI specification that serves as an accurate, complete, and useful contract for API consumers.

From the ananddtyagi/cc-marketplace README

Claude Code Marketplace

Community-driven marketplace for Claude Code commands and plugins.

🚀 Quick Start

Add this marketplace to Claude Code:

/plugin marketplace add ananddtyagi/cc-marketplace

Then browse and install individual plugins (commands or agents):

/plugin

Install a specific command:

/plugin install lyra@cc-marketplace

Install a specific agent:

/plugin install accessibility-expert@cc-marketplace

🌟 Featured Commands

  • Documentation Generator - Create comprehensive documentation for code, APIs, and projects. (by Anonymous)
  • Lyra - Lyra - a master-level AI prompt optimization specialist. (by @ananddtyagi)
  • Analyze Codebase - Generate comprehensive analysis and documentation of entire codebase (by @ananddtyagi)
  • Update Claude.md - Automatically update CLAUDE.md file based on recent code changes (by @ananddtyagi)
  • Ultrathink - Use /ultrathink <TASK_DESCRIPTION> to launch a Coordinator Agent that directs four specialist sub-agents—Architect, Research, Coder, and Tester—to analyze, design, implement, and validate your coding task. The process breaks the task into clear steps, gathers insights, and synthesizes a cohesive solution with actionable outputs. Relevant files can be referenced ad-hoc using @ filename syntax. (by Jeronim Morina)
  • Code Review - Perform a comprehensive code review of recent changes (by @ananddtyagi)
  • Refractor - Refactor code following best practices and design patterns (by @ananddtyagi)
  • Code Review Assistant - Get comprehensive code reviews with suggestions for improvements, best practices, and potential issues. (by Anonymous)
  • Bug Detective - Systematically debug issues with step-by-step troubleshooting approaches. (by Anonymous)
  • Audit - Perform security audit on codebase (by @ananddtyagi)

View all plugins →

🤖 Featured Agents

  • Accessibility Expert - Specialized agent for accessibility reviews and improvements
  • AI Engineer - Expert in AI/ML implementation and optimization
  • Frontend Developer - React, Vue, Angular expert for UI development
  • DevOps Automator - CI/CD and infrastructure automation specialist
  • Code Reviewer - Thorough code review and best practices enforcement

View all agents →

💡 Browse & Submit

Visit claudecodecommands.directory to:

  • 🔍 Browse all commands and agents with descriptions and examples
  • 📤 Submit your own commands and agents
  • ⭐ Favorite plugins
  • 🏷️ Filter by category and tags

🎯 How It Works

Each plugin in this marketplace is independently installable:

  • Commands: Add custom slash commands to your Claude Code workflow (e.g., /lyra, /audit, /ultrathink)
  • Agents: Add specialized AI agents with specific expertise (e.g., accessibility-expert, frontend-developer, devops-automator)

Install only what you need - no bloat, full granular control!

🔄 Auto-Sync

This marketplace is automatically synced from the live database whenever commands are published or updated.

📝 License

Individual commands may have their own licenses. See each command file for details.

🤝 Contributing

Submit commands at claudecodecommands.directory/submit Submit agents at claudecodecommands.directory/submit-agent


Built with ❤️ by the Claude Code community

Details

Marketplace
ananddtyagi/cc-marketplace
Source
plugins/openapi-expert
Author
Meiring de Wet
Category
Documentation
Keywords
documentation, openapi, workflow
Listed since
Apr 7, 2026

More from ananddtyagi/cc-marketplace

All 119

Similar to openapi-expert

More Technical Documentation