fix-contracts

Generate missing contracts for Laravel Bespoke packages with correct interfaces.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/bespoke-uk/bespoke-mono --skill fix-contracts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fix-contracts
Source: https://github.com/bespoke-uk/bespoke-mono/tree/main/.claude/skills/fix-contracts
Command: npx skills add https://github.com/bespoke-uk/bespoke-mono --skill fix-contracts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generates missing contracts for a Bespoke package by analyzing code structure and producing standardized interface contracts to ensure compliance with project architecture.

Core Features & Use Cases

  • Scans a Bespoke package to identify models, controllers, requests, resources, actions, imports, exports, and rules.
  • Creates missing contracts under the appropriate Contracts/ namespace with proper interfaces and method signatures.
  • Generates Admin and API specific contracts under Contracts/Admin/ and Contracts/Api/ and provides a comprehensive report.

Quick Start

Analyse the given Bespoke package path to automatically generate all missing contracts.

Frequently Asked Questions about fix-contracts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate missing contracts for a Laravel package automatically?

To generate missing contracts for a Laravel package, this automation scans code structures like models, controllers, and actions, then produces standardized interfaces under the correct namespace.

What are interface contracts and when do I need them for my Bespoke package?

Interface contracts define standardized method signatures for classes. You need them for Bespoke packages to ensure architectural compliance across models, requests, resources, and rules.

Can I auto-generate Admin and API specific contracts under separate namespaces?

Yes, you can auto-generate Admin and API specific contracts. The tool organizes interfaces into Contracts/Admin/ and Contracts/Api/ directories based on the analyzed code structure.

How do I ensure generated contracts include strict types and correct method signatures?

Generated contracts ensure compliance by automatically inserting declare(strict_types=1) and implementing methods with correct signatures according to package namespace conventions.

Does this contract generation tool work with imports, exports, and rules classes?

Yes, the contract generation tool works with imports, exports, and rules. It scans these classes alongside models and controllers to create any missing interface contracts.

What is the best way to analyze a package path and identify missing code contracts?

The best way to identify missing code contracts is automated code analysis, which scans a given package path and generates a comprehensive report of all required interfaces.