-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
docs: document the trigger skills installer (replaces agent rules) #3871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ericallam
wants to merge
2
commits into
main
Choose a base branch
from
docs/trigger-skills-command
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+76
−182
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,132 +1,41 @@ | ||
| --- | ||
| title: "Agent rules" | ||
| description: "Trigger.dev agent rules are now agent skills, installed with the trigger.dev CLI." | ||
| sidebarTitle: "Agent rules" | ||
| description: "Install Trigger.dev agent rules to guide AI assistants toward correct, up-to-date code patterns." | ||
| --- | ||
|
|
||
| ## What are Trigger.dev agent rules? | ||
|
|
||
| Trigger.dev agent rules are comprehensive instruction sets that guide AI assistants to write optimal Trigger.dev code. These rules ensure your AI assistant understands best practices, current APIs, and recommended patterns when working with Trigger.dev projects. | ||
|
|
||
| <Note> | ||
| Agent Rules are one of three AI tools we provide. You can also install [Skills](/skills) for portable cross-editor instruction sets or the [MCP Server](/mcp-introduction) for live project interaction. See the [comparison table](/building-with-ai#skills-vs-agent-rules-vs-mcp) for details. | ||
| Agent rules are now **agent skills**. The standalone rule files have been replaced by skills that | ||
| work across every major AI assistant from a single install. See [Skills](/skills). | ||
| </Note> | ||
|
|
||
| ## Installation | ||
|
|
||
| Install the agent rules with the following command: | ||
|
|
||
| ```bash | ||
| npx trigger.dev@latest install-rules | ||
| ``` | ||
|
|
||
| ## Available rule sets | ||
|
|
||
| We provide five specialized rule sets, each optimized for different aspects of Trigger.dev development: | ||
|
|
||
| | Rule set | Tokens | Description | GitHub | | ||
| |:---------|:-------|:------------|:------------| | ||
| | **Basic tasks** | 1,200 | Essential rules for writing basic Trigger.dev tasks and fundamental patterns | [View](https://github.com/triggerdotdev/trigger.dev/blob/main/rules/4.0.0/basic-tasks.md) | | ||
| | **Advanced tasks** | 3,000 | Comprehensive rules for complex workflows, error handling, and advanced task patterns | [View](https://github.com/triggerdotdev/trigger.dev/blob/main/rules/4.0.0/advanced-tasks.md) | | ||
| | **Scheduled tasks** | 780 | Specialized guidance for cron jobs, scheduled workflows, and time-based triggers | [View](https://github.com/triggerdotdev/trigger.dev/blob/main/rules/4.0.0/scheduled-tasks.md) | | ||
| | **Configuration** | 1,900 | Complete guide for trigger.config.ts setup, environment configuration, and project structure | [View](https://github.com/triggerdotdev/trigger.dev/blob/main/rules/4.0.0/config.md) | | ||
| | **Realtime** | 1,700 | Using Trigger.dev Realtime features and frontend integration patterns | [View](https://github.com/triggerdotdev/trigger.dev/blob/main/rules/4.0.0/realtime.md) | | ||
|
|
||
| ## Claude Code subagent | ||
|
|
||
| For Claude Code users, we provide a subagent called `trigger-dev-expert` that's an expert at writing well-structured Trigger.dev code. | ||
|
|
||
| ### Installation | ||
|
|
||
| The subagent is available as an option when running the rules installation command. Select "Claude Code" as your client and choose to include the subagent when prompted. | ||
|
|
||
|  | ||
|
|
||
| ### Usage | ||
|
|
||
| Activate the subagent in your prompts by requesting it explicitly: | ||
|
|
||
| ```markdown | ||
| use the trigger-dev-expert subagent to create a trigger.dev job that accepts a video url, processes it with ffmpeg to extract the audio, runs the audio through a text-to-speech API like openai, and then uploads both the transcription and the audio to s3 | ||
| ``` | ||
|
|
||
| The subagent works best when combined with the appropriate rule sets installed alongside it, providing both high-level architectural guidance and detailed implementation knowledge. | ||
|
|
||
| ## Supported AI clients | ||
|
|
||
| The Trigger.dev rules work across a wide range of AI coding assistants and editors: | ||
|
|
||
| | Client | Rule activation | Docs | | ||
| |:--------|:----------------|:--------------| | ||
| | **Cursor** | Automatic when working in trigger directories | [Link](https://docs.cursor.com/en/context/rules#rules/) | | ||
| | **Claude Code** | Context-aware activation + custom subagent | [Link](https://docs.anthropic.com/en/docs/claude-code) | | ||
| | **VSCode Copilot** | Integration with GitHub Copilot chat | [Link](https://code.visualstudio.com/docs/copilot/overview) | | ||
| | **Windsurf** | Automatic activation in Trigger.dev projects | [Link](https://docs.windsurf.com/windsurf/cascade/memories#rules) | | ||
| | **Gemini CLI** | Command-line integration | [Link](https://ai.google.dev/gemini-api/docs) | | ||
| | **Cline** | Automatic context detection | [Link](https://github.com/cline/cline) | | ||
| | **Sourcegraph AMP** | Code intelligence integration | [Link](https://sourcegraph.com/docs) | | ||
| | **Kilo** | Custom rule integration | [Link](https://kilocode.ai/docs/advanced-usage/custom-rules) | | ||
| | **Ruler** | Rule management | [Link](https://github.com/intellectronica/ruler) | | ||
| | **AGENTS.md** | Universal format for OpenAI Codex, Jules, OpenCode, etc. | | | ||
|
|
||
| ### Rule activation behavior | ||
|
|
||
| Different AI tools handle rules differently: | ||
|
|
||
| - **Automatic Activation**: Cursor, Windsurf, VSCode Copilot, and Cline automatically apply relevant rules when working in Trigger.dev projects or when `trigger.config.ts` is detected | ||
| - **Context-Aware**: Claude Code intelligently applies rules based on the current context and file types | ||
| - **Manual Integration**: AGENTS.md clients and others append rules to configuration files for manual activation | ||
|
|
||
| ## Keeping rules updated | ||
|
|
||
| Trigger.dev rules are regularly updated to reflect new features, API changes, and best practices. The CLI includes automatic update detection. | ||
|
|
||
| ### Automatic update notifications | ||
|
|
||
| When running `npx trigger.dev@latest dev`, you'll receive notifications when newer rule versions are available with a simple update command. | ||
|
|
||
| ### Manual updates | ||
|
|
||
| Update rules anytime with: | ||
|
|
||
| ```bash | ||
| npx trigger.dev@latest install-rules | ||
| ``` | ||
|
|
||
| The update process replaces existing rules without creating duplicates, keeping your configuration files clean and organized. | ||
|
|
||
| ### Why updates matter | ||
|
|
||
| - **Current API patterns**: Access the latest Trigger.dev APIs and features | ||
| - **Performance optimizations**: Benefit from improved patterns and practices | ||
| - **Deprecated pattern avoidance**: Prevent AI assistants from generating outdated code | ||
| - **New feature support**: Immediate access to newly released capabilities | ||
| ## What changed | ||
|
|
||
| ## Getting started | ||
| Trigger.dev used to install per-tool *rule files* (`.cursor/rules/trigger.*.mdc`, regions in `CLAUDE.md`, and so on) fetched from GitHub. That has been replaced by [agent skills](/skills): `SKILL.md` directories in the open [Agent Skills standard](https://agentskills.io) that ship inside the CLI, version-matched to the Trigger.dev version you build against, and load on demand instead of always sitting in your context. | ||
|
|
||
| 1. Install the rules: | ||
| The install command is the same, and now installs skills: | ||
|
|
||
| ```bash | ||
| npx trigger.dev@latest install-rules | ||
| npx trigger.dev@latest skills | ||
| ``` | ||
|
|
||
| 2. Follow the prompts to install the rules for your AI client. | ||
| `npx trigger.dev@latest install-rules` still works as an alias, and `trigger dev` offers to install the skills on first run. | ||
|
|
||
| 3. Consider installing the `trigger-dev-expert` subagent if using Claude Code. | ||
| The old task and realtime guidance now lives in the `authoring-tasks` and `realtime-and-frontend` skills, alongside two new skills for building `chat.agent` AI agents. See [Skills](/skills) for the full list and supported assistants. | ||
|
|
||
| ## Next steps | ||
|
|
||
| <CardGroup cols={2}> | ||
| <Card title="Skills" icon="wand-magic-sparkles" href="/skills"> | ||
| Portable instruction sets that work across all AI coding assistants. | ||
| Install Trigger.dev agent skills into your AI coding assistant. | ||
| </Card> | ||
| <Card title="MCP Server" icon="sparkles" href="/mcp-introduction"> | ||
| Give your AI assistant direct access to Trigger.dev tools and APIs. | ||
| </Card> | ||
| <Card title="Complete AI setup" icon="layer-group" href="/building-with-ai"> | ||
| See all AI tools and how they compare. | ||
| <Card title="Building with AI" icon="layer-group" href="/building-with-ai"> | ||
| See how skills and the MCP server compare. | ||
| </Card> | ||
| <Card title="Writing tasks" icon="code" href="/tasks/overview"> | ||
| Learn the task patterns that agent rules teach your AI assistant. | ||
| Learn the task patterns that skills teach your AI assistant. | ||
| </Card> | ||
| </CardGroup> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚩 mcp-introduction.mdx still links to Agent Rules with outdated description
The file
docs/mcp-introduction.mdx:385still contains a Card linking to/mcp-agent-ruleswith the old description "Install comprehensive rule sets directly into your AI client." While the link itself still works (the page exists as a deprecation notice), the card description is now misleading since agent rules have been replaced by skills. This PR didn't update that file. It's a minor consistency gap — not a bug since the page still exists and serves as a redirect.Was this helpful? React with 👍 or 👎 to provide feedback.