create-strategy

Generates a TypeScript class extending SimpleStrategy for custom Glyvio plugin algorithms.

1|Updated Jun 11, 2026
One-click install
npx skills add https://github.com/devena/glyvio-forge --skill create-strategy-devena
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: create-strategy
Source: https://github.com/devena/glyvio-forge/tree/main/claude/skills/create-strategy
Command: npx skills add https://github.com/devena/glyvio-forge --skill create-strategy-devena

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers building Glyvio plugins need a consistent, correctly registered way to encapsulate custom calculations or deferred execution routines, and writing the strategy boilerplate by hand risks violating platform rules like forbidden imports or manual registry insertion. ## Core Features & Use Cases - Strategy Class Generation: Produces a TypeScript class extending glyvio_core.SimpleStrategy with typed input and output generics and the @glyvio_core.Strategy decorator for automatic registration. - Architectural Rule Enforcement: Ensures no external imports of Glyvio globals, no manual registry manipulation, and correct guidance on when a queued Strategy is appropriate versus direct handleBefore/handleAfter logic. - Use Case: A developer needs a tax_calculator_us strategy that deduplicates rapid saves of child rows before recalculating a total; the skill generates the strategy file, adds the import to the server entrypoint, and validates the build. ## Quick Start Ask the agent to create a Glyvio strategy with a given strategy ID, class name, input type, and output type for your custom calculation.

Frequently Asked Questions about create-strategy

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

FAQPage Schema
How do I create a custom strategy in a Glyvio plugin?▼

Create a TypeScript file in src/strategies defining a class that extends glyvio_core.SimpleStrategy with typed input and output generics, decorate it with @glyvio_core.Strategy({ id }), and import the file in the server entrypoint so the decorator registers it at initialization.

When should I use a Strategy versus handleBefore or handleAfter in Glyvio?▼

Use a Strategy with pushToQueue only for deferred operations needing deduplication, such as recalculating totals when many child rows save at once. For simple synchronous side effects like copying a field or querying a record, run the logic directly in handleBefore or handleAfter.

Can I import SimpleStrategy from a Glyvio core package?▼

No. Glyvio classes, decorators, and services are injected globally at runtime, so you must reference glyvio_core.SimpleStrategy directly without any import statement. Importing from core packages violates the platform's architectural rules.

How is a Glyvio strategy registered in the strategy engine?▼

Registration happens automatically through the @glyvio_core.Strategy({ id }) decorator when the strategy file is imported during plugin initialization. You must never insert strategies into the registry manually.

Why does my Glyvio strategy fail type checking after generation?▼

Type errors usually come from missing or mismatched input and output generics on SimpleStrategy<T, R>. Run pnpm run build or pnpm tsc --noEmit to verify that the declared input interface and return type match the execute method implementation.