chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
---
|
||||
title: "Skills"
|
||||
description: "Install Trigger.dev agent skills to teach any AI coding assistant how to write tasks, realtime frontends, and chat.agent AI agents."
|
||||
sidebarTitle: "Skills"
|
||||
---
|
||||
|
||||
## What are agent skills?
|
||||
|
||||
Skills are portable instruction sets that teach AI coding assistants how to use Trigger.dev effectively. Unlike vendor-specific config files (`.cursor/rules`, `CLAUDE.md`), skills use an open standard that works across all major AI assistants, so Cursor users and Claude Code users get the same knowledge from a single install.
|
||||
|
||||
Each skill is a directory containing a `SKILL.md` file: YAML frontmatter (name, description) plus markdown instructions with patterns, examples, and common mistakes that AI assistants discover on demand and follow.
|
||||
|
||||
<Note>
|
||||
Skills pair with the [MCP Server](/mcp-introduction), which gives your assistant live access to
|
||||
your project (deploy, trigger, monitor). Skills teach it how to write the code; the MCP server
|
||||
lets it act on your project. See [how they fit together](/building-with-ai#skills-and-the-mcp-server).
|
||||
</Note>
|
||||
|
||||
## Installation
|
||||
|
||||
Run the installer with the CLI:
|
||||
|
||||
```bash
|
||||
npx trigger.dev@latest skills
|
||||
```
|
||||
|
||||
The CLI detects your installed AI tools, lets you pick which skills to install, and writes each one into that tool's native skills directory (`.claude/skills/`, `.cursor/skills/`, `.github/skills/`, `.agents/skills/`). It also adds a one-line pointer to your primary instructions file (`CLAUDE.md`, `.cursor/rules`, etc.) so your assistant always knows the skills are there and loads the right one on demand.
|
||||
|
||||
When you run `trigger dev` for the first time, the CLI offers to install the skills for you.
|
||||
|
||||
The installed skills are lightweight. Most point to the full, version-pinned reference that ships inside `@trigger.dev/sdk`, which your assistant reads straight from `node_modules`. The API guidance it follows always matches the `@trigger.dev/sdk` version installed in your project, with no extra step on your part. The `trigger-getting-started` skill is self-contained, since it runs before the SDK is installed.
|
||||
|
||||
### Non-interactive install
|
||||
|
||||
Pass `--target` to choose tools and `-y` to install every skill without prompting (useful in scripts and CI):
|
||||
|
||||
```bash
|
||||
npx trigger.dev@latest skills --target claude-code --target cursor -y
|
||||
```
|
||||
|
||||
## Available skills
|
||||
|
||||
| Skill | Use for | Covers |
|
||||
| ---------------------- | -------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
||||
| `trigger-authoring-tasks` | Writing background and scheduled tasks | `task`/`schemaTask`, retries, queues, waits, idempotency, metadata, triggering, cron, `trigger.config.ts` |
|
||||
| `trigger-realtime-and-frontend`| Live run updates and triggering from the browser | `runs.subscribeToRun`, `@trigger.dev/react-hooks`, public access tokens, streams |
|
||||
| `trigger-authoring-chat-agent` | Building durable AI chat agents | `chat.agent` run loop, `toStreamTextOptions`, server actions, `useChat` transport, tools, lifecycle hooks |
|
||||
| `trigger-chat-agent-advanced` | Advanced chat.agent patterns | sessions, human-in-the-loop, sub-agents, compaction, fast starts, resilience, version upgrades |
|
||||
| `trigger-cost-savings` | Auditing and reducing compute spend | right-sizing machines, `maxDuration`, batch vs sequential, debounce, schedule frequency, MCP run analysis |
|
||||
|
||||
Not sure which to install? Pick `trigger-authoring-tasks`; it covers the most common patterns for writing Trigger.dev tasks.
|
||||
|
||||
## Supported AI assistants
|
||||
|
||||
Skills use the open [Agent Skills standard](https://agentskills.io). The CLI installs natively into the tools that support a skills directory today:
|
||||
|
||||
| Assistant | Installs to |
|
||||
| --- | --- |
|
||||
| [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | `.claude/skills/` |
|
||||
| [Cursor](https://cursor.com) | `.cursor/skills/` |
|
||||
| [GitHub Copilot (VS Code)](https://github.com/features/copilot) | `.github/skills/` |
|
||||
| [Codex CLI](https://github.com/openai/codex), Jules, OpenCode | `.agents/skills/` |
|
||||
|
||||
Using a tool that does not support skills yet? Select "Unsupported target" in the installer for manual setup instructions.
|
||||
|
||||
## Keeping skills updated
|
||||
|
||||
The API guidance updates on its own: it lives in `@trigger.dev/sdk` and is read from `node_modules`, so upgrading the SDK in your project upgrades the guidance with it. Re-run `npx trigger.dev@latest skills` (or accept the prompt that `trigger dev` shows when a newer version is available) only to add skills or refresh the installed pointer files. Re-running overwrites them in place without creating duplicates.
|
||||
|
||||
## Next steps
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="MCP Server" icon="sparkles" href="/mcp-introduction">
|
||||
Give your AI assistant direct access to Trigger.dev tools and APIs.
|
||||
</Card>
|
||||
<Card title="Building with AI" icon="layer-group" href="/building-with-ai">
|
||||
See how skills and the MCP server compare, plus a copy-paste context snippet.
|
||||
</Card>
|
||||
<Card title="Writing tasks" icon="code" href="/tasks/overview">
|
||||
Learn the task patterns that skills teach your AI assistant.
|
||||
</Card>
|
||||
<Card title="AI agents" icon="robot" href="/ai-chat/overview">
|
||||
Build durable chat agents with chat.agent, the focus of two of the skills.
|
||||
</Card>
|
||||
</CardGroup>
|
||||
Reference in New Issue
Block a user