# Omg

> Writes and edits .omg.md files, a human-first DSL for API specification that compiles to OpenAPI 3.1.

- Skill: `majiayu000/omg` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add majiayu000/omg`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/omg/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs, Docs & Writing, REST & GraphQL APIs, Technical Writing
- Tags: Api Specification, Dsl, Markdown, Omg, Openapi
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-08-22
- Page: https://skillmd.com/skills/majiayu000/omg

---


# OMG (OpenAPI Markdown Grammar)

## Quick Start

```markdown
---
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.md` files** - 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` or `{{> path/to/partial }}` for reuse

## CLI

```bash
node packages/omg-cli/dist/cli.js build api.omg.md -o output.yaml
node packages/omg-cli/dist/cli.js parse endpoint.omg.md
```

## Notes

- Compiles to OpenAPI 3.1, ~6x reduction in lines
- Run `npm run build` before using CLI

