Problem
Custom columns (@custom_column_generator) are convenient for local/notebook use but hit a hard wall when users need serialization - the generator function serializes to just its __name__, so configs can't round-trip through YAML/JSON. The recommended path is to rewrite as a plugin, but the transformation is mechanical and the boilerplate is easy to get wrong.
Proposal
Add a /port-to-plugin Claude Code skill (.agents/skills/) that takes a Python file containing one or more @custom_column_generator functions and scaffolds a complete, installable plugin package.
Transformation mapping
| Custom column |
Plugin |
@custom_column_generator(required_columns=..., side_effect_columns=...) |
required_columns / side_effect_columns properties on config class |
generator_params: BaseModel fields |
Promoted to config class fields |
model_aliases decorator arg |
Config field + resource_provider.model_registry access in impl |
Function body with row param |
ColumnGeneratorCellByCell.generate() |
Function body with df param |
ColumnGeneratorFullColumn.generate() |
GenerationStrategy choice |
Base class selection |
Output structure
Given /port-to-plugin path/to/my_workflow.py:
data-designer-<name>-plugin/
src/<package_name>/
__init__.py
config.py # SingleColumnConfig subclass with Literal discriminator
impl.py # ColumnGenerator{CellByCell,FullColumn} subclass
plugin.py # Plugin() registration object
pyproject.toml # Entry point under data_designer.plugins
Scope
- Single custom column per invocation (v1), multi-column bundling as a follow-up
- Rewrites
models parameter access to self.resource_provider.model_registry
- Flattens
generator_params into config fields
- Uses
docs/plugins/example.md and tests_e2e/.../plugins/column_generator/ as scaffolding templates
Why a skill and not a CLI command
The transformation requires understanding intent (naming the discriminator, choosing config field types, handling edge cases in function bodies). An LLM-backed skill can make judgment calls that a rigid code generator can't, while the plugin structure is constrained enough that the output is verifiable.
Acceptance criteria
Problem
Custom columns (
@custom_column_generator) are convenient for local/notebook use but hit a hard wall when users need serialization - the generator function serializes to just its__name__, so configs can't round-trip through YAML/JSON. The recommended path is to rewrite as a plugin, but the transformation is mechanical and the boilerplate is easy to get wrong.Proposal
Add a
/port-to-pluginClaude Code skill (.agents/skills/) that takes a Python file containing one or more@custom_column_generatorfunctions and scaffolds a complete, installable plugin package.Transformation mapping
@custom_column_generator(required_columns=..., side_effect_columns=...)required_columns/side_effect_columnsproperties on config classgenerator_params: BaseModelfieldsmodel_aliasesdecorator argresource_provider.model_registryaccess in implrowparamColumnGeneratorCellByCell.generate()dfparamColumnGeneratorFullColumn.generate()GenerationStrategychoiceOutput structure
Given
/port-to-plugin path/to/my_workflow.py:Scope
modelsparameter access toself.resource_provider.model_registrygenerator_paramsinto config fieldsdocs/plugins/example.mdandtests_e2e/.../plugins/column_generator/as scaffolding templatesWhy a skill and not a CLI command
The transformation requires understanding intent (naming the discriminator, choosing config field types, handling edge cases in function bodies). An LLM-backed skill can make judgment calls that a rigid code generator can't, while the plugin structure is constrained enough that the output is verifiable.
Acceptance criteria
.agents/skills/port-to-plugin/generator_paramsflatteningmodelsparameter rewritingdata_designer.pluginsentry point discovery