Effective context

From jpcaparas/superpowers-laravel · View interactive version

Effective context is an AI agent skill from the GitHub repository jpcaparas/superpowers-laravel. Provide comprehensive context in prompts—files, errors, Laravel version, dependencies, and monorepo details—for accurate AI responses

How to use this skill

Skill file

Effective Context

Give the AI assistant the right context to generate accurate, relevant code. Missing context leads to generic solutions that don't fit your project.

What to Include

Files and Structure

Current State

Laravel Context

Monorepo Projects

Describing Problems

Errors

BAD: "Getting an error with users"

GOOD: "Getting error when creating user:
  Illuminate\Database\QueryException: SQLSTATE[23000]: 
  Integrity constraint violation: 1062 Duplicate entry
  
  In UserController@store, line 45:
  $user = User::create($request->validated());
  
  Using Laravel 13.x with MySQL 8.0"

Stack Traces

Include the full stack trace, especially:

Reproduction Steps

1. POST to /api/users with email that exists
2. Validation passes (should catch this)
3. Database throws constraint violation

Vague vs Specific

Vague

"Add validation to the user form"

Specific

"Add validation to UserStoreRequest:

Vague

"Need to handle payments"

Specific

"Implement Stripe payment processing:

Quick Checklist

Before sending a prompt, verify:

More context = better results. When in doubt, include it.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.