infer-conventions

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

Updated Aug 14, 2026
One-click install
npx skills add https://github.com/bill80362/laravel-thread-admin --skill infer-conventions-bill80362
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: infer-conventions
Source: https://github.com/bill80362/laravel-thread-admin/tree/main/.junie/skills/infer-conventions
Command: npx skills add https://github.com/bill80362/laravel-thread-admin --skill infer-conventions-bill80362

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Laravel projects accumulate implicit conventions that new agents and teammates cannot discover without reading the whole codebase, leading to inconsistent code that fights the existing style. This Skill systematically analyzes how an application is actually written and records the findings as durable, path-scoped rules in .ai/rules. ## Core Features & Use Cases - Systematic Convention Sweep: Evaluates roughly 49 Laravel convention dimensions across validation, controllers, models, architecture, frontend, database, testing, and more, 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 & Tooling Awareness: Distinguishes real conventions from framework defaults, Pint/Rector-owned formatting, and genuinely mixed styles, reporting conflicts instead of picking winners. - Use Case: When onboarding an AI agent to an existing Laravel app, run the sweep to detect that the project uses inline validation, legacy accessors, and Action classes invoked via handle(), then record each as a rule scoped to the right path glob via the Boost record-rule MCP tool. ## Quick Start Ask the agent to analyze this Laravel project's conventions and record them as shared 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 convention dimensions like validation style, controller shape, model accessors, and testing framework, using grep hints and representative file reads. Each dimension gets a verdict of pattern, conflict, default, or no-signal based on at least three consistent examples.

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, such as app/Models/** or tests/**, using the Boost record-rule MCP tool. Rules state only the convention itself, without detection evidence, counts, or example file lists.

What Laravel conventions should be recorded versus skipped?

Record deliberate choices an agent would not reach by default, such as legacy accessors, inline validation, or Action classes. Skip framework defaults, Pint-owned formatting, and forms an enabled Rector rule rewrites, since tools already enforce those.

What happens when a Laravel codebase has conflicting patterns?

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

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

Yes, detection is read-only and all analysis steps still run. When record-rule is unavailable, the full rule text is reported so the user can enable BOOST_RULES_ENABLED or add the rules to .ai/rules manually.