---
title: 'Define skills in code'
description: 'Version and deploy skill instructions through the server handler.'
---

# Define skills in code

> **Release requirement:** This guide uses Studio extension APIs that are not present in npm `@flexkit/studio@0.0.31`. See [package availability](/docs/reference/compatibility#package-availability) before using the example.

Define skills in a server-side module and pass them to your framework handler. Do not import server tools or their secrets into the Studio client configuration.

```ts filename="flexkit.skills.ts"
import { defineSkill } from '@flexkit/studio/tools';

export const catalogReview = defineSkill({
  name: 'catalog-review',
  description: 'Review catalog completeness without changing records.',
  content: `Inspect product names and category links.
Report missing values with record IDs.
Do not mutate records. Distinguish unavailable data from empty values.`,
});
```

Pass `skills: [catalogReview]` in the handler options alongside any tools. Deploy the handler and use Dashboard's custom-tool synchronization workflow to publish its catalog.

## Contract

Names, descriptions, and content must be nonempty after trimming. Limits are 120 characters for name, 500 for description, and 50,000 for content. Optional `space` is a deployed space code. Skill names must be unique in the handler.

The name is the sync identity. Renaming creates a new skill and removes the old one, including its automation attachments. Review attachments after a rename rather than assuming they transfer automatically.

See the complete [handler registration example](/docs/automations/custom-tools) and [tools reference](/docs/reference/tools).


---

[View full sitemap](/docs/sitemap.md)
