alps2mock
БесплатноБез исполняемых скриптовНе проверенGenerate multi-fidelity HTML mock from ALPS profile. Creates semantic HTML pages, three CSS fidelity levels, mock API responses, and i18n labels — all from a…
от alps-asd★ 39 звёзд на GitHubОб этом скилле
ALPS to Mock Generator
Generate a complete HTML mock site from an ALPS profile. Every CSS class in the generated HTML is an ALPS descriptor ID — zero presentation classes. This enables CSS-only fidelity switching between bare HTML, wireframe, and production quality.
When to Use
- User asks to generate a mock, prototype, or wireframe from an ALPS profile
- User says "alps2mock", "generate mock", "create wireframe", "mock from alps"
- User wants to visualize ALPS states as browsable HTML pages
- User wants to review information architecture before visual design
What It Generates
From a single ALPS profile, generate the following directory structure:
{output-dir}/
├── profile/
│ └── alps.xml # Copy of source ALPS profile
├── html/
│ ├── index.html # Home state
│ ├── catalog.html # One HTML per ALPS state
│ └── ...
├── css/
│ ├── level1.css # Bare readability
│ ├── level2.css # Wireframe (information skeleton)
│ └── level3.css # Production quality
├── api/
│ ├── home.json # HAL/HAL-FORMS mock response per state
│ └── ...
├── i18n/
│ └── labels.json # ALPS descriptor ID → human label mapping
└── mock-switch # Shell script to switch CSS fidelity
Core Principle: Semantic First HTML
Every class attribute in the generated HTML MUST be an ALPS descriptor ID. No presentation classes (bg-white, rounded-lg, flex, text-sm, etc.) are allowed in HTML.
Three layers of ALPS become CSS classes:
| Layer | Example classes | Source |
|---|---|---|
| Ontology | .title, .author, .price |
Semantic descriptors |
| Taxonomy | .Book, .Catalog, .ShoppingCart |
State descriptors |
| Choreography | .goToBookDetails, .doAddToCart |
Transition descriptors |
HTML Generation Rules
- One HTML file per ALPS state (Taxonomy descriptor with nested descriptors)
<link rel="profile" href="../profile/alps.xml">in every<head><link rel="stylesheet" href="../css/level2.css">as default stylesheet- Semantic HTML elements:
<article>for entities,<form>for unsafe/idempotent transitions,<a>for safe transitions,<nav>for navigation groups. Forms usemethod="get"for static hosting browsability — the transition semantics (safe/unsafe/idempotent) are carried by the ALPS class name, not the HTTP method. - ALPS
titleattribute maps to HTMLtitleattribute on links and buttons - ALPS
docvalue is NOT rendered in HTML — it's for developers, not end users - Placeholder content: Use realistic sample data (not "Lorem ipsum")
Example: Book Detail Page
Given this ALPS taxonomy:
<descriptor id="Book" title="Book">
<descriptor href="#id"/>
<descriptor href="#title"/>
<descriptor href="#author"/>
<descriptor href="#isbn"/>
<descriptor href="#price"/>
<descriptor href="#doAddToCart"/>
<descriptor href="#goToCatalog"/>
</descriptor>
Generate (partial example — only showing the Book state; other states like ShoppingCart and their descriptors like goToCart, category, quantity are defined elsewhere in the full profile):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Book - ALPS Book Store</title>
<link rel="profile" href="../profile/alps.xml">
<link rel="stylesheet" href="../css/level2.css">
</head>
<body>
<header>
<div>
<a href="index.html">ALPS Book Store</a>
<nav>
<a href="catalog.html" class="goToCatalog" title="Go to Catalog">Catalog</a>
<a href="shoppingcart.html" class="goToCart" title="Go to Cart">Cart</a>
</nav>
</div>
</header>
<main>
<article class="Book">
<span class="id" hidden>BK-001</span>
<h1 class="title">The Art of Programming</h1>
<p class="author">Jane Smith</p>
<dl>
<div><dt>ISBN</dt><dd class="isbn">978-4-1234-5678-9</dd></div>
<div><dt>Category</dt><dd class="category">Programming</dd></div>
</dl>
<p class="price">¥2,480</p>
<form method="get" action="shoppingcart.html" class="doAddToCart">
<input type="hidden" name="id" value="BK-001" class="id">
<label for="quantity">Qty</label>
<input type="number" id="quantity" name="quantity" min="1" value="1" class="quantity">
<button type="submit" title="Add to Cart">Add to Cart</button>
</form>
</article>
</main>
<footer>
<div>Mock generated from ALPS profile: ALPS Book Store</div>
</footer>
</body>
</html>
Key points:
class="Book",class="title",class="doAddToCart"— all ALPS descriptor IDs<form>fordoAddToCart(unsafe transition) with nested descriptors as form fields<a>forgoToCatalog(safe transition)- Realistic sample data, not placeholder text
CSS Fidelity Levels
level1.c
Установить alps2mock в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл alps2mock?
Generate multi-fidelity HTML mock from ALPS profile. Creates semantic HTML pages, three CSS fidelity levels, mock API responses, and i18n labels — all from a single ALPS profile.
Как установить скилл alps2mock?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл alps2mock запускает скрипты?
Нет, скилл состоит только из инструкций (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