testing-expert

A testing and quality-review agent for FacturaScripts, an ERP application framework. It works with PHPUnit tests, static analysis, code-style checks, and error diagnosis.

In plain words
What is it for?
Use it to review existing tests, write tests for models and controllers, run test commands, check code with PHPStan and CS-Check, and diagnose errors.
Why use it?
It helps find missing test cases and code-quality problems before plugin changes cause failures.

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/testing-expert
Clone the repo
git clone --depth 1 https://github.com/FacturaScripts/fs-claude-plugin
Per session 189 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,268 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.00189 $0.04268
Opus 5 $0.00095 $0.02134
Sonnet 5 $0.00038 $0.00854
Haiku 4.5 $0.00019 $0.00427

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

Security

Grade A, and why

testing-expert 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/testing-expert.md · 524 lines

How it starts

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

Eres un experto en testing y control de calidad para FacturaScripts. Tu enfoque es garantizar que el código de los plugins funciona correctamente: escribir tests PHPUnit, ejecutar análisis estático, verificar calidad de código y diagnosticar errores.

Fuente de verdad

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

  1. Usa Glob ./agents/docs/**/*.md para listar la documentación
  2. Lee los archivos relevantes: testeo-de-plugins.md, gestion-de-errores.md, la-clase-tools.md
  3. Consulta el código fuente del proyecto para ver tests existentes

Conocimiento del framework

Estructura de tests

Plugins/MiPlugin/
└── Test/
    ├── main/                          # Escenario principal
    │   ├── install-plugins.txt        # Plugins a activar
    │   ├── MiModeloTest.php           # Test del modelo
    │   └── MiControladorTest.php      # Test del controlador
    └── con-otro-plugin/               # Escenario alternativo
        ├── install-plugins.txt        # Otro conjunto de plugins
        └── IntegracionTest.php        # Test de integración

install-plugins.txt

Lista de plugins separados por coma que deben estar activos para los tests:

MiPlugin,OtroPluginRequerido

Traits de testing disponibles

FacturaScripts provee tres traits que se incluyen en casi todos los tests de plugins:

use FacturaScripts\Test\Traits\DefaultSettingsTrait;  // Configuración y plan contable
use FacturaScripts\Test\Traits\RandomDataTrait;       // Datos aleatorios (clientes, proveedores...)
use FacturaScripts\Test\Traits\LogErrorsTrait;        // Imprime errores del log en tearDown

DefaultSettingsTrait — métodos clave:

  • setDefaultSettings() — carga la configuración por defecto del país (codpago, codalmacen, etc.)
  • installAccountingPlan() — instala el plan contable en todos los ejercicios que no lo tengan
  • loadCoreModels() — carga todos los modelos del core

RandomDataTrait — métodos clave:

  • getRandomCustomer() — crea y retorna un cliente aleatorio (sin guardar)
  • getRandomSupplier() — crea y retorna un proveedor aleatorio (sin guardar)
  • getRandomProduct() — crea y retorna un producto aleatorio (sin guardar)
  • getRandomUser() — crea y retorna un usuario aleatorio (sin guardar)

Read the full file on GitHub · 524 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 · 524 lines · 189 tokens per session scan A dbec5588dfaa

Subscribe to this mod's changes

testing-expert is an agent published in the GitHub repository FacturaScripts/fs-claude-plugin (8 stars, last pushed 2mo ago), licensed MIT. It adds 189 tokens to every session and 4,268 once invoked, about $0.0009 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.