judo-runtime:create-interceptor

Create custom OperationCallInterceptor implementations for JUDO operations.

Updated May 5, 2022
One-click install
npx skills add https://github.com/BlackBeltTechnology/judo-runtime-core --skill judo-runtime-create-interceptor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: judo-runtime:create-interceptor
Source: https://github.com/BlackBeltTechnology/judo-runtime-core/tree/main/judo-runtime-core-dispatcher/src/main/resources/claude/plugins/judo-dispatcher/skills/create-interceptor
Command: npx skills add https://github.com/BlackBeltTechnology/judo-runtime-core --skill judo-runtime-create-interceptor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables developers to seamlessly integrate custom logic into JUDO operations, allowing for pre-processing of inputs, post-processing of results, and the implementation of side effects like webhooks or audit logging.

Core Features & Use Cases

  • Pre-operation Hook: Modify input payloads before an operation is executed.
  • Post-operation Hook: Transform results or trigger side effects after an operation completes.
  • Selective Interception: Define which operations an interceptor should apply to.
  • Asynchronous Execution: Run interceptor logic off the main thread for non-blocking operations.
  • Use Case: Implement an audit log by intercepting all 'create' operations to record user actions and data changes.

Quick Start

Create a new Java class that implements the OperationCallInterceptor interface and register it using Guice or Spring.

Frequently Asked Questions about judo-runtime:create-interceptor

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

FAQPage Schema
How do I add audit logging to JUDO operations?

To add audit logging in JUDO, implement an OperationCallInterceptor to intercept 'create' operations, record user actions and data changes, then register it via Guice or Spring.

How does an operation interceptor work for input validation?

An operation interceptor validates inputs by hooking into the pre-operation phase, modifying input payloads before execution, and selectively applying to defined operations within the JUDO flow.

Can I trigger webhooks after a JUDO operation completes?

Yes, you can trigger webhooks by implementing a post-operation hook using OperationCallInterceptor, executing side effects or asynchronous logic off the main thread after operation completion.

How do I register an OperationCallInterceptor in Guice or Spring?

Register an OperationCallInterceptor by creating a Java class implementing the interface, then wiring it into your application's dependency injection configuration using Guice or Spring.

How do I test custom JUDO interceptors?

Test custom JUDO interceptors using the JUDO TestKit, which supports validating pre-processing inputs, post-processing results, and verifying side effects like webhooks or audit logging.

What is the best way to transform results in a JUDO application?

Transform results by implementing a post-operation hook with OperationCallInterceptor, modifying operation outputs directly within the JUDO extension point interface before returning the response.