alps2openapi
БесплатноБез исполняемых скриптовНе проверенGenerate OpenAPI specification from ALPS profile. Converts ALPS semantic descriptors to RESTful API definitions with automatic validation.
Об этом скилле
ALPS to OpenAPI Converter
Generate OpenAPI 3.1 specification from ALPS profile with validation loop.
When to Use
- User asks to generate OpenAPI from ALPS
- User wants to create REST API documentation from ALPS profile
- User says "alps2openapi", "convert to openapi", "generate api spec"
Conversion Rules
1. Transition Type → HTTP Method
| ALPS type | HTTP Method | Description |
|---|---|---|
| safe | GET | Read operations |
| unsafe | POST | Create operations (non-idempotent) |
| idempotent | PUT/DELETE/PATCH | Update/Delete operations (idempotent) |
Determining idempotent Method
Infer from transition ID:
PUT (Update):
- Keywords:
update,edit,modify,change,set,replace - Example:
doUpdateUser,doEditPost,doSetStatus
DELETE:
- Keywords:
delete,remove,cancel,clear,destroy - Example:
doDeleteUser,doRemoveItem,doCancelOrder
PATCH:
- Keywords:
toggle,patch,increment,decrement - Example:
doToggleComplete,doPatchProfile
2. Transition ID → operationId
Use ALPS transition ID directly as operationId:
goTodoList→operationId: goTodoListdoCreateTodo→operationId: doCreateTodo
3. Path Generation
| Transition Pattern | Path | Method |
|---|---|---|
| goXxxList | /xxxs | GET |
| goXxxDetail | /xxxs/{xxxId} | GET |
| doCreateXxx | /xxxs | POST |
| doUpdateXxx | /xxxs/{xxxId} | PUT |
| doDeleteXxx | /xxxs/{xxxId} | DELETE |
| doToggleYyy | /xxxs/{xxxId}/yyy | PATCH |
Path Naming Rules
- Use lowercase plural nouns:
/todos,/users,/products - Use kebab-case for multi-word:
/order-items,/user-profiles - Nested resources:
/users/{userId}/posts
4. Schema Generation
Semantic Fields → Properties
Map ALPS semantic descriptors to OpenAPI schema properties:
# ALPS
{"id": "todoId", "title": "Task ID", "def": "https://schema.org/identifier"}
# OpenAPI
todoId:
type: string
description: Task ID
States → Schema Names
ALPS states become OpenAPI schema names:
TodoList→TodoListItem(for list responses)TodoDetail→TodoDetail(for single item responses)
5. schema.org → OpenAPI Format Mapping
| schema.org | OpenAPI |
|---|---|
| https://schema.org/DateTime | type: string, format: date-time |
| https://schema.org/Date | type: string, format: date |
| https://schema.org/Time | type: string, format: time |
| https://schema.org/Email | type: string, format: email |
| https://schema.org/URL | type: string, format: uri |
| https://schema.org/identifier | type: string |
| https://schema.org/Integer | type: integer |
| https://schema.org/Number | type: number |
| https://schema.org/Boolean | type: boolean |
| https://schema.org/Text | type: string |
6. Input Parameters
Extract from transition's nested descriptors:
{"id": "doCreateTodo", "type": "unsafe", "rt": "#TodoDetail", "descriptor": [
{"href": "#title"},
{"href": "#description"},
{"href": "#dueDate"}
]}
Becomes:
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTodoRequest'
With schema:
CreateTodoRequest:
type: object
properties:
title:
type: string
description:
type: string
dueDate:
type: string
format: date-time
required:
- title
7. HTTP Status Codes
| Operation | Success | Client Error | Not Found |
|---|---|---|---|
| GET (single) | 200 | 400 | 404 |
| GET (list) | 200 | 400 | - |
| POST | 201 | 400, 409 | - |
| PUT | 200 | 400 | 404 |
| PATCH | 200 | 400 | 404 |
| DELETE | 204 | 400 | 404 |
8. Error Response Schema
Always include standard error schema:
components:
schemas:
Error:
type: object
properties:
code:
type: string
description: Error code
message:
type: string
description: Error message
required:
- code
- message
responses:
NotFound:
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
BadRequest:
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
9. Required Fields
Request (POST/PUT):
- Fields in transition's descriptor are required by default
- Mark as optional with
(optional)in ALPS doc
Response:
- ID field is always required
- Primary fields (title, name, etc.) are required
- Timestamps (createdAt, updatedAt) are required
10. Tags from ALPS
Use ALPS tag attribute for OpenAPI tags:
{"id": "goTodoList", "type": "safe", "rt": "#TodoList", "tag": "todo"}
Becomes:
tags:
- todo
Workflow
- Read ALPS profile - Parse JSON or XML
Установить alps2openapi в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл alps2openapi?
Generate OpenAPI specification from ALPS profile. Converts ALPS semantic descriptors to RESTful API definitions with automatic validation.
Как установить скилл alps2openapi?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл alps2openapi запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic