infer-conventions

Detects Laravel codebase conventions and records them as path-scoped rules.

Updated Jul 18, 2026
One-click install
npx skills add https://github.com/daviddatuX25/Serbizyu-2.0 --skill infer-conventions-daviddatux25
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: infer-conventions
Source: https://github.com/daviddatuX25/Serbizyu-2.0/tree/main/.cursor/skills/infer-conventions
Command: npx skills add https://github.com/daviddatuX25/Serbizyu-2.0 --skill infer-conventions-daviddatux25

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 project conventions, producing inconsistent code when the app has already committed to specific patterns (e.g., inline validation vs Form Requests, Action classes vs fat controllers). This Skill systematically analyzes how the application is actually written and records those conventions as durable, path-scoped rules in .ai/rules so every agent and teammate follows the same style. ## Core Features & Use Cases - Systematic convention sweep: Works through a ~49-dimension checklist covering validation, controllers, authorization, Eloquent models, architecture, frontend, database, testing, and API responses, with grep hints per dimension. - Architecture mapping: Maps non-default app/ directories (Actions, Services, DTOs, Queries, domain modules) and records structural patterns and deliberate absences (e.g., no repository layer). - Conflict and evidence handling: Requires at least 3 consistent examples per convention, reports genuinely mixed patterns as conflicts instead of picking a winner, and skips framework defaults and tool-owned formatting (Pint, Rector). - Rule recording: Records approved conventions via the Boost record-rule MCP tool, scoped to precise globs, with a manual fallback when rules are disabled. - Use Case: After inheriting a Laravel app, run the sweep to discover it uses invokable controllers, spatie/laravel-data DTOs, and legacy magic accessors, then record those as rules so future generated code matches the existing style. ## 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 an existing Laravel project?▼

Run a structured sweep across validation, controllers, models, architecture, testing, and database dimensions using targeted greps and representative file reads. A convention qualifies only with at least 3 consistent examples and no meaningful rival pattern.

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

Record each confirmed convention as a short imperative rule scoped to a specific path glob in .ai/rules, using the Boost record-rule MCP tool. Rules state only the convention itself, without detection evidence, counts, or example file lists.

What happens when a Laravel codebase has conflicting patterns?▼

Mixed patterns are reported as conflicts with counts and example files, never recorded as a preferred winner. A rule is recorded only if the user identifies a stable path or context boundary that explains both styles.

Does convention detection work without the record-rule MCP tool?▼

Yes. Detection steps are read-only and run normally; recording falls back to reporting the full rule text so the user can enable BOOST_RULES_ENABLED or add rules to .ai/rules manually.

When should I not use convention inference on a Laravel app?▼

Skip it for one-off code reviews, formatting already handled by Pint or Rector, and very small or fresh apps where most dimensions lack enough code to establish a signal.