OpenAPI Tag Hierarchy Governance is a development Claude Skill built by Musher. Best for: API architects and technical writers design scalable tag structures for OpenAPI documentation that enables filtered navigation and SDK organization across 5-500+ endpoints..
Design, audit, and implement hierarchical OpenAPI tag taxonomy with classification types, migration strategies, and governance rules.
name: governing-tag-hierarchy version: 1.0.0 user-invocable: false description: Guide design, review, audit, and implementation of OpenAPI tag taxonomy including 3.2.0 hierarchical tags with parent, summary, and kind fields, tag classification types (navigation, badge, lifecycle, audience), migration strategies from flat tags and x-tagGroups vendor extensions, and tag governance for documentation portals and SDK grouping. Use when designing tag taxonomy, reviewing tag structure, migrating from flat tags, implementing hierarchical tags, or organizing API endpoints by domain. Triggered by: tag hierarchy, hierarchical tags, tag taxonomy, x-tagGroups, tag classification, tag kind, tag parent, flat tags, tag migration, endpoint grouping, tag governance, API tags, documentation tags, navigation tags. allowed-tools:
Comprehensive governance for OpenAPI tag taxonomy -- from flat tag lists through vendor extensions to the 3.2.0 hierarchical tag specification.
Tags are the primary navigation mechanism in API documentation portals. A flat, ungoverned tag list produces a wall of unrelated groups that consumers cannot scan. Hierarchical tags with classification metadata enable documentation portals to render navigation trees, badge indicators, and audience-filtered views. This skill enforces tag structure that scales from 5 endpoints to 500.
Boundary: This skill governs tag structure within the OpenAPI specification document. For framework-specific tag configuration (e.g., FastAPI's openapi_tags parameter), see api-route-governance/governing-openapi-contracts.
Use this skill when designing tag taxonomy, migrating from flat tags, or implementing hierarchical tags for large API surfaces.
Tags in current OpenAPI versions are flat string labels with optional metadata:
tags:
- name: Projects
description: "Create, read, update, and delete projects"
- name: Organizations
description: "Manage organizations and membership"
- name: Authentication
description: "Token management and authentication flows"
paths:
/projects:
get:
tags:
- Projects
| Rule | Rationale |
|------|-----------|
| Every operation must have at least one tag | Untagged operations appear in "default" group |
| One primary tag per operation | Multiple tags duplicate the operation in docs |
| Tags use PascalCase plural nouns | Consistency with resource naming |
| Every tag must have a top-level definition with description | Undeclared tags appear without context |
| Tag order in the tags array determines display order | Most important resources first |
Tags serve different purposes beyond navigation. Classify each tag by its function:
| Kind | Purpose | Example | Display Treatment |
|------|---------|---------|-------------------|
| navigation | Primary grouping for endpoint browsing | Projects, Organizations | Sidebar section |
| badge | Operational status indicator | Beta, Deprecated, Experimental | Visual badge on endpoint |
| lifecycle | Release stage of the endpoint group | GA, Preview, Sunset | Status indicator |
| audience | Who should use these endpoints | Public, Partner, Internal | Visibility filter |
Without native support, encode classification in extensions:
tags:
- name: Projects
description: "CRUD operations for projects"
x-kind: navigation
- name: Beta
description: "Endpoints in beta -- subject to breaking changes"
x-kind: badge
- name: Partner
description: "Available to contracted partners only"
x-kind: audience
When an operation needs both a navigation tag and a badge tag:
paths:
/projects/{id}/analytics:
get:
tags:
- Projects # navigation: where to find it
- Beta # badge: stability indicator
Rule: At most one navigation tag and one badge/lifecycle/audience tag per operation. Never assign two navigation tags.
OpenAPI 3.2.0 introduces structured tag objects with hierarchy support:
tags:
- name: Platform
summary: "Core platform APIs"
kind: navigation
- name: Projects
summary: "Project management"
parent: Platform
kind: navigation
- name: Organizations
summary: "Organization and membership"
parent: Platform
kind: navigation
- name: Integrations
summary: "Third-party integration APIs"
kind: navigation
- name: Webhooks
summary: "Webhook configuration and delivery"
parent: Integrations
kind: navigation
- name: Beta
summary: "Subject to breaking changes without notice"
kind: badge
| Field | Type | Purpose |
|-------|------|---------|
| name | string | Tag identifier (unchanged from 3.0) |
| summary | string | Short description for navigation display |
| description | string | Detailed description (Markdown) |
| parent | string | Name of the parent tag (creates hierarchy) |
| kind | string | Classification: navigation, badge, etc. |
| externalDocs | object | Link to external documentation |
| Rule | Rationale | |------|-----------| | Maximum 3 levels deep | Deeper trees create navigation fatigue | | Parent tags may or may not have operations directly | A parent can be purely organizational | | Child tags inherit the parent's audience scope | Internal parent means internal children | | Hierarchy must form a tree (no cycles, no multiple parents) | Display rendering requires tree structure |
Platform (navigation)
├── Projects (navigation)
├── Organizations (navigation)
└── Members (navigation)
Integrations (navigation)
├── Webhooks (navigation)
└── OAuth Apps (navigation)
Beta (badge)
Deprecated (badge)
Partner (audience)
Collect all tags used across the specification:
# Before: flat, ungoverned tags
tags:
- name: projects
- name: orgs
- name: members
- name: auth
- name: webhooks
- name: admin
- name: beta
Assign a classification to each tag:
| Current Tag | Classification | Action |
|-------------|---------------|--------|
| projects | navigation | Rename to Projects (PascalCase) |
| orgs | navigation | Rename to Organizations (full word) |
| members | navigation | Keep as Members |
| auth | navigation | Rename to Authentication |
| webhooks | navigation | Keep as Webhooks |
| admin | audience | Rename to Internal |
| beta | badge | Rename to Beta |
Group navigation tags under parent categories:
tags:
- name: Platform
description: "Core platform resources"
x-kind: navigation
- name: Projects
description: "Project management"
x-kind: navigation
x-parent: Platform
- name: Organizations
description: "Organization and membership management"
x-kind: navigation
x-parent: Platform
Update every operation's tag assignment to use the new taxonomy.
x-tagGroupsx-tagGroups PatternRedocly and other tools support x-tagGroups for visual grouping:
x-tagGroups:
- name: Platform
tags:
- Projects
- Organizations
- Members
- name: Integrations
tags:
- Webhooks
- OAuth Apps
Map each x-tagGroups group to a parent tag:
# Before: x-tagGroups (vendor extension)
x-tagGroups:
- name: Platform
tags: [Projects, Organizations, Members]
# After: 3.2.0 hierarchical tags
tags:
- name: Platform
kind: navigation
- name: Projects
parent: Platform
kind: navigation
- name: Organizations
parent: Platform
kind: navigation
- name: Members
parent: Platform
kind: navigation
Migration rules:
x-tagGroups entry becomes a parent tag with kind: navigationparent field pointing to the group namex-tagGroups after migration (retain as fallback only during transition)When reviewing or auditing tag hierarchy, evaluate these dimensions:
tags array?x-tagGroups been migrated to hierarchical tags (or planned)?Operations without tags appear in a "default" or "Other" group, breaking navigation.
Creating a unique tag for every endpoint instead of grouping by resource domain. 50 tags is 50 sidebar items.
Mixing projects, Projects, and PROJECTS across the spec. Tags are case-sensitive.
Assigning tags: [Projects, Analytics] to one operation -- it appears in both navigation groups, confusing consumers.
Using tags in operations without defining them in the top-level tags array. Documentation portals render them without description or ordering.
Tags like Create, Update, Delete that classify by action instead of resource domain. Tags should group by what (resources), not how (actions).
/plugin install openapi-tag-hierarchy-governance@musher-devRequires Claude Code CLI.
API architects and technical writers design scalable tag structures for OpenAPI documentation that enables filtered navigation and SDK organization across 5-500+ endpoints.
No reviews yet. Be the first to review this skill.