laravel-brainstorming
Use when creating or developing Laravel features, before writing code or implementation plans - refines rough ideas into fully-formed Laravel designs through collaborative questioning, alternative exploration, and incremental validation.
What this skill does
# Brainstorming Laravel Ideas Into Designs
## Overview
Help turn Laravel feature ideas into fully formed designs and specs through natural collaborative dialogue, focusing on Laravel best practices and ecosystem patterns.
Start by understanding the current Laravel project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design in small sections (200-300 words), checking after each section whether it looks right so far.
## The Process
**Understanding the idea:**
- Check out the current Laravel project state first (routes, models, migrations, recent commits)
- Ask questions one at a time to refine the idea
- Prefer multiple choice questions when possible, but open-ended is fine too
- Only one question per message - if a topic needs more exploration, break it into multiple questions
- Focus on understanding: purpose, Laravel patterns, constraints, success criteria
**Example Questions:**
- "Should this be a queue job or run synchronously?"
- "Which authentication approach: Sanctum, Passport, or custom?"
- "Will this need real-time updates via broadcasting?"
- "Should we use Eloquent events or explicit service calls?"
**Exploring approaches:**
- Propose 2-3 different Laravel approaches with trade-offs
- Present options conversationally with your recommendation and reasoning
- Lead with your recommended option and explain why
**Example:**
```
For the notification system, I see three approaches:
1. Laravel Notifications with database channel (recommended)
- Built-in, follows Laravel conventions
- Easy to add email/Slack later
- Simple to mark as read
Trade-off: Less flexible for complex notification logic
2. Custom Event/Listener system
- Maximum flexibility
- Can add complex rules
Trade-off: More code to maintain
3. Third-party package (like Laravel Echo)
- Real-time out of the box
Trade-off: External dependency, overkill if not needed
I'd recommend #1 for most cases - start simple, Laravel's notification system is excellent and you can always extend it later if needed.
Which approach feels right for your use case?
```
**Presenting the design:**
- Once you believe you understand what you're building, present the design
- Break it into sections of 200-300 words
- Ask after each section whether it looks right so far
- Cover: database schema, models & relationships, routes & controllers, services/actions, queues/events, API resources, validation, testing
- Be ready to go back and clarify if something doesn't make sense
## Laravel-Specific Design Sections
### 1. Database Schema
```
First, let's look at the database design:
We'll need three tables:
1. `posts` - title, slug, content, status, published_at
2. `tags` - name, slug
3. `post_tag` - pivot table for many-to-many
The posts table will have a foreign key to users, indexed on status and published_at for common queries. We'll use an enum for status (draft, published, archived) to keep it clean.
Does this schema structure make sense for what we're building?
```
### 2. Models & Relationships
```
For the models, we'll have:
Post model with:
- belongsTo relationship to User
- belongsToMany relationship to Tag
- Scopes: published(), draft(), recent()
- Casts: published_at as datetime, metadata as array
- Factory for testing
Tag model with:
- belongsToMany relationship to Post
- Slug auto-generation on save
Should we add soft deletes to posts, or will hard deletes work?
```
### 3. API Design
```
For the API endpoints, following RESTful conventions:
GET /api/posts - List posts (paginated)
POST /api/posts - Create post
GET /api/posts/{post} - Show post
PUT /api/posts/{post} - Update post
DELETE /api/posts/{post} - Delete post
Authentication via Sanctum, rate limited to 60 requests/minute.
API resources will transform the output, hiding sensitive data.
Does this API structure cover your needs?
```
### 4. Business Logic
```
The posting workflow:
When a post is published:
1. PostService validates the post is ready (has title, content)
2. Sets published_at timestamp
3. Dispatches NotifySubscribers job to queue
4. Fires PostPublished event for other listeners
5. Clears related caches
We'll use a service class to keep controllers thin, and queues for email notifications so publishing is fast.
Is this flow what you had in mind?
```
## After the Design
**Documentation:**
- Write the validated design to `docs/designs/YYYY-MM-DD-<feature>-design.md`
- Include: feature overview, database schema, API endpoints, business logic flow
- Commit the design document to git
**Implementation (if continuing):**
- Ask: "Ready to set up for implementation?"
- Create implementation checklist
- Consider using test-driven development approach
## Key Principles
- **One question at a time** - Don't overwhelm with multiple questions
- **Multiple choice preferred** - Easier to answer than open-ended when possible
- **YAGNI ruthlessly** - Remove unnecessary features, keep it simple
- **Laravel conventions first** - Use built-in Laravel features before custom solutions
- **Explore alternatives** - Always propose 2-3 approaches before settling
- **Incremental validation** - Present design in sections, validate each
- **Be flexible** - Go back and clarify when something doesn't make sense
## Laravel-Specific Considerations
When brainstorming Laravel features, consider:
**Architecture:**
- Will this be a monolith or need microservices?
- What design patterns fit best (repository, service layer, actions)?
- How will this scale?
**Database:**
- What relationships are needed?
- What indexes for performance?
- Should we use polymorphic relationships?
**Performance:**
- Should this use queues?
- What caching strategy?
- Eager loading requirements?
**Testing:**
- What factories are needed?
- Feature tests vs unit tests?
- How to test jobs/events?
**Security:**
- Authorization via policies or gates?
- What validation rules?
- Rate limiting needs?
## Example Brainstorming Session
```
Claude: I see you want to add a comment system. Let me understand the requirements.
First question: Should comments be nested (replies to replies) or just one level deep (replies to posts only)?
User: Just one level - comments on posts.
Claude: Got it. And for moderation, which approach:
A) All comments published immediately
B) Comments from new users require approval
C) All comments require approval
User: B - new users need approval.
Claude: Perfect. For notifications when someone comments:
A) Real-time via Laravel Echo and WebSockets
B) Email only
C) In-app notifications (database)
User: In-app notifications.
Claude: Excellent. Let me present the design...
[Design sections follow]
```
## Common Laravel Brainstorming Topics
- Authentication flow (SPA vs traditional)
- API design (REST vs GraphQL)
- Real-time features (Pusher vs Socket.io vs Reverb)
- File upload strategy (local vs S3)
- Multi-tenancy approach
- Payment integration (Stripe, Paddle, Cashier)
- Search implementation (Scout, Elasticsearch)
- Admin panel (Nova, Filament, custom)
## Remember
The goal is to arrive at a clear, actionable Laravel design that:
- Follows Laravel conventions
- Uses appropriate Laravel ecosystem packages
- Is testable and maintainable
- Solves the actual problem without over-engineering
- Can be implemented incrementally
Ask questions until you understand, then design in small validatable chunks.
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.