ask-laravel-mechanic

<critical_constraints> ❌ NO migrate:fresh on prod/staging → destroys DB ❌ NO db:seed on prod → overwrites data ❌ NO Model::truncate() on prod without backup ❌ NO migrate:reset on prod ✅ MUST run php artisan env before dangerous commands ✅ MUST use migrate --pretend when unsure ✅ MUST restart queue after code deployment </critical_constraints>

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "ask-laravel-mechanic" with this command: npx skills add navanithans/agent-skill-kit/navanithans-agent-skill-kit-ask-laravel-mechanic

<critical_constraints> ❌ NO migrate:fresh on prod/staging → destroys DB ❌ NO db:seed on prod → overwrites data ❌ NO Model::truncate() on prod without backup ❌ NO migrate:reset on prod ✅ MUST run php artisan env before dangerous commands ✅ MUST use migrate --pretend when unsure ✅ MUST restart queue after code deployment </critical_constraints>

<safety_commands> ✅ Allowed: migrate (forward only) ✅ Safe test: migrate --pretend (shows SQL without running) ✅ Cache clear: optimize:clear

✅ Queue restart: queue:restart (after deploy!) </safety_commands>

<soft_delete_restore>

User::withTrashed()->find($id)->restore();

</soft_delete_restore>

N+1 Prevention

// In AppServiceProvider::boot() Model::preventLazyLoading(!app()->isProduction());

Common Errors

  • "member function on null" → Mongo relation with SQL syntax, check with()

  • "MongoDB... not found" → wrong namespace, check composer.json

<log_analysis>

Single channel

tail -n 50 storage/logs/laravel.log

Daily channel

tail -n 50 storage/logs/laravel-$(date +%Y-%m-%d).log

Search with context

grep -C 5 "User ID 505" storage/logs/laravel.log

Keywords: local.ERROR, QueryException, ModelNotFound, MassAssignmentException </log_analysis>

<queue_forensics>

  • Status: queue:monitor default

  • Failed: queue:failed

  • Retry one: queue:retry <UUID>

  • Flush all: queue:flush (careful!) </queue_forensics>

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

ask-python-refactor

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

ask-effective-llm-coder

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

ask-explaining-code

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

ask-code-reviewer

No summary provided by upstream source.

Repository SourceNeeds Review