crear-extension

Automates FacturaScripts extension creation for models, controllers, XML views, tables and Twig templates via CLI tool, generating PHP and XML code from user input.

7|2|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/FacturaScripts/fs-claude-plugin --skill crear-extension
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: crear-extension
Source: https://github.com/FacturaScripts/fs-claude-plugin/tree/main/fs-dev/skills/crear-extension
Command: npx skills add https://github.com/FacturaScripts/fs-claude-plugin --skill crear-extension

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill simplifies the process of creating extensions for FacturaScripts, allowing users to add functionality to core or plugin classes without modifying the source code.

Core Features & Use Cases

  • Model Extensions: Enhance model functionality with hooks for save, delete, and validation processes.
  • Controller Extensions: Add new views or modify existing ones to customize the user interface.
  • XMLView Extensions: Modify XML views to alter the layout of FacturaScripts tables and forms.
  • Table Extensions: Add new columns to existing tables without altering the original structure.
  • Twig View Extensions: Insert custom HTML content into existing templates using hooks.
  • Use Case: If you need to add a new column to the 'Productos' table or create a custom view for a specific model, this Skill will guide you through the process.

Quick Start

To create a new model extension for the 'Productos' model, run the following command: fsmaker extension model --class=Productos.

Frequently Asked Questions about crear-extension

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

FAQPage Schema
How do I create a FacturaScripts extension without modifying the core source code?

To create a FacturaScripts extension without modifying the core source code, use the `fsmaker extension` CLI command. This generates the necessary PHP and XML code to safely override or hook into core models, controllers, and views.

How do I add a custom column to an existing FacturaScripts model table?

To add a custom column to an existing FacturaScripts model table, generate a table extension using the CLI tool. This allows you to append new columns to database tables without altering the original structural schema.

Can I insert custom HTML into FacturaScripts Twig templates using an extension?

Yes, you can insert custom HTML content into FacturaScripts Twig templates by creating a Twig view extension. This utilizes template hooks to inject your custom HTML markup directly into existing views.

What is the best way to hook into the save or delete process of a FacturaScripts model?

The best way to hook into the save, delete, or validation process of a FacturaScripts model is by creating a model extension. This allows you to execute custom logic before or after these core events.

How do I modify the layout of FacturaScripts forms and tables through XML views?

To modify the layout of FacturaScripts forms and tables, create an XMLView extension. This alters the XML view definitions to customize how data fields and columns are displayed in the user interface.

Do I need to manually write PHP code to add a new view to a FacturaScripts controller?

No, you do not need to manually write PHP code to add a new view to a FacturaScripts controller. The CLI tool generates the foundational controller extension code automatically based on your input parameters.