claude-import-db-context

Applies database conventions for Laravel projects including driver detection, N+1 prevention, and transactions.

Updated Aug 25, 2017
One-click install
npx skills add https://github.com/loki495/dotfiles --skill claude-import-db-context-loki495
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: claude-import-db-context
Source: https://github.com/loki495/dotfiles/tree/main/ai/codex-skills/claude-import-db-context
Command: npx skills add https://github.com/loki495/dotfiles --skill claude-import-db-context-loki495

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Laravel developers often write inconsistent database code across projects, leading to N+1 query performance issues, incorrect driver-specific behavior, and missing transaction handling. This Skill loads a shared set of database conventions so the AI applies the same rules every time. ## Core Features & Use Cases - Database Convention Loading: Reads the shared db-context conventions from ~/dotfiles/ai/skills/db-context/SKILL.md and applies them to the current session. - Laravel Best Practices: Covers driver detection, N+1 query prevention, and proper transaction usage in Laravel code. - OpenCart Boundary Handling: Explicitly excludes OpenCart projects from these conventions except where the source document contrasts behavior. - Use Case: When asking the AI to write or review Laravel Eloquent queries, activate this Skill so it automatically checks for N+1 risks and wraps multi-write operations in transactions. ## Quick Start Apply the shared database conventions to review my Laravel repository's Eloquent queries for N+1 problems and missing transactions.

Frequently Asked Questions about claude-import-db-context

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I apply consistent database conventions across Laravel projects?▼

Activate this Skill, which reads the shared db-context conventions file and applies its rules to the current session. The conventions cover driver detection, N+1 prevention, and transaction usage in Laravel code.

How to prevent N+1 queries in Laravel Eloquent?▼

The imported conventions include N+1 prevention rules, typically requiring eager loading with the with() method instead of lazy loading relationships in loops. The Skill loads the full guidance from the db-context source file.

Does this Skill work with OpenCart projects?▼

No, the conventions are not applied to OpenCart projects. The only exception is where the source db-context document explicitly contrasts OpenCart behavior with Laravel behavior.

What happens if the db-context source file is missing?▼

The Skill depends on reading ~/dotfiles/ai/skills/db-context/SKILL.md. If that file is absent from the expected path, the conventions cannot be loaded and the Skill has no content to apply.

When should I use transactions in Laravel database code?▼

The imported conventions define transaction usage rules for Laravel, generally requiring transactions around multi-write operations so partial failures roll back cleanly. Refer to the loaded db-context content for the exact rules.