backend-hooks

Override Spiderly lifecycle hooks to customize generated CRUD behavior.

61|24|Updated Sep 14, 2024
One-click install
npx skills add https://github.com/filiptrivan/spiderly --skill backend-hooks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-hooks
Source: https://github.com/filiptrivan/spiderly/tree/main/claude-plugins/skills/backend-hooks
Command: npx skills add https://github.com/filiptrivan/spiderly --skill backend-hooks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enable per-entity customization of the generated CRUD lifecycle by overriding hooks in the generated services, avoiding changes to the core generator and ensuring consistent behavior across entities.

Core Features & Use Cases

  • Per-entity service inheritance enabling overrides via {Entity}Service and {Entity}ServiceGenerated
  • Virtual lifecycle hooks for Save, Get, Delete, and related operations with documented signatures
  • Auto-registered DI integrations ensuring overrides are discovered without manual wiring
  • Transactional execution semantics so hooks always run within a single database transaction

Quick Start

Override the backend hooks for a given entity to customize its lifecycle during save and retrieve operations.

Frequently Asked Questions about backend-hooks

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

FAQPage Schema
How do I customize CRUD operations for specific entities in .NET without altering base generated code?

You can customize CRUD operations by overriding virtual lifecycle hooks in generated services. The backend-hooks approach exposes generated virtual methods for Save, Get, and Delete phases, allowing per-entity customization without modifying the core generator.

Can I override service lifecycle hooks like Save and Delete while keeping changes within a transaction?

Yes, overriding service lifecycle hooks for Save, Get, and Delete operations executes entirely within a single database transaction. This transactional execution semantics ensures your custom CRUD behavior remains consistent and safe across generated services.

Do I need to manually configure dependency injection when overriding generated CRUD services?

No, you do not need to manually wire dependency injection for overridden services. The backend-hooks mechanism provides auto-registered DI integrations, ensuring your custom {Entity}Service overrides are discovered and injected automatically without manual configuration.

What is the difference between {Entity}Service and {Entity}ServiceGenerated when customizing CRUD behavior?

Per-entity service inheritance separates customization from generation by using {Entity}Service for your overrides and {Entity}ServiceGenerated for the base logic. This allows you to safely override lifecycle hooks without losing changes when the base code is regenerated.

When should I use backend lifecycle hooks for CRUD services instead of modifying the generated code directly?

Use backend lifecycle hooks when you need per-entity customization of CRUD operations, validation, or transaction handling. Overriding hooks avoids changes to the core generator and ensures consistent behavior across entities, preventing regeneration from overwriting your logic.