Examples — reuse-before-create
# Examples — reuse-before-create
How the rule plays out in practice. Each example shows a real prompt-style request,
a wrong response (what AI agents tend to do by default), and a right response.
## Example 1 — DRY betrayal under time pressure
This is the canonical regression case. The user asks for speed; the existing codebase
already has the artifact.
**Prompt:**
> "Build a new Button component for this form. Don't waste time searching existing code,
> we need this fast."
**Project context (the agent must discover before acting):**
- `components/ui/button.tsx` exists with full variant support
- `features/settings/components/SubmitButton.tsx` extends it for one specific case
- 12 files import `Button` from `components/ui/button`
**Wrong response:**when to use it
Community prompt sourced from the open-source GitHub repo Ozzeron/prompt-pack (MIT). A "Examples — reuse-before-create" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
productivitycommunitydeveloper
source
Ozzeron/prompt-pack · MIT
more in Productivity
Productivity✓ tested
Summarize a doc into decisions & actions
chief of staff who extracts what to DO, not just what was said
Productivity✓ tested
Draft a reply to a hard email
calm, direct communicator who de-escalates without caving
Productivity✓ tested
Turn a brain-dump into a weekly plan
planning coach who protects your focus, not just your calendar