smithery/azure99

blossom-operator-generator

Create or update Blossom operators under src/blossom/op (chat, text, common, util), including choosing MapOperator/FilterOperator/TransformOperator/MetricFilterOperator/Operator, wiring __init__.py exports, and using Context, Provider, DataFrame, and Schema APIs.

Installation

$ npx skills add smithery/azure99 --skill blossom-operator-generator

Summary

  • Create or update Blossom operators under src/blossom/op (chat, text, common, util), including choosing MapOperator/FilterOperator/TransformOperator/MetricFilterOperator/Operator, wiring __init__.py exports, and using Context, Provider, DataFrame, and Schema APIs.
  • Use when asked to add new operators, filters, translators, embedders, distillers, or other pipeline steps.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,549 B
  • docs SUMMARY.md 404 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Blossom Operator Generator

Overview

Use this skill to create consistent Blossom operators that follow existing patterns and integrate cleanly with Context, Provider, DataFrame, and Schema.

Workflow

  1. Clarify intent and schema
  • Identify schema type (ChatSchema, TextSchema, CustomSchema, or generic Schema).
  • Decide whether the operator is map, filter, transform, metric filter, or DataFrame-level.
  • Capture output location (mutate content, add metadata, or replace messages).
  1. Choose the right base class
  • Use MapOperator for one-to-one transforms and failed-item skipping.
  • Use FilterOperator for boolean keep/drop with reverse support.
  • Use TransformOperator for batch-level transforms.
  • Use MetricFilterOperator when you must compute per-item metrics once and cache them.
  • Use Operator only when you need DataFrame-level behavior.
  1. Implement with Blossom patterns
  • Use casttext/castchat/castcustom/castbase for runtime type checks.
  • Use self.context only inside process/process_item (context is injected by Dataset.execute).
  • Follow retry and mark_failed patterns for provider calls.
  • Keep process_item deterministic and thread-safe when parallel > 1.
  1. Wire and validate
  • Place the file under src/blossom/op/<area> and name it snake_case.
  • Export the operator in src/blossom/op/init.py and add to all.
  1. Write unit tests
  • Add tests under tests/ to mirror the src/blossom/ module path (e.g., src/blossom/op/text/foo.py → tests/op/text/test_foo.py).
  • Use pytest with test_<module>.py filenames and cover at least: happy path, schema casting/validation, and filter/transform semantics.
  • Stub provider calls or external dependencies; avoid network access in tests.

References

Read these before implementing or modifying an operator:

  • references/operator-workflow.md for base class semantics, error handling, and schema handling.
  • references/operator-catalog.md for existing operators and parameter patterns.
  • references/integrations.md for Context, Provider, DataFrame, and Schema connections.
  • references/examples.md for operator usage examples in example/.