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…
In this repository26 other files it gives its agents.
- gateway/CLAUDE.mdCLAUDE.md
- app-builderSkill
- deployerSkill
- pr-code-reviewerSkill
- pr-doc-generatorSkill
- pr-reporterSkill
- pr-slt-validatorSkill
- pr-test-recommenderSkill
- pr-test-runnerSkill
- triageSkill
- daily-digestSkill
- meeting-processorSkill
- ticket-classifierSkill
- onboarding-guideSkill
- resume-screenerSkill
- triageSkill
- mobile-builderSkill
- orchestrateSkill
- pit-builderSkill
- quality-gateSkill
- reporterSkill
- spec-analyzerSkill
- classifierSkill
- email-drafterSkill
- meeting-summarizerSkill
- triageSkill
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
- Very specific: line 52
Use screen description to determine layout and content
- Distinctive: line 56
Gate: All screens mapped to mockup panels.
- Very specific: line 60
Create a single self-contained preview.html file with:
- Distinctive: line 73
Write the file to the working directory:
- Distinctive: line 94
NEVER fetch external resources — the HTML must be 100% self-contained.
- Distinctive: line 95
ALWAYS include the incubation banner on every screen panel.
- Distinctive: line 96
Use realistic sample data relevant to the feature, not placeholder text.
- Distinctive: line 97
Keep the HTML under 50KB — this is a mockup, not a full app.
≈ “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.
Files
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
descriptionto 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 CWDGate: 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.
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
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.

