infer-conventions

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

1|Updated Aug 29, 2026
One-click install
npx skills add https://github.com/IzzatFirdaus/task-enterprise-api --skill infer-conventions-izzatfirdaus
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: infer-conventions
Source: https://github.com/IzzatFirdaus/task-enterprise-api/tree/main/.github/skills/infer-conventions
Command: npx skills add https://github.com/IzzatFirdaus/task-enterprise-api --skill infer-conventions-izzatfirdaus

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Teams and AI agents working on a Laravel codebase often guess at house style, producing inconsistent validation, architecture, and testing patterns. This Skill systematically analyzes how the application is actually written and records the findings as durable, path-scoped rules in .ai/rules so every agent and teammate follows the same conventions. ## Core Features & Use Cases - Systematic convention sweep: Evaluates roughly 49 Laravel convention dimensions across validation, controllers, authorization, Eloquent, architecture, frontend, database, testing, and API responses using a structured checklist. - Architecture discovery: Maps non-default app/ directories (Actions, Services, DTOs, Queries, domain modules) and records structural patterns and deliberate absences, such as "no repository layer". - Conflict and evidence handling: Requires at least three consistent examples per convention, reports mixed patterns as conflicts instead of picking a winner, and skips framework defaults and tool-owned formatting. - Use Case: After adopting Laravel Boost, run the sweep on an existing app to detect that it uses inline validation, legacy accessors, and constructor-injected services, then record those as rules so future agent-generated code matches the codebase. ## Quick Start Ask the agent to analyze this Laravel project'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 detect coding conventions in a Laravel project?▼

Run a structured sweep across roughly 49 convention dimensions covering validation, controllers, Eloquent models, architecture, frontend, database, and testing. Each dimension gets a verdict of pattern, conflict, default, or no-signal based on at least three consistent code examples.

How do I document Laravel project conventions for AI agents?▼

Record each confirmed convention as a path-scoped rule in .ai/rules using the Boost record-rule MCP tool. Rules state the convention in one or two imperative lines and are attached to specific globs like app/Models/** or tests/** so agents discover them in context.

What happens when a Laravel codebase has conflicting patterns?▼

Mixed patterns are reported as conflicts with counts and example files rather than recorded as rules. A convention is only recorded if the user identifies a stable path or context boundary that explains both styles; otherwise it is deferred until the code is reconciled.

Does convention detection work with Pint and Rector configured?▼

Yes. The sweep inspects Pint and Rector configuration first and skips any convention an active tool already enforces, such as casts() methods or anonymous migrations. Only patterns a tool would fight against, like legacy magic accessors, are recorded.

When should I not use automated convention inference?▼

Skip it for one-off code reviews, formatting that a linter already handles, or very small applications with too little code to establish patterns. Fresh apps mostly yield no-signal verdicts, and the honest result is to record nothing.