Temporary UI mock fixtures
DesignTemporary UI mock fixtures is an Agent Skill for design published in the IgorWarzocha/howcode repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
How to add short-lived static fixtures for hard-to-reproduce UI states while tuning layout
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/IgorWarzocha/howcode/blob/HEAD/.pi/workflows/temporary-ui-mock-fixtures/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/temporary-ui-mock-fixtures, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Temporary UI mock fixtures
Use this when a UI state is hard to trigger repeatedly, such as queued prompts, ask-questions overlays, running extension status, or rare error strips.
Rules
- Keep fixtures dev-only: gate with
import.meta.env.DEVand an explicit URL flag such as?mockQueuedPrompts=1. - Keep fixture data inside the component being tuned or a nearby
*.mock.tsfile. - Never let mock data override real data. Prefer
real.length > 0 ? real : mock. - Use realistic strings that stress wrapping, truncation, and narrow composer widths.
- Do not commit fixture code unless the user explicitly asks for a reusable dev fixture. Usually remove it before commit.
- Commit the actual UI fix separately from any temporary fixture if the fixture is kept.
Pattern
function getDevFixtures() {
if (!import.meta.env.DEV) return []
const params = new URLSearchParams(window.location.search)
if (params.get('mockThing') !== '1') return []
return [{ id: 'mock-1', text: 'Long realistic content...' }]
}
const visibleItems = realItems.length > 0 ? realItems : getDevFixtures()
Then open:
http://127.0.0.1:5173/?mockThing=1
Cleanup checklist
Before committing production UI work:
- Remove the mock helper and URL flag path.
- Keep only the layout/style changes proven by the mock.
- Run
bun run ai:check. - Mention in the final note which mock flag was used and removed.