Use Skills
A skill is a reusable workflow that your team saves in the Space. It has Markdown instructions (SKILL.md), and it can have scripts and reference files. Skills live in Library → Skills.
Skills keep automations small. The automation says what to do and when. The skill says how to do it. When the team improves the skill, every automation that uses it gets the improvement.
How automations use skills
Section titled “How automations use skills”| Automation | How it uses a skill |
|---|---|
| Instruction automation | The instructions name the skill. On each run, the managed agent loads it, the same as a skill that you select in the composer. |
| Code automation | The code hands a step to the managed agent with ctx.agent.run. The managed agent uses the Space’s skills for that step. |
The managed agent can also find a skill on its own. It reads skill descriptions to know when a workflow applies.
Name a skill in an instruction automation
Section titled “Name a skill in an instruction automation”Ask Type to make the automation and name the skill. For example:
Every weekday at 8:00, review new support tickets with the /support-triage skill and post a summary in #support.
Type saves the skill as a reference in the instructions. The automation card shows the skill next to the instructions.
Skills as code
Section titled “Skills as code”A skill can include scripts. The managed agent runs them in its sandbox. This lets an automation run code that needs a full runtime:
- shell, Python, JavaScript, or TypeScript scripts,
- npm packages,
- files on disk.
A TypeScript skill can export a typed entrypoint with defineAutomation from @type-dot-com/sdk. The managed agent runs it with JSON arguments. A Zod schema checks the arguments before the code runs. The code returns one decision:
| Result | Meaning |
|---|---|
{ action: "skip", reason? } | Finish. No more work is needed. |
{ action: "invoke_agent", reason, context? } | The managed agent continues, with this evidence. |
{ action: "evaluate", question, context, criteria } | Ask a model if the managed agent must continue. |
import { defineAutomation, z } from "@type-dot-com/sdk";
export default defineAutomation({ input: z.strictObject({ dryRun: z.boolean().default(false) }), async run(args, { type }) { const response = await type.integrations.request({ organizationIntegrationId: "orgint_abc123", method: "GET", path: "/meetings", }); if (response.isErr()) return { action: "invoke_agent", reason: response.error.message }; if (args.dryRun) return { action: "skip", reason: "Connection check succeeded" }; return { action: "invoke_agent", reason: "Review the new meetings", context: { status: response.value.status } }; },});Rules for skill code:
- Type resolves credentials from the connection ID. Do not put credentials in arguments.
- The result must fit in 64 KiB.
- A run has a 3-minute limit.
- Type installs dependencies without lifecycle scripts.
- Skill code can change data. Use dry-run arguments when you test it.
Skills or a code automation?
Section titled “Skills or a code automation?”| Use a skill script when | Use a code automation when |
|---|---|
| The work needs npm packages, Python, or files on disk. | The work must start on every event, fast and at low cost. |
| A person or the managed agent decides when to run it. | A trigger must run it with no AI. |
| Many automations and threads share the same method. | The rules are fixed and must give the same result each time. |
You can use both. A code automation can filter events and hand only the important ones to the managed agent, which then runs the skill.