Vom einmaligen ChatGPT-Prompt zur wiederverwendbaren Frontend-Prompt-Bibliothek
Statt fuer jede Anfrage bei ChatGPT von Null zu starten, laesst sich ein interner Prompt-Katalog mit Stack, Konventionen und Definition of Done aufbauen. Das macht die Antworten konsistenter und spart laenderndes Erklaeren des eigenen Setups.

I used to treat ChatGPT like a vending machine. Need a React hook? Drop a coin. Need a PR summary? Drop another. Every ask started from zero — stack, conventions, what “done” meant — and every reply drifted a little from how we actually ship.
The waste wasn’t the tokens. It was re-explaining our frontend rules every single time, then cleaning up the same mistakes.
So I stopped pasting one-offs and started treating prompts like code: named, versioned, and checked into the repo.
A throwaway chat is fine for a throwaway question. Frontend work rarely is throwaway:
You get something that compiles. You don’t get something that matches the last three PRs. The next person (or the next you) pays the tax again.
I keep a small folder — prompts/frontend/ — not a novel. Each file is one job, one outcome shape.
prompts/frontend/ pr-review-ai.md # what the model checks vs leaves for humans new-component.md # scaffold + a11y buckets + token rules design-token-change.md # changelog / RFC checklist before merge test-plan.md # real coverage vs fake green agent-ui-diff.md # component boundaries, no random token edits accessible-react.md # roles / keyboard / contrast report required Enter fullscreen mode Exit fullscreen mode If a prompt isn’t reused at least twice a month, it doesn’t earn a file. Sticky notes in chat stay sticky notes.
Same skeleton so humans and agents know where to look:
# <job name> ## When to use One sentence. If it doesn’t match, don’t force it. ## Context to paste - Framework / router / form lib (or “read from repo”) - Design tokens source of truth - Related golden files (paths) ## Hard rules Bullet list the model must not violate. Prefer native HTML, keep tokens, no drive-by refactors, etc. ## Output format Numbered sections the reply must include. Missing a section = reject the turn. ## Done looks like Concrete acceptance — not “looks good.” Enter fullscreen mode Exit fullscreen mode The “output format” line is the whole game. Models fill schemas. They invent vibes when you don’t give one.
Once the files exist, wire them where work actually happens:
You don’t need a fancy prompt CMS. Markdown in git is enough. Review prompt changes in PRs the same way you’d review eslint config.
Week 1 I had twelve ChatGPT threads titled “modal again.” Week 3 I had six files and deleted half the threads.
Same models. Less re-prompting. The library held the team memory the chat UI kept forgetting.
A prompt library is DX infrastructure. If it reads like a blog draft, move it to the blog.
Tonight, pick the three asks you keep repeating. Write each as one markdown file with When / Rules / Output / Done. Drop them in the repo. Point your editor agent at that folder.
Next time you open a blank ChatGPT box for a frontend task, open the matching file instead. Paste once. Reuse forever. That’s the whole upgrade — from one-off asks to a library your future self (and your agents) can actually find.