infer-conventions

Detect Laravel project conventions and record them as path-scoped rules.

Updated Jul 2, 2026
One-click install
npx skills add https://github.com/stacktracelabs/laravel-ui-starter-kit --skill infer-conventions-stacktracelabs
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: infer-conventions
Source: https://github.com/stacktracelabs/laravel-ui-starter-kit/tree/main/.agents/skills/infer-conventions
Command: npx skills add https://github.com/stacktracelabs/laravel-ui-starter-kit --skill infer-conventions-stacktracelabs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? AI agents and new teammates often write code that clashes with how a Laravel application is actually built, because project conventions live only in the codebase itself. This Skill systematically analyzes the application and records its real conventions as durable, path-scoped rules in .ai/rules. ## Core Features & Use Cases - Systematic Convention Sweep: Evaluates roughly 49 Laravel convention dimensions covering validation, controllers, Eloquent models, architecture, frontend, database, and testing, using a structured checklist with grep hints. - Architecture Discovery: Maps non-default app/ directories (Actions, Services, DTOs, Queries, domain modules) and records structural patterns and deliberate absences like "no repository layer". - Conflict Detection: Reports mixed patterns with counts and example files instead of picking a winner, so rules always describe reality. - Rule Recording: Writes approved conventions via the Boost record-rule MCP tool, scoped to precise globs like app/Models/** or tests/**. - Use Case: After adopting Laravel Boost, run this Skill once to document that your app uses Form Requests, Action classes invoked via handle, and UUID primary keys, so every future agent session matches your house style. ## Quick Start Analyze this Laravel application's conventions and record them as rules in .ai/rules.

Frequently Asked Questions about infer-conventions

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

FAQPage Schema
How do I document coding conventions in a Laravel project?▼

Run this Skill to sweep roughly 49 convention dimensions across validation, models, architecture, testing, and database code. It detects consistent patterns with at least three examples and records them as path-scoped rules in .ai/rules via the Boost record-rule tool.

How to make AI agents follow my Laravel project style?▼

Record your project's real conventions as rules in .ai/rules so agents read them before writing code. The Skill detects choices like Form Requests versus inline validation and Action classes versus fat controllers, then stores each rule scoped to the paths where it applies.

Does convention detection work with modular or DDD Laravel layouts?▼

Yes, the open-ended pass maps non-default app directories such as Domain, Modules, Actions, and Services, and treats the layout itself as a convention. Rule globs are adapted to the observed paths, for example app/Modules/Blog/Models/** instead of app/Models/**.

What happens when my codebase has conflicting patterns?▼

Conflicts are reported with counts and example files rather than resolved automatically. A rule is recorded only if you identify a stable path or context boundary explaining both styles; otherwise the conflict is deferred until the code is reconciled.

When should I not use convention inference?▼

Skip it for one-off code reviews, formatting already handled by Pint or Rector, and fresh apps with too little code to show patterns. The Skill documents existing reality and never proposes improvements or records framework defaults.