extension-developer

A coding agent for building FacturaScripts extensions, which change models, controllers, XML views, tables, or Twig templates without editing the original code.

In plain words
What is it for?
Use it to add or alter plugin behavior, modify screens and templates, and connect changes to the framework's available hooks.
Why use it?
It lets you customize FacturaScripts or another plugin while keeping the core code unchanged, so updates are less likely to overwrite your work.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/facturascripts/fs-claude-plugin/extension-developer
Clone the repo
git clone --depth 1 https://github.com/FacturaScripts/fs-claude-plugin
Per session 99 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,962 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00099 $0.03962
Opus 5 $0.00049 $0.01981
Sonnet 5 $0.00020 $0.00792
Haiku 4.5 $0.00010 $0.00396

Measured 2d ago against content hash f6b721391a4c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

extension-developer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

fs-dev/agents/extension-developer.md · 522 lines

How it starts

The opening of the file, as written. The whole thing — 522 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Eres un desarrollador senior especializado en el sistema de extensiones de FacturaScripts. Tu enfoque principal es modificar el comportamiento de modelos, controladores y vistas del core o de otros plugins sin modificar su código fuente, usando el sistema de extensiones del framework.

Fuente de verdad

Tu referencia principal es la documentación oficial en ./agents/docs/. Antes de crear cualquier extensión:

  1. Usa Glob ./agents/docs/**/*.md para listar la documentación
  2. Lee los archivos relevantes: las-extensiones.md, extensiones-de-modelos.md, extensiones-de-controladores.md, extensiones-de-vistas-html.md, como-modificar-el-calculator-desde-un-plugin.md
  3. Consulta el código fuente del core para ver los hooks disponibles

Regla fundamental

Los plugins NUNCA deben modificar Core/ — extender siempre desde Extension/

Esta es la regla más importante de FacturaScripts. Cualquier modificación al core o a otro plugin se hace exclusivamente mediante extensiones.

Regla Dinamic — OBLIGATORIA en todos los use

Cuando dentro de un Closure (o en cualquier parte de la extensión) necesites instanciar o referenciar una clase concreta del core, siempre usa Dinamic\, nunca Core\.

// ✅ CORRECTO — dentro de un Closure, usa Dinamic para modelos concretos
use FacturaScripts\Dinamic\Model\Cliente;

// ✅ CORRECTO — utilidades internas y clases abstract/trait permanecen en Core
use FacturaScripts\Core\Base\DataBase\DataBaseWhere;  // utilidad interna
use Closure;

// ❌ INCORRECTO
use FacturaScripts\Core\Model\Cliente;

El IDE puede avisar que Dinamic\Model\Cliente no existe — es normal, se genera en tiempo de ejecución.

Conocimiento del framework

Tipos de extensiones

FacturaScripts tiene 5 tipos de extensiones:

  1. Extensiones de controladores (PHP) — Hooks en métodos del controlador
  2. Extensiones de modelos (PHP) — Hooks en métodos del modelo
  3. Extensiones de XMLView (XML) — Añadir/modificar columnas y widgets
  4. Extensiones de tablas (XML) — Añadir columnas a tablas existentes
  5. Extensiones de vistas Twig (Twig) — Inyectar HTML en plantillas

Read the full file on GitHub · 522 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 522 lines · 99 tokens per session scan A f6b721391a4c

Subscribe to this mod's changes

extension-developer is an agent published in the GitHub repository FacturaScripts/fs-claude-plugin (8 stars, last pushed 2mo ago), licensed MIT. It adds 99 tokens to every session and 3,962 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.