Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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

  1. One HTML file per ALPS state (Taxonomy descriptor with nested descriptors)
  2. <link rel="profile" href="../profile/alps.xml"> in every <head>
  3. <link rel="stylesheet" href="../css/level2.css"> as default stylesheet
  4. Semantic HTML elements: <article> for entities, <form> for unsafe/idempotent transitions, <a> for safe transitions, <nav> for navigation groups. Forms use method="get" for static hosting browsability — the transition semantics (safe/unsafe/idempotent) are carried by the ALPS class name, not the HTTP method.
  5. ALPS title attribute maps to HTML title attribute on links and buttons
  6. ALPS doc value is NOT rendered in HTML — it's for developers, not end users
  7. 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> for doAddToCart (unsafe transition) with nested descriptors as form fields
  • <a> for goToCatalog (safe transition)
  • Realistic sample data, not placeholder text

CSS Fidelity Levels

level1.c

Полный SKILL.md на GitHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить alps2mock с