Skip to main content
POST
/
api
/
v2
/
skills
Create a skill
curl --request POST \
  --url https://agp.eu.hcompany.ai/api/v2/skills \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "body": "<string>",
  "source": "<string>",
  "url_pattern": "<string>"
}
'
Creates a new skill in your catalog. Returns 201. Returns the created Skill object.

Request body

The body is the Skill object. See that page for the full meaning of each field; the constraints that matter when creating one are below.
name
string
required
Catalog identifier, kebab-case with an optional single org/ namespace prefix. The h/ prefix is reserved for H employees (rejected with 403 otherwise) and marks the skill as reserved; any other name creates a custom skill, private to your organization. Immutable after creation.
description
string
required
One-line routing hint used for discovery. Non-empty.
body
string
required
The Markdown prompt fragment the agent receives at runtime. Non-empty.
source
string
Optional provenance URL.
url_pattern
string
Optional, informational regex hinting at URLs where this skill applies. 1–1024 characters.

Examples

curl -X POST https://agp.eu.hcompany.ai/api/v2/skills \
  -H "Authorization: Bearer $H_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "extract-table-data",
    "description": "Extract structured data from HTML tables into JSON.",
    "body": "When you encounter an HTML table, extract all rows and columns into a JSON array of objects. Each object should use the table headers as keys.",
    "source": "https://github.com/myorg/skills"
  }'
Response
{
  "name": "extract-table-data",
  "description": "Extract structured data from HTML tables into JSON.",
  "body": "When you encounter an HTML table...",
  "source": "https://github.com/myorg/skills",
  "url_pattern": null
}

Errors

StatusCause
403Attempted to use the reserved h/ namespace without H employee privileges.
409A skill with this name already exists in your catalog.
422Body fails validation; common cases: empty body, invalid name shape.