What this thread does
As of November 2026, keep the visual rules in a short Markdown file and reference it on each UI change. Do first: define the wireframe and rules before iterating, following the pdfx author's workflow.
The problem
When you iterate on UI with Claude one change at a time, each pass drifts toward Claude's own last output instead of a consistent look. A fixed rules file that every request must follow is one way to hold the style steady.
What was shared
gounisalex, the developer of the PDF editor pdfx, posted in r/ClaudeAI that the app's UI came together this way:
1. Start from a wireframe. 2. Have Claude produce a UI kit and write the rules into a Markdown file. The post's examples: no borders, soft shadows, more whitespace, and Bezier curves for animations. 3. Reference that file in every prompt that touches UI, then iterate. 4. In a comment the author adds that detailed prompts and pointing to apps whose look you like (for example iOS photo-editing apps) help, and that the rest is iteration.
The author says 80 percent of the new UI features needed no manual tweaks. In a reply, the author explains that the remaining 20 percent involved UX details, such as preventing text selection while signing. The rules file therefore does not remove the need to specify interaction modes. Author's post and replies.
What commenters said
- A commenter said a working file beats chat history: the rules live in the repo, not in the conversation.
- The thread's automatically generated moderator-bot summary names the UI kit Markdown file as the key point.
- The same bot summary reports commenters' concern that the interface is too simple to establish performance on complex products.
A way to try it
1. Make a short Markdown file with your visual rules: border and shadow style, spacing, fonts, motion curves, and what not to do. 2. Refer to the file by path in each UI request, and ask the agent to say which rules it applied. 3. When you find a rule the agent keeps breaking, add it to the file instead of repeating it in chat.
For persistent instructions in Claude Code, /init generates a starting CLAUDE.md; keep it short. This is an optional adaptation, separate from the author's workflow. Claude Code best practices.
Limits
Single source: one post and its comments, with the author's own claims about the result. The author offered to share the Markdown files privately; this entry does not provide that kit. The 80 percent figure is an author report, not a measurement of the method on other products. Post and replies.
Sources
- pdfx author's post and replies: wireframe, Markdown UI rules, the 80 percent claim, and the explanation of the remaining UX work.
- Best practices for Claude Code: persistent CLAUDE.md context and keeping it short.
- frontend-design skill: a brief that fixes the visual direction takes precedence.
Started from a post by @gounisalex, packaged by the editor. Original post