PA

params-proto

Easily manage hyperparameter configurations and CLI generation for ML experiments.

Install

mkdir -p .claude/skills/params-proto && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/16393" && unzip -o skill.zip -d .claude/skills/params-proto && rm skill.zip

Installs to .claude/skills/params-proto

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Declarative hyperparameter management for ML/AI experiments. Use when Claude needs to: (1) Create CLI applications with type-hinted parameters and auto-generated help (2) Configure ML training scripts with @proto.cli, @proto.prefix, or @proto decorators (3) Set up multi-namespace configurations with namespaced CLI arguments (4) Read configuration from environment variables using EnvVar (5) Create hyperparameter sweeps using piter or Sweep (6) Work with Union types for subcommand-like CLI patterns
501 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • Create CLI applications with type-hinted parameters
  • Configure ML training scripts with decorators
  • Set up multi-namespace configurations
  • Read configuration from environment variables
  • Create hyperparameter sweeps

How it works

The skill uses decorators like @proto.cli, @proto.prefix, and @proto to define parameters and generate CLI interfaces automatically.

Inputs & outputs

You give it
Python script with @proto decorators and type hints
You get back
CLI application with auto-generated help and configurable parameters

When to use params-proto

  • Creating ML training CLIs
  • Managing hyperparameter sweeps
  • Configuring multi-namespace experiments

About this skill

params-proto v3.2.1

Declarative hyperparameter management for ML experiments with automatic CLI generation.

Installation

pip install params-proto==3.2.0

Three Decorators

DecoratorPurposeAccess Pattern
@proto.cliCLI entry pointParses sys.argv automatically
@proto.prefixSingleton configClassName.attr (class-level)
@protoMulti-instanceinstance.attr (object-level)

Quick Start

Simple CLI Script

from params_proto import proto

@proto.cli
def train(
    lr: float = 0.001,  # Learning rate (inline comment = help text)
    batch_size: int = 32,  # Batch size
    epochs: int = 100,  # Number of epochs
):
    """Train a model."""  # Docstring = CLI description
    print(f"Training with lr={lr}")

if __name__ == "__main__":
    train()
python train.py --lr 0.01 --batch-size 64
python train.py --help

Multi-Namespace Configuration

@proto.prefix
class Model:
    name: str = "resnet50"  # Architecture
    dropout: float = 0.5  # Dropout rate

@proto.prefix
class Training:
    lr: float = 0.001  # Learning rate
    epochs: int = 100  # Epochs

@proto.cli
def main(seed: int = 42):
    """Train with namespaced config."""
    print(f"Model: {Model.name}, LR: {Training.lr}")

# CLI: python train.py --model.name vit --training.lr 0.01

Environment Variables

from params_proto import proto, EnvVar

@proto.cli
def train(
    lr: float = EnvVar @ "LEARNING_RATE" | 0.001,  # Env var with default
    api_key: str = EnvVar @ "API_KEY",  # Required env var (no default)
    # OR operation: try multiple env vars in order
    token: str = EnvVar @ "API_TOKEN" @ "AUTH_TOKEN" | "default",
): ...

Union Types (Subcommand Pattern)

from dataclasses import dataclass

@dataclass
class Adam:
    lr: float = 0.001
    beta1: float = 0.9

@dataclass
class SGD:
    lr: float = 0.01
    momentum: float = 0.9

@proto.cli
def train(optimizer: Adam | SGD):
    """Train with selected optimizer."""
    print(f"Using {type(optimizer).__name__}")

# CLI: python train.py adam --lr 0.001
# CLI: python train.py sgd --momentum 0.95

Hyperparameter Sweeps with piter

from params_proto.hyper import piter

# Zip (default): pairs values element-wise
configs = piter @ {"lr": [0.001, 0.01], "batch_size": [32, 64]}
# 2 configs: (0.001, 32), (0.01, 64)

# Cartesian product with * (only first needs piter @)
configs = piter @ {"lr": [0.001, 0.01]} * {"batch_size": [32, 64]}
# 4 configs: all combinations

# Override with fixed values using %
configs = piter @ {"lr": [0.001, 0.01]} * {"batch_size": [32, 64]} % {"seed": 42}

# Repeat for multiple trials using **
configs = (piter @ {"lr": [0.001, 0.01]}) ** 3  # 2 configs x 3 trials

for config in configs:
    train(**config)

Type Annotations

TypeCLI DisplayExample
intINTcount: int = 10
floatFLOATlr: float = 0.001
strSTRname: str = "default"
boolBOOLdebug: bool = False
Enum{A,B,C}opt: Optimizer = Optimizer.ADAM
LiteralVALUEmode: Literal["a", "b"] = "a"
List[T]VALUEids: List[int] = [1, 2]
Tuple[T, ...]VALUEdims: Tuple[int, ...] = (224, 224)
Optional[T]VALUEpath: str | None = None

Boolean Flags

@proto.cli
def train(
    verbose: bool = False,  # --verbose sets True
    cuda: bool = True,      # --no-cuda sets False
): ...

Override Priority (highest to lowest)

  1. CLI arguments
  2. Direct assignment (Config.lr = 0.01)
  3. Context manager (with proto.bind(Config, lr=0.01): ...)
  4. Environment variables
  5. Default values

Getting a Clean Dict

Config._dict      # → {'lr': 0.001, 'batch_size': 32}
dict(Config)      # → same (works for classes and functions)

Reference Files

For detailed documentation, see:

When not to use it

  • When not working with Python CLI applications
  • When not managing hyperparameters for ML/AI experiments
  • When not needing automatic CLI generation

Prerequisites

params-proto==3.2.0

Limitations

  • Requires Python for script definition.
  • Focuses on CLI generation and hyperparameter management.
  • Relies on specific decorators for functionality.

How it compares

This approach declaratively manages hyperparameters and generates CLIs from Python code, reducing manual CLI parsing and configuration setup.

Compared to similar skills

params-proto side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
params-proto (this skill)06moReviewIntermediate
robotics-code-generator148moNo flagsAdvanced
modal58moReviewIntermediate
hugging-face-cli36moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

robotics-code-generator

HumaizaNaz

Generates clean, runnable ROS 2, Gazebo, Isaac Sim, and VLA code for humanoid robotics

1490

modal

davila7

Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.

587

hugging-face-cli

patchy631

Execute Hugging Face Hub operations using the `hf` CLI. Use when the user needs to download models/datasets/spaces, upload files to Hub repositories, create repos, manage local cache, or run compute jobs on HF infrastructure. Covers authentication, file transfers, repository creation, cache operations, and cloud compute.

350

computer-use-agents

davila7

Build AI agents that interact with computers like humans do - viewing screens, moving cursors, clicking buttons, and typing text. Covers Anthropic's Computer Use, OpenAI's Operator/CUA, and open-source alternatives. Critical focus on sandboxing, security, and handling the unique challenges of vision-based control. Use when: computer use, desktop automation agent, screen control AI, vision-based agent, GUI automation.

1040

machine-learning-ops-ml-pipeline

sickn33

Design and implement a complete ML pipeline for: $ARGUMENTS

436

ray-train

davila7

Distributed training orchestration across clusters. Scales PyTorch/TensorFlow/HuggingFace from laptop to 1000s of nodes. Built-in hyperparameter tuning with Ray Tune, fault tolerance, elastic scaling. Use when training massive models across multiple machines or running distributed hyperparameter sweeps.

336

Search skills

Search the agent skills registry