Skill: Create Skill
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
Section titled “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. |
Validation requirements
Section titled “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:
export 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
Section titled “Example usage”Dry-run validation
Section titled “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
Section titled “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
Section titled “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
Section titled “Response structure”Successful deployment
Section titled “Successful deployment”{ "status": "deployed", "category": "custom", "skill_name": "temperature-converter", "version": "v1.0", "deployed_at": "2026-03-18T16:00:00Z"}Successful dry run
Section titled “Successful dry run”{ "status": "valid", "category": "custom", "skill_name": "temperature-converter", "version": "v1.0", "validation_passed": true}Validation failure
Section titled “Validation failure”{ "status": "invalid", "errors": [ "Missing default async function export", "Prohibited import: 'child_process'" ]}Behavior notes
Section titled “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.
API endpoint
Section titled “API endpoint”POST /api/platform/v1.0/create-skill
See the Skill Execution API for details on authentication and request format.
Related skills: Get Skill | Export File