mloda-plugins

Guide an AI agent through building mloda (https://github.com/mloda-ai/mloda) plugins: FeatureGroup, ComputeFramework, and Extender classes. Use to check the mloda-registry index for an existing plugin

SKILL.md

GitHub

mloda-plugins: Building mloda Plugins

Check the registry index first

Always do this before writing a plugin: it may already exist. mloda-registry publishes community plugins covering common {col}__{op} transforms (aggregation, window/scalar/frame aggregate, scalar/point arithmetic, rank, offset, percentile, binning, datetime, string ops, time bucketization, ffill, ema, sessionization, resample); see its plugins table for the full list. None of it ships with plain pip install mloda; install what you need (pip install mloda-community for all, or one package like pip install "mloda-community-rank[pandas]"), then confirm what's actually loaded:

from mloda.user import PluginLoader
from mloda.steward import get_feature_group_docs

PluginLoader.all()
for fg in get_feature_group_docs():
    print(fg.name, fg.description)

An empty or unrelated result means it isn't installed yet, not that it doesn't exist; see 02-discover-plugins.md for more on installed-vs-available. (The mloda skill covers the same check for requesting data instead of writing a plugin.)

The three plugin types

Type Role Full guide
FeatureGroup A data transformation, the unit you'll write most often 09-create-feature-group.md
ComputeFramework The execution backend a transformation runs on (Pandas, PyArrow, Polars, DuckDB, ...) 10-create-compute-framework.md
Extender Hooks for logging, tracing, validation around feature calculation 11-create-extender.md

Reach for a ComputeFramework only when adding a new execution backend, or an Extender for cross-cutting hooks.

Minimal example

A primary-source FeatureGroup (no inputs):

from mloda.provider import FeatureGroup

class CustomerScoring(FeatureGroup):
    @classmethod
    def calculate_feature(cls, data, features):
        return {"customer_score": 100}

A chained one, reusable via an input__operation feature name (see "FeatureGroup: key decisions" below):

from mloda.provider import FeatureChainParserMixin, FeatureGroup

class MyOp(FeatureChainParserMixin, FeatureGroup):
    PREFIX_PATTERN = r".*__([\w]+)_my_op$"
    PROPERTY_MAPPING = {...}

    @classmethod
    def calculate_feature(cls, data, features): ...

Register either via PluginLoader.all() (installed package) or a direct import; see 03-create-plugin-in-project.md.

The plugin journey

Progression from using to sharing, each guide hosted in mloda-registry:

  1. Use an existing plugin / Discover plugins - start here, before writing anything.
  2. Create a plugin in your project - add a FeatureGroup inline, no separate package.
  3. Create a plugin package - scaffold a standalone installable package from mloda-plugin-template.
  4. Share with your team (private git) / Publish to the community registry / Contribute to official plugins / Become an official plugin.

Full progression: docs/guides/index.md.

FeatureGroup: key decisions

Full decision tree: guide 09. The recurring ones:

Full pattern index (27 guides, covering filters, validators, versioning, streaming, realtime execution, and more): feature-group-patterns/index.md.

ComputeFramework: key decisions

Full decision tree: guide 10.

Full pattern index: compute-framework-patterns/index.md.

Extender: key decisions

Full guide: guide 11. Wraps feature calculation or input/output validation; set a custom priority (lower runs first, default 100) if execution order matters; use class-level storage for state under ParallelizationMode.MULTIPROCESSING (must be pickle-safe).

Reference