Skip to content

Vibe coding experiments by HalalLens. AI-assisted development explorations.

Notifications You must be signed in to change notification settings

halallens-no/vibe-coding-public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Vibe Coding Public

After months of experimenting with Claude Code and "vibe coding" a production project, here's the practical template that actually prevents Claude from nuking your app. This repo shows how to use a CLAUDE.md and modular agent prompts to reduce the risk of AI-induced disasters.


๐Ÿงจ Why This Project Exists

Claude has zero memory between sessions and no innate sense of danger. Left unchecked, it'll cheerfully:

  • Run rsync --delete and wipe 11,000+ irrecoverable images (ask me how I know ๐Ÿ™ƒ)
  • Open issues in the wrong GitHub repo
  • Deploy broken code directly to production

The lesson: Treat onboarding your project assistant like onboarding a developer with amnesia who will forget everything tomorrow. This README is your map for how to do exactly that.


๐Ÿ›ก๏ธ Anatomy of a Hassle-Proof Claude Setup

The repo and its CLAUDE.md include:

1. ๐Ÿšจ Danger Zones

List EVERY forbidden command, directory, and production URL. Spell out what is truly destructive.
Example: Never run tests on production. Never use rsync --delete outside a wrapper script. Never deploy to prod unless explicitly asked!

2. ๐ŸŒŽ Environment Map

Define your staging and production URLs, ports, and which files belong where. Claude cannot infer your infrastructure!
Example: Staging = staging.yourapp.com, Prod = app.yourapp.com, Database = PostgreSQL @ localhost:5432.

3. ๐Ÿ› ๏ธ Command Reference

Copy-paste-ready commands to:

  • Start backend/frontend
  • Run and debug tests (ALWAYS against staging by default)
  • Safely deploy and rollback
  • Backup/restore the database

4. โš ๏ธ Gotchas

Note every quirk or trap youโ€™ve hit:

  • โ€œServer only has python3โ€
  • โ€œALWAYS activate the virtualenv or dependencies will breakโ€
  • โ€œNode scripts need a login shell for nvm to kick inโ€

5. ๐Ÿ“ Incident Log

Every time something blows up, document what happened and how to prevent it next time.
Example: 2024-01-15 โ€“ Used rsync --delete, wiped server; PREVENTION: always use wrapper script with exclusions.

6. ๐Ÿค– Custom Slash Commands (Expert Modes)

Modular agent prompt files in .claude/commands/ like:

  • /dev โ€“ Backend/API/DB expert
  • /web โ€“ Frontend (React/Tailwind) expert
  • /test โ€“ QA who only runs tests on staging
  • /sync โ€“ Deployment agent (never touches prod without explicit approval)
  • /manager โ€“ Orchestrator: plans and delegates, never writes code

๐Ÿ Quick Start

# Start backend
cd apps/api && source venv/bin/activate && python run.py

# Start frontend
cd apps/web && npm install && npm run dev

# Run E2E tests (against staging!)
cd apps/web && npx playwright test

# Database shell
psql -U postgres -d yourdb

# Deploy safely (ask for explicit prod approval first!)
./tools/scripts/sync-to-server.sh --dry-run
./tools/scripts/deploy.sh

๐Ÿ•น๏ธ How This All Works

Claude reads CLAUDE.md plus your slash-command markdowns in .claude/commands/ at session start, "remembers" the rules, and only acts within your explicit constraints.

  • You type /dev fix the login endpoint
  • Claude loads .claude/commands/dev.md, acts as a backend expert, and follows only the allowed patterns
  • It refuses to deploy to production, run forbidden commands, or do anything involving "danger zones" without your confirmation

Gotchas, lessons, and incident logs act as AI guardrails.


๐Ÿงฉ How to Customize for Your Team

  1. Fill out CLAUDE.md: Document everything you wish a new dev (or AI) would know
  2. Write prompt markdowns in .claude/commands/ for each expert role needed
  3. Update when things go wrong: Add them to the incident log
  4. Be explicit: The dumber and more explicit, the safer

๐Ÿ“š References

  • See CLAUDE.md for the full live template (ready to drop into your own repo)
  • Example expert-agent prompts in .claude/commands/
  • Detailed docs in docs/ (if you want to go deeper)

๐Ÿ›‘ tl;dr

  1. AI is not magicโ€”define your danger zones or it WILL break things.
  2. All context and rules must be in plain text in your repo, every session.
  3. Use custom slash commands in .claude/commands/ to set AI โ€œexpert mode.โ€
  4. Treat CLAUDE.md like onboarding a forgetful junior programmer.
  5. Add to the incident log every time anything goes sideways.
  6. Never EVER trust a default deployment/test command to "just work."

Questions? Want to share your own best practices or horror stories? [Link to template in comments/repo].

About

Vibe coding experiments by HalalLens. AI-assisted development explorations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published