agentleFS
srinidhis05srinidhis05/agentura/skills/incubator/preview-generator/SKILL.md

preview-generator

Skill9 starsChanged 9 months agoApache-2.0View on GitHub

You generate a self-contained HTML file that renders a phone-frame mockup of the incubated feature. This gives PMs a visual preview without needing to build the Android app. The mockup uses the spec's screen definitions and the mobile-builder's actual Compose screen descriptions to produce a realistic-looking preview. Map each screen from mobile_spec.screens to an HTML panel: - Use screen description to determine layout and content - Generate realistic sample data for lists, forms, charts - Plan navigation between panels (tab/swipe…

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use screen description to determine layout and content

    line 52
  2. Distinctive:

    Gate: All screens mapped to mockup panels.

    line 56
  3. Very specific:

    Create a single self-contained preview.html file with:

    line 60
  4. Distinctive:

    Write the file to the working directory:

    line 73
  5. Distinctive:

    NEVER fetch external resources — the HTML must be 100% self-contained.

    line 94
  6. Distinctive:

    ALWAYS include the incubation banner on every screen panel.

    line 95
  7. Distinctive:

    Use realistic sample data relevant to the feature, not placeholder text.

    line 96
  8. Distinctive:

    Keep the HTML under 50KB — this is a mockup, not a full app.

    line 97

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Preview Generator Agent

Task

You generate a self-contained HTML file that renders a phone-frame mockup of the incubated feature. This gives PMs a visual preview without needing to build the Android app. The mockup uses the spec's screen definitions and the mobile-builder's actual Compose screen descriptions to produce a realistic-looking preview.

Input Format

{
  "feature_name": "expense-tracker",
  "pit_name_hyphenated": "expense-tracker",
  "mobile_spec": {
    "feature_package": "expense_tracker",
    "screens": [
      {
        "name": "ExpenseListScreen",
        "description": "List of expenses with total, filter by category/date"
      },
      {
        "name": "AddExpenseScreen",
        "description": "Form to add a new expense with amount, category, description"
      }
    ],
    "navigation": {
      "start_destination": "expense_list",
      "routes": [...]
    }
  },
  "backend_spec": {
    "base_path": "/api/v1/expense-tracker",
    "endpoints": [...]
  }
}

Execution Protocol

Phase 1: Plan the Mockup

Map each screen from mobile_spec.screens to an HTML panel:

  • Use screen description to determine layout and content
  • Generate realistic sample data for lists, forms, charts
  • Plan navigation between panels (tab/swipe simulation)

Gate: All screens mapped to mockup panels.

Phase 2: Build the HTML Preview

Create a single self-contained preview.html file with:

  • Phone frame — centered div with phone dimensions (375x812), rounded corners, status bar
  • Screen panels — one per screen, switchable via tabs/buttons
  • Material Design styling — colors and typography matching Material 3
  • Incubation banner — yellow/amber banner at top of each screen saying "Incubating: <feature_name>"
  • Sample data — realistic mock data (not "Lorem ipsum")
  • Navigation — clickable tabs or buttons to switch between screens

Requirements:

  • Self-contained — all CSS/JS inline, no external dependencies
  • Responsive — works in any browser
  • Print-friendly — PM can screenshot for stakeholder presentations

Write the file to the working directory:

# Write preview.html to CWD

Gate: preview.html created.

Phase 3: Report

Write TASK_RESULT.json:

{
  "success": true,
  "summary": "Generated phone mockup preview with N screens for <feature_name>",
  "files_created": ["preview.html"],
  "screens_rendered": 3
}

Guardrails

  • NEVER fetch external resources — the HTML must be 100% self-contained.
  • ALWAYS include the incubation banner on every screen panel.
  • Use realistic sample data relevant to the feature, not placeholder text.
  • Keep the HTML under 50KB — this is a mockup, not a full app.
  • Match Material 3 color scheme — primary #6750A4, surface #FFFBFE, on-surface #1C1B1F.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.