Skill: Create Skill
Validate and deploy agent-generated skill code to the Horizon platform with optional dry-run mode for safe testing before deployment.
The Create Skill skill validates and deploys agent-generated skill code to the Horizon platform. It supports a dry-run mode that lets agents test whether their generated code passes validation without actually deploying it — enabling an iterative write-validate-fix-deploy workflow.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
category | string | Yes | The skill category to deploy the skill under (e.g., web, platform, custom). Must be a valid category name containing only lowercase letters and hyphens. |
skill_name | string | Yes | The name of the skill. Must be unique within the category and version. Must contain only lowercase letters, numbers, and hyphens. |
version | string | Yes | The version identifier (e.g., v1.0, v2.0). Must follow the vN.N format. |
code | string | Yes | The full source code of the skill. Must export a default async function handler. See validation requirements below. |
dry_run | boolean | No | When true, the skill is validated but not deployed. Defaults to false. |
Deploying a skill with the same category, skill_name, and version as an existing skill will overwrite the existing skill. Use a new version number to preserve previous implementations.
Validation requirements
The code parameter must meet the following requirements to pass validation:
-
Export pattern — the code must export a default async function. The expected pattern is:
jsexport default async function handler(params, context) { // skill logic here } -
File system restrictions — the code must not attempt to write files outside the designated skills directory. Any
fs.writeFileor similar operations are sandboxed. -
No prohibited imports — the code must not import modules that are not available in the skill runtime environment. The available runtime modules include standard Node.js built-ins and a curated set of utility libraries.
-
Parameter schema — the code should declare its parameter schema using a
PARAMSexport or inline JSDoc annotations so that the platform can validate incoming parameters at execution time. -
Return value — the handler function must return a JSON-serializable object.
Example usage
Dry-run validation
An agent building a new skill for a user might first validate the code:
“Create a skill that converts temperatures between Fahrenheit and Celsius.”
The agent generates the code and invokes Create Skill with:
category:customskill_name:temperature-converterversion:v1.0code: (generated skill code)dry_run:true
If validation passes, the agent informs the user and asks for confirmation before deploying.
Deploying a skill
After validation and user confirmation:
category:customskill_name:temperature-converterversion:v1.0code: (the validated skill code)dry_run:false
The skill is now live and can be invoked by any agent in the workspace with the custom category enabled.
Iterative development
When validation fails, the response includes specific error messages. The agent can fix the issues and re-validate:
- Agent generates code and calls Create Skill with
dry_run: true. - Validation returns an error: “Missing default export.”
- Agent fixes the export and calls Create Skill with
dry_run: trueagain. - Validation passes. Agent calls Create Skill with
dry_run: falseto deploy.
Response structure
Successful deployment
{
"status": "deployed",
"category": "custom",
"skill_name": "temperature-converter",
"version": "v1.0",
"deployed_at": "2026-03-18T16:00:00Z"
}Successful dry run
{
"status": "valid",
"category": "custom",
"skill_name": "temperature-converter",
"version": "v1.0",
"validation_passed": true
}Validation failure
{
"status": "invalid",
"errors": [
"Missing default async function export",
"Prohibited import: 'child_process'"
]
}Behavior notes
- Sandbox enforcement — deployed skills run in a sandboxed environment with limited file system access, no network access outside approved endpoints, and memory/CPU constraints.
- Overwrite semantics — deploying to an existing
category/skill_name/versioncombination replaces the previous code. The old code is not preserved. Use version increments to maintain history. - Workspace scope — deployed skills are available to all agents in the workspace that have the skill’s category enabled.
- Naming conventions — skill names should be descriptive and use kebab-case (e.g.,
temperature-converter,invoice-summary). The category should group related skills logically. - Code size limit — skill code is limited to 500 KB. Larger skills should be refactored into smaller, composable skills.
Agents can use Get Skill to inspect existing skills before creating new ones. This helps maintain consistency in coding patterns and parameter conventions across the workspace’s skill library.
Related skills: Get Skill | Export File