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

ParameterTypeRequiredDescription
categorystringYesThe 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_namestringYesThe name of the skill. Must be unique within the category and version. Must contain only lowercase letters, numbers, and hyphens.
versionstringYesThe version identifier (e.g., v1.0, v2.0). Must follow the vN.N format.
codestringYesThe full source code of the skill. Must export a default async function handler. See validation requirements below.
dry_runbooleanNoWhen true, the skill is validated but not deployed. Defaults to false.
Caution

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:

  1. Export pattern — the code must export a default async function. The expected pattern is:

    js
    export default async function handler(params, context) {
      // skill logic here
    }
  2. File system restrictions — the code must not attempt to write files outside the designated skills directory. Any fs.writeFile or similar operations are sandboxed.

  3. 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.

  4. Parameter schema — the code should declare its parameter schema using a PARAMS export or inline JSDoc annotations so that the platform can validate incoming parameters at execution time.

  5. 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: custom
  • skill_name: temperature-converter
  • version: v1.0
  • code: (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: custom
  • skill_name: temperature-converter
  • version: v1.0
  • code: (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:

  1. Agent generates code and calls Create Skill with dry_run: true.
  2. Validation returns an error: “Missing default export.”
  3. Agent fixes the export and calls Create Skill with dry_run: true again.
  4. Validation passes. Agent calls Create Skill with dry_run: false to deploy.

Response structure

Successful deployment

json
{
  "status": "deployed",
  "category": "custom",
  "skill_name": "temperature-converter",
  "version": "v1.0",
  "deployed_at": "2026-03-18T16:00:00Z"
}

Successful dry run

json
{
  "status": "valid",
  "category": "custom",
  "skill_name": "temperature-converter",
  "version": "v1.0",
  "validation_passed": true
}

Validation failure

json
{
  "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/version combination 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.
Note

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