Allowed Types for Function Arguments in Claude Plugin Skill Files
Claude Plugin skill files support seven argument types: string, integer, float, boolean, enum, array, and object.
When building Claude Plugins, you'll define slash-command arguments in SKILL.md files using a lightweight JSON-style schema. Understanding the allowed function argument types is essential for creating valid skill definitions that Claude can parse and execute correctly. The anthropics/claude-plugins-community repository demonstrates these types through concrete skill implementations like tres-report-create and tres-upload-tx-header-validation.
Primitive Types in Skill Files
Skill files support four fundamental primitive types for arguments. These handle the most common data requirements in plugin commands.
string
The string type accepts arbitrary text input. Use it for names, descriptions, free-form content, or any text-based parameter.
arguments:
- name: walletName
type: string
description: "Name of the wallet to create"
integer
The integer type represents whole signed numbers. It's ideal for counts, limits, indices, or any discrete numeric value.
arguments:
- name: limit
type: integer
description: "Maximum number of rows to return"
float
The float type handles decimal numbers. Use it for prices, percentages, measurements, or any continuous numeric value.
arguments:
- name: price
type: float
description: "Price per token"
boolean
The boolean type accepts true or false values. Common for toggle flags, dry-run modes, or enabling/disabling features.
arguments:
- name: dryRun
type: boolean
default: false
description: "Run the mutation without persisting changes"
Composite Types in Skill Files
Beyond primitives, skill files support three composite types that add structure and validation to arguments.
enum
The enum type restricts input to a fixed set of string values. This enforces valid choices and improves Claude's understanding of acceptable inputs.
arguments:
- name: exportFormat
type: enum
values: [CSV, XLSX, JSON]
description: "Desired file format for the generated report"
In tres-finance-plugin/skills/tres-report-create/SKILL.md, the enum type ensures only supported export formats are requested.
array
The array type represents a list of values with a single uniform element type. Specify the item type using the items field.
arguments:
- name: tags
type: array
items: string
description: "Optional tags for the asset"
The items field can reference any supported type, allowing arrays of strings, integers, or other primitives.
object
The object type accepts arbitrary JSON objects with nested fields. Use it for flexible metadata, configuration blocks, or complex structured data.
arguments:
- name: metadata
type: object
description: "Optional free-form metadata"
Complete Skill File Example
The tres-report-create skill in tres-finance-plugin/skills/tres-report-create/SKILL.md demonstrates multiple argument types working together:
arguments:
- name: reportName
type: string
description: "Human-readable name for the report to generate"
- name: exportFormat
type: enum
values: [CSV, XLSX, JSON]
description: "Desired file format for the generated report"
- name: dryRun
type: boolean
default: false
description: "Validate the request without actually creating the report"
This pattern—string for naming, enum for constrained choices, and boolean for flags—appears consistently across community plugins.
Type Mapping to Python
The skill file schema maps directly to Python type hints. Here's how the tres-report-create arguments translate:
from typing import Literal
def tres_report_create(
reportName: str,
exportFormat: Literal["CSV", "XLSX", "JSON"],
dryRun: bool = False
) -> dict:
"""Generate a TRES Finance report."""
# implementation …
return {"status": "ok", "reportUrl": "..."}
Reference Files
These source files demonstrate argument types in production skill definitions:
.claude-plugin/marketplace.json– Master manifest listing all community plugins and skillstres-finance-plugin/skills/tres-report-create/SKILL.md– Full arguments schema withstring,enum, andbooleantypestres-finance-plugin/skills/tres-upload-tx-header-validation/SKILL.md– Additional examples ofstring,enum, andbooleanarguments
Summary
Claude Plugin skill files support seven function argument types across two categories:
- Primitives:
string,integer,float,boolean— for basic data - Composites:
enum,array,object— for structured and validated data
Key implementation details from the anthropics/claude-plugins-community source:
- Arguments are declared under the
argumentskey inSKILL.mdfiles enumrequires avaluesarray listing allowed stringsarrayrequires anitemsfield specifying the element typebooleansupports an optionaldefaultvalue
Frequently Asked Questions
Can I use nested objects inside array items?
No. The skill file schema in anthropics/claude-plugins-community supports single-type arrays only. For complex nested structures, use the object type and handle validation within your plugin implementation.
Is there a date or datetime type?
No. Neither date nor datetime appears as a dedicated type in community skill files. Represent temporal values as string arguments with clear format descriptions, or use integer for Unix timestamps.
What happens if I omit the type field?
Claude cannot parse the argument correctly. Every entry in the arguments array must include a valid type field. The parser in Claude's plugin system expects this schema for proper validation and tool-use generation.
Can I define custom validation beyond enum values?
No. The skill file schema provides structural types only. Implement additional validation logic—range checks, regex patterns, cross-field dependencies—in your plugin's handler code, not in the SKILL.md definition.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →