/angreal:angreal-argumentsfrom angreal
Adds CLI argument support to angreal tasks via @argument decorator, including flags, types, defaults, and multi-value handling.
Ships in angreal. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Add command-line arguments to angreal tasks using the @argument decorator.
import angreal
@angreal.command(name="greet", about="Greet someone")
@angreal.argument(name="name", long="name", help="Name to greet")
def greet(name="World"):
print(f"Hello, {name}!")
CLI: angreal greet --name Alice
Critical: @argument must come AFTER @command:
# Correct
@angreal.command(name="build", about="Build project")
@angreal.argument(name="release", long="release", is_flag=True, takes_value=False)
def build(release=False):
pass
# Wrong - will fail
@angreal.argument(name="release", is_flag=True) # Error!
@angreal.command(name="build", about="Build project")
def build(release=False):
pass
@angreal.argument(
name, # Required: must match function parameter
short=None, # Short flag: "v" for -v
long=None, # Long flag: "verbose" for --verbose
help=None, # Help text for --help
long_help=None, # Extended help text (shown with --help)
required=None, # Is argument required?
default_value=None, # Default (must be string)
takes_value=True, # Takes a value? (default True)
is_flag=False, # Boolean flag? (default False)
python_type="str", # Type: "str", "int", "float"
multiple_values=None, # Can be repeated?
require_equals=None, # Require --arg=value syntax
number_of_values=None, # Exact number of values required
min_values=None, # Minimum values when multiple
max_values=None, # Maximum values when multiple
)
| Parameter | Type | Description |
|---|---|---|
name | str | Required. Must match function parameter name |
short | str | Single character for short flag (e.g., "v" for -v) |
long | str | Long flag name (e.g., "verbose" for --verbose) |
help | str | Brief help text shown in --help output |
long_help | str | Extended help text for detailed documentation |
required | bool | Whether the argument must be provided |
default_value | str | Default value (always a string, converted by python_type) |
takes_value | bool | Whether argument accepts a value (default: True) |
is_flag | bool | Boolean flag mode (default: False) |
python_type | str | Type conversion: "str", "int", "float" |
multiple_values | bool | Allow repeating the argument |
require_equals | bool | Require --arg=value instead of --arg value |
number_of_values | int | Exact number of values required |
min_values | int | Minimum number of values (with multiple_values) |
max_values | int | Maximum number of values (with multiple_values) |
@angreal.command(name="echo", about="Echo message")
@angreal.argument(name="message", long="message", help="Message to display")
def echo(message="default"):
print(message)
@angreal.command(name="repeat", about="Repeat N times")
@angreal.argument(name="count", long="count", python_type="int", help="Iterations")
def repeat(count=1):
for i in range(int(count)):
print(i)
Use is_flag=True with takes_value=False:
@angreal.command(name="build", about="Build project")
@angreal.argument(
name="verbose",
short="v",
long="verbose",
is_flag=True,
takes_value=False,
help="Enable verbose output"
)
def build(verbose=False):
if verbose:
print("Verbose mode enabled")
CLI: angreal build --verbose or angreal build -v
@angreal.command(name="deploy", about="Deploy application")
@angreal.argument(
name="target",
long="target",
required=True,
help="Deployment target (required)"
)
def deploy(target):
print(f"Deploying to {target}")
@angreal.command(name="compile", about="Compile files")
@angreal.argument(
name="file",
long="file",
multiple_values=True,
help="Files to process"
)
def compile(file=None):
files = file or []
for f in files:
print(f"Processing {f}")
CLI: angreal compile --file a.txt --file b.txt
import angreal
@angreal.command(name="build", about="Build the project")
@angreal.argument(
name="target",
long="target",
default_value="debug",
help="Build target (debug or release)"
)
@angreal.argument(
name="verbose",
short="v",
long="verbose",
is_flag=True,
takes_value=False,
help="Verbose output"
)
@angreal.argument(
name="jobs",
short="j",
long="jobs",
python_type="int",
default_value="4",
help="Parallel jobs"
)
def build(target="debug", verbose=False, jobs=4):
if verbose:
print(f"Building {target} with {jobs} jobs")
CLI: angreal build --target release -v -j 8
@angreal.argument(
name="env",
short="e",
long="env",
default_value="development",
help="Environment: development, staging, production"
)
@angreal.argument(
name="dry_run",
short="n",
long="dry-run",
is_flag=True,
takes_value=False,
help="Show what would be done without making changes"
)
@angreal.argument(
name="input",
short="i",
long="input",
required=True,
help="Input file path"
)
@angreal.argument(
name="output",
short="o",
long="output",
help="Output file path (default: stdout)"
)
Parameter names must match argument name values:
@angreal.command(name="cmd", about="Example")
@angreal.argument(name="target", long="target", required=True)
@angreal.argument(name="verbose", long="verbose", is_flag=True, takes_value=False)
def cmd(target, verbose=False): # Names match!
pass
# Good - includes default and constraints
@angreal.argument(
name="workers",
long="workers",
python_type="int",
default_value="4",
help="Number of worker processes (1-16, default: 4)"
)
Use long_help for extended documentation:
@angreal.argument(
name="format",
long="format",
help="Output format",
long_help="""Output format for the generated report.
Supported formats:
- json: Machine-readable JSON output
- csv: Comma-separated values
- table: Human-readable table (default)
Example: --format=json"""
)
Force --arg=value instead of --arg value:
@angreal.argument(
name="config",
long="config",
require_equals=True,
help="Config file (use --config=path)"
)
CLI: angreal cmd --config=settings.toml (not --config settings.toml)
Require exactly N values:
@angreal.argument(
name="point",
long="point",
number_of_values=2,
help="X Y coordinates"
)
def plot(point):
x, y = point # Always receives exactly 2 values
CLI: angreal plot --point 10 20
Limit how many values can be provided:
@angreal.argument(
name="tags",
long="tag",
multiple_values=True,
min_values=1,
max_values=5,
help="Tags (1-5 required)"
)
def tag(tags):
for t in tags:
print(f"Tag: {t}")
CLI: angreal tag --tag foo --tag bar --tag baz
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub angreal/angreal --plugin angreal10 skills in this plugin
/angreal-authoringThis skill should be used when the user asks to "create an angreal task", "write a task file", "add a command to angreal", "make a new task", "organize tasks with groups", "use @angreal.command", "use command_group", "use angreal.group decorator", "add long_about to a task", "require an angreal version", "same command name in different groups", or needs guidance on task file structure, the @command decorator, command groups (`command_group` and `@group(...)`), `required_version()`, naming conventions, or task organization within an existing angreal project./angreal-initThis skill should be used when the user asks to "create an angreal project", "initialize angreal", "set up angreal", "add angreal to project", "start new angreal project", "create .angreal directory", "scaffold into existing project", "angreal init --in-place", "add angreal to existing repo", or needs guidance on setting up angreal in a new or existing project (hand-rolled `.angreal/` or via an official template), or the initial task file structure./angreal-integrationsThis skill should be used when the user asks to "use Git in a task", "manage virtual environments", "use Docker Compose", "use the Docker class", "run docker container from task", "list docker containers in angreal", "clone a repository", "create a venv", "run docker-compose", "use angreal.integrations", "render a template", "scaffold files", "generate files from template", "use render_template", "use render_directory", "use Flox", "flox environment", "cross-language environment", "flox services", "@flox_required", or needs guidance on the built-in Git, VirtualEnv, Docker (compose or low-level client), Flox, or Tera templating integrations available in angreal tasks./angreal-mcpThis skill should be used when the user asks to "start the angreal mcp server", "expose angreal tasks to Claude / Cursor / an AI agent", "configure .mcp.json for angreal", "set up MCP for my angreal project", "connect angreal to an AI assistant", "what does angreal mcp do", "AI agent integration with angreal", or needs guidance on the built-in Model Context Protocol server (`angreal mcp`), what it exposes, how MCP clients should be configured to connect to it, and how `ToolDescription` and `risk_level` flow into agent context./angreal-patternsThis skill should be used when the user asks to "test angreal tasks", "mock angreal", "document tasks", "angreal best practices", "error handling in tasks", "subprocess patterns", "dry run mode", "verbose mode", "debug an angreal task", "ANGREAL_DEBUG", "propagate subprocess returncode", "angreal exit code 56", or needs guidance on testing patterns, development workflows, documentation strategies, or common implementation patterns for angreal tasks./angreal-pre-commitThis skill should be used when the user asks to "add a pre-commit hook for angreal", "run angreal tasks before commit", "run angreal on pre-push", "set up pre-commit for tests/lint", "configure .pre-commit-config.yaml for angreal", "make tests run automatically before commit", or needs guidance on wiring [pre-commit](https://pre-commit.com/) to invoke angreal tasks (test, lint, format, etc.) at git lifecycle stages.Other plugins' skills for the same job