infer-conventions

Analyze a Laravel codebase and record its coding conventions as path-scoped rules.

Updated Aug 24, 2026
One-click install
npx skills add https://github.com/Mantis-Technology/mantis-laravel --skill infer-conventions-mantis-technology
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: infer-conventions
Source: https://github.com/Mantis-Technology/mantis-laravel/tree/main/.agents/skills/infer-conventions
Command: npx skills add https://github.com/Mantis-Technology/mantis-laravel --skill infer-conventions-mantis-technology

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Teams and AI agents working on a Laravel application often guess at the project's conventions, producing inconsistent code across validation, models, architecture, testing, and frontend layers. This Skill systematically detects 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 patterns. ## Core Features & Use Cases - Systematic convention sweep: Evaluates roughly 49 Laravel convention dimensions across validation, controllers, authorization, Eloquent, architecture, frontend, database, testing, and 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 default filtering: Distinguishes genuine conventions from framework defaults, tooling-owned formats (Pint, Rector), and unresolved mixed patterns, reporting conflicts instead of guessing. - Path-scoped rule recording: Writes approved conventions via the Boost record-rule MCP tool with precise globs so rules surface only where relevant. - Use Case: After inheriting a mature Laravel app, run the sweep to discover it uses legacy magic-method accessors, Action classes invoked via handle, and inline validation, then record those as rules so future agent-generated code matches the existing style. ## Quick Start Analyze this Laravel application's conventions and record the confirmed patterns 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 convention dimensions like validation style, controller shape, Eloquent patterns, and testing approach. This Skill greps for each fork, reads representative files, and records patterns that have at least three consistent examples and no meaningful rival.

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 are short imperative statements attached to specific globs like app/Models/** so agents discover them only when working in relevant paths.

Does this work with modular or domain-driven Laravel layouts?▼

Yes. The open-ended pass maps non-default app directories such as Domain, Modules, Actions, and Services, and adapts rule globs to the observed paths. The layout itself is captured as a high-value architectural convention.

What happens when a Laravel codebase has conflicting patterns?▼

Conflicts are reported with counts and example files, never 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.

When should I not use convention inference?▼

Skip it for one-off code reviews, formatting already handled by Pint or Rector, and brand-new apps with too little code to show patterns. Framework defaults like anonymous migrations and ShouldQueue jobs are also excluded since agents write them unprompted.