output-parsers
Generate output parsers for mcptools with unstructured return types. Use when a tool returns raw strings or Result models with…
Save executed Python code as reusable tools in the gentools package. Use when preserving successful code executions for later reuse. Covers creating package structure (api.py, impl.py), defining Pydantic output models, and implementing the run() interface.
$ npx -y skills add gradion-ai/freeact --skill saving-codeacts --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/saving-codeactsContext preview
The summary Claude sees to decide when to auto-load this skill.
Save executed Python code as reusable tools in the gentools package. Use when preserving successful code executions for later reuse. Covers creating package structure (api.py, impl.py), defining Pydantic output models, and implementing the run() interface.
name: saving-codeacts description: Save executed Python code as reusable tools in the gentools package. Use when preserving successful code executions for later reuse. Covers creating package structure (api.py, impl.py), defining Pydantic output models, and implementing the run() interface.
Save executed Python code as a tool for later reuse.
{generated_rel_dir}/gentools/<category>/<tool>/
├── __init__.py # Empty file
├── api.py # Public interface with structured models
└── impl.py # Implementation detailsmkdir -p {generated_rel_dir}/gentools/<category>/<tool>Create empty `__init__.py` files in both `<category>` and `<tool>` directories.
from __future__ import annotations
from pydantic import BaseModel, Field
class OutputModel(BaseModel):
"""Description of output."""
field: type = Field(..., title="Description")
def run(param1: type, param2: type = default) -> OutputModel:
"""Tool description.
Args:
param1: Description
param2: Description (default: value)
Returns:
OutputModel with structured data
"""
from .impl import implementation_function
return implementation_function(param1, param2)Requirements:
from .api import OutputModel, run __all__ = ["OutputModel", "run"]
from __future__ import annotations
from mcptools.<category>.<tool> import Params, run_parsed
from .api import OutputModel
def implementation_function(param1: type, param2: type) -> OutputModel:
"""Implementation description."""
# Use tools from mcptools or gentools packages
result = run_parsed(Params(...))
# Transform and return structured output
return OutputModel(field=result.data)Requirements:
from gentools.<category>.<tool>.api import run result = run(param1=value1, param2=value2) print(result)
General-purpose AI agent that acts via code actions through a unified execution interface.
Generate output parsers for mcptools with unstructured return types. Use when a tool returns raw strings or Result models with…
Structured task planning workflow with user feedback loops. Use when the user explicitly requests planning (e.g., "make a plan",…