SKILL.md
OMG (OpenAPI Markdown Grammar)
Quick Start
---
method: GET
path: /accounts/{accountId}
operationId: get-account
tags: [Accounts]
---
# Get Account
Returns details of a specific account.
```omg.path
{ accountId: uuid }
```omg.response { id: uuid, name: string, balance: decimal }
Core Concepts
.omg.mdfiles - Markdown with YAML frontmatter, one endpoint per file- Code blocks:
omg.path,omg.query,omg.body,omg.response,omg.response.{code},omg.returns,omg.type - Types:
string,integer,decimal,boolean,date,datetime,uuid,any - Syntax:
field?: type(optional),type[](array),"a"|"b"(enum),@min(0)(constraints) - Partials:
@path/to/partial,{{> path/to/partial }}, or a Markdown link to a.omg.mdfile ([label](../partials/x.omg.md), resolved relative to the document and clickable in GitHub) for reuse
CLI
node packages/omg-md-cli/dist/cli.js build api.omg.md -o output.yaml
node packages/omg-md-cli/dist/cli.js parse endpoint.omg.md
Notes
- Compiles to OpenAPI 3.1, ~6x reduction in lines
- Run
npm run buildbefore using CLI