infer-conventions

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

Updated Aug 25, 2026
One-click install
npx skills add https://github.com/mr-creative-hmh/creative-tasks --skill infer-conventions-mr-creative-hmh
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: infer-conventions
Source: https://github.com/mr-creative-hmh/creative-tasks/tree/main/.agents/skills/infer-conventions
Command: npx skills add https://github.com/mr-creative-hmh/creative-tasks --skill infer-conventions-mr-creative-hmh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Laravel projects accumulate implicit coding conventions that new agents and teammates cannot discover without reading the entire codebase, leading to inconsistent patterns and conflicting styles. This Skill systematically analyzes how an application is actually written and records those conventions as durable, path-scoped rules in .ai/rules. ## Core Features & Use Cases - Systematic Convention Sweep: Evaluates roughly 49 Laravel convention dimensions across validation, controllers, Eloquent models, 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 like "no repository layer". - Conflict Detection: Reports mixed patterns with counts and evidence instead of arbitrarily picking a winner, deferring to the user when the codebase is genuinely split. - Rule Recording: Writes approved conventions via the Boost record-rule MCP tool, scoped to precise globs like app/Models/** or tests/**. - Use Case: When onboarding an AI agent to an existing Laravel app, run this Skill to document that the project uses inline validation, legacy accessors, and Action classes invoked via handle(), so all future generated code matches the house style. ## Quick Start Analyze this Laravel project's coding 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 an existing Laravel project?▼

Run a systematic sweep of the codebase across validation, models, architecture, testing, and frontend dimensions, then record each confirmed pattern as a path-scoped rule. This Skill automates that process using a 49-dimension checklist and the Boost record-rule tool.

How to resolve mixed patterns like Form Requests vs inline validation in Laravel?▼

The Skill reports conflicts with counts and example files rather than picking a winner. It records a rule only if you identify a stable path or context boundary explaining both styles; otherwise it defers until the code is reconciled.

Does this work with Laravel Pint and Rector configurations?▼

Yes, it inspects Pint and Rector configs first and skips any convention an active tool already owns, such as casts() migrations or attribute rewrites. It only records choices no tool can decide, like legacy accessors or architectural patterns.

What happens if the record-rule MCP tool is unavailable?▼

Detection is read-only, so the analysis steps still run normally. Recording falls back to a manual path where the full rule text is reported so you can enable BOOST_RULES_ENABLED or add rules by hand.

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

Avoid it for one-off code reviews, formatting that a linter already handles, or very fresh apps with too little code. Tiny applications yield mostly no-signal verdicts, and the Skill honestly reports that there is not enough code to infer conventions.