# Skills

Reusable skills: a model, a prompt, an allowed tool set and an input/output contract you can run on demand.

**Base URL:** `https://api.trustpager.com/functions/v1/api/v1`

## Endpoints

### POST /skills

Create a skill owned by your workspace. A skill is one tool_loop: a model, a system prompt, an allowed tool set, and an input/output contract. Set visibility "public" to make it usable by every workspace (only you can still edit it).

**Scopes:** `agent-ops:write` — [full detail](./skills/post-skills.md)

### DELETE /skills/:skill_id

Delete a skill your workspace owns.

**Scopes:** `agent-ops:delete` — [full detail](./skills/delete-skills-skill-id.md)

### GET /skills/:skill_id

Fetch a single skill by id (must be public or owned by your workspace).

**Scopes:** `agent-ops:read` — [full detail](./skills/get-skills-skill-id.md)

### GET /skills

List skills available to this workspace: every public skill plus the workspace's own private skills. Filter by visibility or status.

**Scopes:** `agent-ops:read` — [full detail](./skills/get-skills.md)

### POST /skills/run

Run a skill (by id or name) against an input and return its output, tool trace, and token usage. Runs one bounded tool_loop on the skill's configured model with its allowed tools. Use this to test a skill or to invoke one on demand. Only public skills and skills your workspace owns can be run.

**Scopes:** `agent-ops:write` — [full detail](./skills/post-skills-run.md)

### PATCH /skills/:skill_id

Update a skill your workspace owns (model, prompt, tools, visibility, status, etc.). You cannot edit another workspace's public skill.

**Scopes:** `agent-ops:write` — [full detail](./skills/patch-skills-skill-id.md)
