Skip to content

feat(sdk,cli): namespace agent skills with trigger- and add cost-savings#3970

Open
ericallam wants to merge 1 commit into
mainfrom
feature/tri-11011-bundle-all-documentation-docs-in-the-sdk-prefix-skills-with
Open

feat(sdk,cli): namespace agent skills with trigger- and add cost-savings#3970
ericallam wants to merge 1 commit into
mainfrom
feature/tri-11011-bundle-all-documentation-docs-in-the-sdk-prefix-skills-with

Conversation

@ericallam

Copy link
Copy Markdown
Member

Summary

Three improvements to the SDK-bundled agent skills (follow-up to the skills installer):

  • trigger- namespace. The installed skills (authoring-tasks, getting-started, …) had generic names that collide with unrelated skills in a shared agent skills directory. They're now prefixed — trigger-authoring-tasks, trigger-getting-started, etc. — matching the convention the public skills repo already uses.
  • New trigger-cost-savings skill. An MCP-driven cost audit: right-sizes machines, flags missing maxDuration, spots sequential triggers that could batch, and reviews schedule frequency, using list_runs / get_run_details for live analysis.
  • Bundle the full docs. @trigger.dev/sdk now bundles the entire "Documentation" section of the docs (157 pages) instead of a curated 55-page subset, so an agent has the complete, version-pinned reference in node_modules.

How the bundling works

scripts/bundleSdkDocs.ts now reads docs/docs.json, walks the "Documentation" dropdown, and copies every page under it into the SDK. The set tracks the docs navigation automatically — add a page to the nav and it ships, no skill edits needed. The API reference and Guides & examples dropdowns are intentionally excluded. A skill's sources: frontmatter is now informational only.

The dropped idea of a dedicated trigger-config skill is replaced by references to the bundled build-extension docs (config/extensions/*) from the trigger-authoring-tasks config section and the chat-agent skills.

@changeset-bot

changeset-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 603d5e4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 25 packages
Name Type
@trigger.dev/sdk Patch
trigger.dev Patch
@trigger.dev/python Patch
@internal/sdk-compat-tests Patch
@trigger.dev/build Patch
@trigger.dev/core Patch
@trigger.dev/plugins Patch
@trigger.dev/react-hooks Patch
@trigger.dev/redis-worker Patch
@trigger.dev/rsc Patch
@trigger.dev/schema-to-json Patch
@trigger.dev/database Patch
@trigger.dev/otlp-importer Patch
@trigger.dev/rbac Patch
@internal/cache Patch
@internal/clickhouse Patch
@internal/llm-model-catalog Patch
@internal/redis Patch
@internal/replication Patch
@internal/run-engine Patch
@internal/schedule-engine Patch
@internal/testcontainers Patch
@internal/tracing Patch
@internal/tsql Patch
@internal/zod-worker Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

All agent skills are renamed to use a trigger- namespace prefix (e.g., authoring-taskstrigger-authoring-tasks) in both packages/cli-v3/skills/ and packages/trigger-sdk/skills/. A new trigger-cost-savings skill is added to both locations. The scripts/bundleSdkDocs.ts bundler is refactored to derive its file manifest from the Documentation dropdown in docs/docs.json rather than scanning skill frontmatter sources: fields. Public documentation in docs/skills.mdx and docs/mcp-agent-rules.mdx, plus the init.ts AI-handoff message, are updated to reference the new skill names.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is largely incomplete—it lacks the required checklist items, does not indicate which issue(s) it closes, has no testing section, and is missing the changelog and screenshot sections specified in the template. Add the required checklist section with items marked as complete/incomplete, include 'Closes #' at the top, add a Testing section with test steps, add a Changelog section, and include a Screenshots section where applicable.
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: namespacing agent skills with 'trigger-' prefix and adding the new cost-savings skill, which are the primary objectives of this PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/tri-11011-bundle-all-documentation-docs-in-the-sdk-prefix-skills-with

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ericallam ericallam marked this pull request as ready for review June 16, 2026 17:17

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

Comment thread scripts/bundleSdkDocs.ts
Comment on lines 39 to +49
async function collectManifest(): Promise<string[]> {
const entries = await fs.readdir(skillsDir, { withFileTypes: true }).catch(() => []);
const all = new Set<string>();

for (const entry of entries) {
if (!entry.isDirectory()) continue;
const skillMd = path.join(skillsDir, entry.name, "SKILL.md");
const sources = await readSkillSources(skillMd).catch(() => []);
for (const s of sources) {
// Only bundle docs paths; ignore anything that isn't a docs/*.mdx source.
if (s.startsWith("docs/") && s.endsWith(".mdx")) all.add(s);
}
const docsJson = JSON.parse(await fs.readFile(path.join(docsRoot, "docs.json"), "utf8"));
const dropdowns: Array<{ dropdown?: string }> = docsJson?.navigation?.dropdowns ?? [];
const documentation = dropdowns.find((d) => d.dropdown === DROPDOWN);

if (!documentation) {
throw new Error(`[bundleSdkDocs] "${DROPDOWN}" dropdown not found in docs/docs.json`);
}

return [...all].sort();
// Page paths are root-relative without extension (e.g. "tasks/overview"); map to docs/*.mdx.
return [...new Set(collectPages(documentation))];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 bundleSdkDocs now bundles significantly more docs than before

The old approach bundled only docs explicitly cited in skill sources: frontmatter (a curated set of ~30-40 pages). The new approach bundles the entire "Documentation" dropdown from docs.json, which includes ~130+ pages across Getting started, Fundamentals, Writing tasks, Agents, Configuration, Deployment, Realtime, CLI, Observability, Troubleshooting, Self-hosting, etc. This is a substantial increase in bundled content that will increase the published @trigger.dev/sdk package size. This seems intentional (the comment says "every page under it is bundled"), but the package size impact should be considered.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5e3db042-e160-4a73-8dd4-0ef1d66dd596

📥 Commits

Reviewing files that changed from the base of the PR and between cf4aa7e and 95db45c.

📒 Files selected for processing (16)
  • .changeset/trigger-skill-namespace-and-docs.md
  • docs/mcp-agent-rules.mdx
  • docs/skills.mdx
  • packages/cli-v3/skills/trigger-authoring-chat-agent/SKILL.md
  • packages/cli-v3/skills/trigger-authoring-tasks/SKILL.md
  • packages/cli-v3/skills/trigger-chat-agent-advanced/SKILL.md
  • packages/cli-v3/skills/trigger-cost-savings/SKILL.md
  • packages/cli-v3/skills/trigger-getting-started/SKILL.md
  • packages/cli-v3/skills/trigger-realtime-and-frontend/SKILL.md
  • packages/cli-v3/src/commands/init.ts
  • packages/trigger-sdk/skills/trigger-authoring-chat-agent/SKILL.md
  • packages/trigger-sdk/skills/trigger-authoring-tasks/SKILL.md
  • packages/trigger-sdk/skills/trigger-chat-agent-advanced/SKILL.md
  • packages/trigger-sdk/skills/trigger-cost-savings/SKILL.md
  • packages/trigger-sdk/skills/trigger-realtime-and-frontend/SKILL.md
  • scripts/bundleSdkDocs.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (7)
docs/**/*.mdx

📄 CodeRabbit inference engine (docs/CLAUDE.md)

docs/**/*.mdx: MDX documentation pages must include frontmatter with title (required), description (required), and sidebarTitle (optional) in YAML format
Use Mintlify components for structured content: , , , , , , /, /
Always import from @trigger.dev/sdk in code examples (never from @trigger.dev/sdk/v3)
Code examples must be complete and runnable where possible
Use language tags in code fences: typescript, bash, json

Files:

  • docs/mcp-agent-rules.mdx
  • docs/skills.mdx
**/*.{js,ts,tsx,jsx,css,json,md}

📄 CodeRabbit inference engine (AGENTS.md)

Use Prettier for code formatting and run pnpm run format before committing

Files:

  • packages/cli-v3/skills/trigger-realtime-and-frontend/SKILL.md
  • packages/cli-v3/skills/trigger-cost-savings/SKILL.md
  • packages/cli-v3/skills/trigger-authoring-chat-agent/SKILL.md
  • packages/trigger-sdk/skills/trigger-authoring-chat-agent/SKILL.md
  • packages/trigger-sdk/skills/trigger-realtime-and-frontend/SKILL.md
  • packages/trigger-sdk/skills/trigger-authoring-tasks/SKILL.md
  • packages/cli-v3/skills/trigger-chat-agent-advanced/SKILL.md
  • packages/trigger-sdk/skills/trigger-chat-agent-advanced/SKILL.md
  • packages/cli-v3/skills/trigger-authoring-tasks/SKILL.md
  • packages/cli-v3/skills/trigger-getting-started/SKILL.md
  • packages/cli-v3/src/commands/init.ts
  • scripts/bundleSdkDocs.ts
  • packages/trigger-sdk/skills/trigger-cost-savings/SKILL.md
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,tsx}: Use types over interfaces for TypeScript
Avoid using enums; prefer string unions or const objects instead

Import from @trigger.dev/sdk when writing Trigger.dev tasks. Never use @trigger.dev/sdk/v3 or deprecated client.defineJob

Files:

  • packages/cli-v3/src/commands/init.ts
  • scripts/bundleSdkDocs.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use function declarations instead of default exports

**/*.{ts,tsx,js,jsx}: Prefer static imports over dynamic imports. Only use dynamic import() when circular dependencies cannot be resolved, code splitting is needed for performance, or the module must be loaded conditionally at runtime
Import subpaths only from packages/core (@trigger.dev/core), never import from the root

Files:

  • packages/cli-v3/src/commands/init.ts
  • scripts/bundleSdkDocs.ts
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/otel-metrics.mdc)

**/*.ts: When creating or editing OTEL metrics (counters, histograms, gauges), ensure metric attributes have low cardinality by using only enums, booleans, bounded error codes, or bounded shard IDs
Do not use high-cardinality attributes in OTEL metrics such as UUIDs/IDs (envId, userId, runId, projectId, organizationId), unbounded integers (itemCount, batchSize, retryCount), timestamps (createdAt, startTime), or free-form strings (errorMessage, taskName, queueName)
When exporting OTEL metrics via OTLP to Prometheus, be aware that the exporter automatically adds unit suffixes to metric names (e.g., 'my_duration_ms' becomes 'my_duration_ms_milliseconds', 'my_counter' becomes 'my_counter_total'). Account for these transformations when writing Grafana dashboards or Prometheus queries

Files:

  • packages/cli-v3/src/commands/init.ts
  • scripts/bundleSdkDocs.ts
packages/cli-v3/src/commands/**/*

📄 CodeRabbit inference engine (packages/cli-v3/CLAUDE.md)

CLI command definitions should be located in src/commands/

Files:

  • packages/cli-v3/src/commands/init.ts
packages/cli-v3/src/commands/init.ts

📄 CodeRabbit inference engine (packages/cli-v3/CLAUDE.md)

Implement init.ts command in src/commands/ for project initialization

Files:

  • packages/cli-v3/src/commands/init.ts
🧠 Learnings (9)
📚 Learning: 2026-03-10T12:44:14.176Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 3200
File: docs/config/config-file.mdx:353-368
Timestamp: 2026-03-10T12:44:14.176Z
Learning: In the trigger.dev repo, docs PRs are often companions to implementation PRs. When reviewing docs PRs (MDX files under docs/), check the PR description for any companion/related PR references and verify that the documented features exist in those companion PRs before flagging missing implementations. This ensures docs stay in sync with code changes across related PRs.

Applied to files:

  • docs/mcp-agent-rules.mdx
  • docs/skills.mdx
📚 Learning: 2026-04-30T20:30:29.458Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3226
File: docs/ai-chat/quick-start.mdx:13-13
Timestamp: 2026-04-30T20:30:29.458Z
Learning: In this repo’s documentation MDX files (`docs/**/*.mdx`), use `ts` and `tsx` (not `typescript`) as the code-fence language tags for TypeScript/TSX snippets. Do not flag `ts`/`tsx` code-fence language tags as incorrect in any docs MDX file, since this is the site-wide Mintlify-compatible convention.

Applied to files:

  • docs/mcp-agent-rules.mdx
  • docs/skills.mdx
📚 Learning: 2026-03-22T13:26:12.060Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3244
File: apps/webapp/app/components/code/TextEditor.tsx:81-86
Timestamp: 2026-03-22T13:26:12.060Z
Learning: In the triggerdotdev/trigger.dev codebase, do not flag `navigator.clipboard.writeText(...)` calls for `missing-await`/`unhandled-promise` issues. These clipboard writes are intentionally invoked without `await` and without `catch` handlers across the project; keep that behavior consistent when reviewing TypeScript/TSX files (e.g., usages like in `apps/webapp/app/components/code/TextEditor.tsx`).

Applied to files:

  • packages/cli-v3/src/commands/init.ts
  • scripts/bundleSdkDocs.ts
📚 Learning: 2026-03-22T19:24:14.403Z
Learnt from: matt-aitken
Repo: triggerdotdev/trigger.dev PR: 3187
File: apps/webapp/app/v3/services/alerts/deliverErrorGroupAlert.server.ts:200-204
Timestamp: 2026-03-22T19:24:14.403Z
Learning: In the triggerdotdev/trigger.dev codebase, webhook URLs are not expected to contain embedded credentials/secrets (e.g., fields like `ProjectAlertWebhookProperties` should only hold credential-free webhook endpoints). During code review, if you see logging or inclusion of raw webhook URLs in error messages, do not automatically treat it as a credential-leak/secrets-in-logs issue by default—first verify the URL does not contain embedded credentials (for example, no username/password in the URL, no obvious secret/token query params or fragments). If the URL is credential-free per this project’s conventions, allow the logging.

Applied to files:

  • packages/cli-v3/src/commands/init.ts
  • scripts/bundleSdkDocs.ts
📚 Learning: 2026-05-18T08:21:27.694Z
Learnt from: d-cs
Repo: triggerdotdev/trigger.dev PR: 3632
File: apps/webapp/sentry.server.ts:4-21
Timestamp: 2026-05-18T08:21:27.694Z
Learning: When handling Prisma error P1001 ("Can't reach database server") in TypeScript, don’t assume a single error shape. Prisma can surface P1001 via two different error classes/fields: `PrismaClientKnownRequestError` exposes it as `err.code === "P1001"` (common during mid-query connection drops), while `PrismaClientInitializationError` exposes it as `err.errorCode === "P1001"` (common on client startup failure). Therefore, predicates should use `err.code === "P1001" || err.errorCode === "P1001"`. Do not flag `err.code === "P1001"` as “unreachable/never matches,” as it is expected in production.

Applied to files:

  • packages/cli-v3/src/commands/init.ts
  • scripts/bundleSdkDocs.ts
📚 Learning: 2026-05-18T08:21:27.694Z
Learnt from: d-cs
Repo: triggerdotdev/trigger.dev PR: 3632
File: apps/webapp/sentry.server.ts:4-21
Timestamp: 2026-05-18T08:21:27.694Z
Learning: When handling Prisma errors for P1001 ("Can't reach database server"), do not assume it only appears under a single property name. Prisma may surface P1001 via either `PrismaClientKnownRequestError` (`err.code === "P1001"`, e.g., mid-query connection drops) or `PrismaClientInitializationError` (`err.errorCode === "P1001"`, e.g., client startup connection failure). To reliably detect the condition, check `err.code === "P1001" || err.errorCode === "P1001"`, and avoid review rules that would incorrectly flag `err.code === "P1001"` as unreachable/never-matching.

Applied to files:

  • packages/cli-v3/src/commands/init.ts
  • scripts/bundleSdkDocs.ts
📚 Learning: 2026-06-13T19:53:13.759Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3937
File: packages/trigger-sdk/skills/realtime-and-frontend/SKILL.md:258-260
Timestamp: 2026-06-13T19:53:13.759Z
Learning: When reviewing code that uses `trigger.dev/react-hooks`’s `useRealtimeRun`, preserve the call signature where the first argument is the full realtime handle object (not `handle.id`). This is intentional to maintain type-safety and is consistent with the official docs; do not suggest changing the first argument from the handle object to `handle.id`.

Applied to files:

  • packages/cli-v3/src/commands/init.ts
  • scripts/bundleSdkDocs.ts
📚 Learning: 2026-06-04T18:16:35.386Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 3836
File: apps/supervisor/src/backpressure/backpressureMonitor.ts:3-5
Timestamp: 2026-06-04T18:16:35.386Z
Learning: When reviewing TypeScript in this repo, apply the rule “prefer type aliases over interfaces” only to data/object shapes and union/intersection type modeling. If an interface is being used as a behavioral contract for collaborators to implement (e.g., method-shape interfaces that define required behavior, such as `BackpressureLogger` / `BackpressureSignalSource` in `apps/supervisor/src/backpressure/backpressureMonitor.ts`), keep it as an `interface` and do not flag it as a type-alias-vs-interface violation.

Applied to files:

  • packages/cli-v3/src/commands/init.ts
  • scripts/bundleSdkDocs.ts
📚 Learning: 2026-06-09T17:58:04.699Z
Learnt from: 0ski
Repo: triggerdotdev/trigger.dev PR: 3879
File: apps/webapp/app/models/vercelIntegration.server.ts:619-630
Timestamp: 2026-06-09T17:58:04.699Z
Learning: In this codebase, outbound raw `fetch` calls should typically rely on Node/undici’s default request timeout (about ~300s) rather than adding a per-call `AbortController` + `setTimeout` wrapper inside individual functions (e.g. in files like `apps/webapp/app/models/vercelIntegration.server.ts`). During code review, do not flag the absence of a per-call timeout on a single `fetch` as an issue; if per-call timeouts are needed, they should be implemented via a codebase-wide convention (e.g., a shared fetch wrapper or documented pattern) rather than ad-hoc per-function changes.

Applied to files:

  • packages/cli-v3/src/commands/init.ts
  • scripts/bundleSdkDocs.ts
🪛 LanguageTool
packages/trigger-sdk/skills/trigger-cost-savings/SKILL.md

[uncategorized] ~116-~116: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ... (see the adjacent package.json). The full cost documentation ships alongside it under ...

(EN_COMPOUND_ADJECTIVE_INTERNAL)

🪛 SkillSpector (2.1.1)
packages/cli-v3/skills/trigger-realtime-and-frontend/SKILL.md

[error] 29: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 29: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 29: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 29: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))

packages/trigger-sdk/skills/trigger-realtime-and-frontend/SKILL.md

[error] 235: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 235: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 235: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))

🔇 Additional comments (10)
packages/cli-v3/skills/trigger-getting-started/SKILL.md (1)

1-214: LGTM!

packages/cli-v3/skills/trigger-authoring-tasks/SKILL.md (1)

1-57: LGTM!

packages/cli-v3/skills/trigger-authoring-chat-agent/SKILL.md (1)

1-60: LGTM!

packages/cli-v3/skills/trigger-chat-agent-advanced/SKILL.md (1)

1-70: LGTM!

packages/cli-v3/skills/trigger-realtime-and-frontend/SKILL.md (1)

1-58: LGTM!

packages/cli-v3/skills/trigger-cost-savings/SKILL.md (1)

1-35: LGTM!

docs/skills.mdx (1)

1-91: LGTM!

docs/mcp-agent-rules.mdx (1)

1-41: LGTM!

packages/cli-v3/src/commands/init.ts (1)

238-246: Skill name references updated correctly in AI hand-off outro.

Lines 240 and 242 now reference trigger-getting-started, which aligns with the context snippet from packages/cli-v3/skills/trigger-getting-started/SKILL.md confirming the skill's declared name. The conditional logic for different tooling combinations is preserved correctly.

.changeset/trigger-skill-namespace-and-docs.md (1)

1-7: Changeset structure and content are correct.

The file properly declares patch bumps for both @trigger.dev/sdk and trigger.dev, and the description accurately reflects the three changes: (1) trigger- namespace prefix on skills, (2) new trigger-cost-savings skill, and (3) full Trigger.dev documentation bundling. Wording and scope match the PR objectives.

Comment on lines +3 to +7
description: >
Analyze Trigger.dev tasks, schedules, and runs for cost optimization opportunities. Use when
asked to reduce spend, optimize costs, audit usage, right-size machines, or review task
efficiency. Combines static source analysis with live run analysis via the Trigger.dev MCP
tools (list_runs, get_run_details, get_current_worker).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use parser-compatible frontmatter for description.

Line 3 uses description: >, but the SDK frontmatter parser only supports simple single-line key: value strings; this will load description as just ">" instead of the intended text.

Suggested fix
-description: >
-  Analyze Trigger.dev tasks, schedules, and runs for cost optimization opportunities. Use when
-  asked to reduce spend, optimize costs, audit usage, right-size machines, or review task
-  efficiency. Combines static source analysis with live run analysis via the Trigger.dev MCP
-  tools (list_runs, get_run_details, get_current_worker).
+description: Analyze Trigger.dev tasks, schedules, and runs for cost optimization opportunities. Use when asked to reduce spend, optimize costs, audit usage, right-size machines, or review task efficiency. Combines static source analysis with live run analysis via the Trigger.dev MCP tools (list_runs, get_run_details, get_current_worker).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
description: >
Analyze Trigger.dev tasks, schedules, and runs for cost optimization opportunities. Use when
asked to reduce spend, optimize costs, audit usage, right-size machines, or review task
efficiency. Combines static source analysis with live run analysis via the Trigger.dev MCP
tools (list_runs, get_run_details, get_current_worker).
description: Analyze Trigger.dev tasks, schedules, and runs for cost optimization opportunities. Use when asked to reduce spend, optimize costs, audit usage, right-size machines, or review task efficiency. Combines static source analysis with live run analysis via the Trigger.dev MCP tools (list_runs, get_run_details, get_current_worker).

Comment thread scripts/bundleSdkDocs.ts
Comment on lines 78 to 89
for (const rel of manifest) {
const src = path.join(repoRoot, rel);
const src = path.join(docsRoot, `${rel}.mdx`);
try {
await fs.access(src);
} catch {
// A nav entry pointing at a nonexistent page is a docs-nav issue, not a bundler one.
// Warn and skip rather than fail the SDK build.
missing.push(rel);
continue;
}
// Strip the leading "docs/" so files land at <sdk>/docs/<subpath>.
const dest = path.join(outDir, rel.slice("docs/".length));
const dest = path.join(outDir, `${rel}.mdx`);
await fs.mkdir(path.dirname(dest), { recursive: true });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Validate nav-derived paths before filesystem joins.

On Line 79 and Line 88, rel from docs/docs.json is used directly in path.join(...). A malformed nav entry like ../... can escape docsRoot/outDir and copy unintended files into the package.

Suggested fix
   for (const rel of manifest) {
-    const src = path.join(docsRoot, `${rel}.mdx`);
+    const safeRel = path.posix.normalize(rel);
+    if (path.isAbsolute(safeRel) || safeRel.startsWith("..") || safeRel.includes("/../")) {
+      throw new Error(`[bundleSdkDocs] invalid nav path "${rel}" under "${DROPDOWN}"`);
+    }
+
+    const src = path.join(docsRoot, `${safeRel}.mdx`);
     try {
       await fs.access(src);
     } catch {
       // A nav entry pointing at a nonexistent page is a docs-nav issue, not a bundler one.
       // Warn and skip rather than fail the SDK build.
       missing.push(rel);
       continue;
     }
-    const dest = path.join(outDir, `${rel}.mdx`);
+    const dest = path.join(outDir, `${safeRel}.mdx`);

Comment thread scripts/bundleSdkDocs.ts
Comment on lines 94 to 107
if (missing.length > 0) {
console.error(
`[bundleSdkDocs] ${missing.length} doc source(s) cited by a skill do not exist:\n` +
missing.map((m) => ` - ${m}`).join("\n") +
`\nFix the skill's sources: list or add the doc.`
console.warn(
`[bundleSdkDocs] ${missing.length} "${DROPDOWN}" nav page(s) have no .mdx and were skipped:\n` +
missing.map((m) => ` - ${m}`).join("\n")
);
process.exit(1);
}

console.log(`[bundleSdkDocs] bundled ${copied} docs into ${path.relative(repoRoot, outDir)}`);
console.log(
`[bundleSdkDocs] bundled ${copied} docs from the "${DROPDOWN}" nav into ${path.relative(
repoRoot,
outDir
)}`
);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fail the build when all nav pages are skipped.

If every src is missing, the script logs warnings and exits successfully with copied === 0, yielding an empty bundled docs directory while reporting success.

Suggested fix
   if (missing.length > 0) {
     console.warn(
       `[bundleSdkDocs] ${missing.length} "${DROPDOWN}" nav page(s) have no .mdx and were skipped:\n` +
         missing.map((m) => `  - ${m}`).join("\n")
     );
   }

+  if (copied === 0) {
+    throw new Error(`[bundleSdkDocs] 0 docs copied from "${DROPDOWN}" nav; refusing empty SDK docs bundle`);
+  }
+
   console.log(
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (missing.length > 0) {
console.error(
`[bundleSdkDocs] ${missing.length} doc source(s) cited by a skill do not exist:\n` +
missing.map((m) => ` - ${m}`).join("\n") +
`\nFix the skill's sources: list or add the doc.`
console.warn(
`[bundleSdkDocs] ${missing.length} "${DROPDOWN}" nav page(s) have no .mdx and were skipped:\n` +
missing.map((m) => ` - ${m}`).join("\n")
);
process.exit(1);
}
console.log(`[bundleSdkDocs] bundled ${copied} docs into ${path.relative(repoRoot, outDir)}`);
console.log(
`[bundleSdkDocs] bundled ${copied} docs from the "${DROPDOWN}" nav into ${path.relative(
repoRoot,
outDir
)}`
);
}
if (missing.length > 0) {
console.warn(
`[bundleSdkDocs] ${missing.length} "${DROPDOWN}" nav page(s) have no .mdx and were skipped:\n` +
missing.map((m) => ` - ${m}`).join("\n")
);
}
if (copied === 0) {
throw new Error(`[bundleSdkDocs] 0 docs copied from "${DROPDOWN}" nav; refusing empty SDK docs bundle`);
}
console.log(
`[bundleSdkDocs] bundled ${copied} docs from the "${DROPDOWN}" nav into ${path.relative(
repoRoot,
outDir
)}`
);
}

The installed skills now use a `trigger-` prefix (`trigger-authoring-tasks`,
`trigger-getting-started`, and so on) so they do not collide with non-Trigger
skills in a shared agent skills directory, matching the public skills repo.

Adds `trigger-cost-savings`: an MCP-driven audit that right-sizes machines, flags
missing `maxDuration`, and spots sequential triggers that could batch.

`@trigger.dev/sdk` now bundles the entire Documentation section of the docs
(not just a curated subset), so an agent has the full version-pinned reference in
node_modules. The build derives the set from the docs navigation, so it stays in
sync automatically.
@ericallam ericallam force-pushed the feature/tri-11011-bundle-all-documentation-docs-in-the-sdk-prefix-skills-with branch from 95db45c to 603d5e4 Compare June 16, 2026 17:46
@pkg-pr-new

pkg-pr-new Bot commented Jun 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

@trigger.dev/build

npm i https://pkg.pr.new/@trigger.dev/build@603d5e4

trigger.dev

npm i https://pkg.pr.new/trigger.dev@603d5e4

@trigger.dev/core

npm i https://pkg.pr.new/@trigger.dev/core@603d5e4

@trigger.dev/python

npm i https://pkg.pr.new/@trigger.dev/python@603d5e4

@trigger.dev/react-hooks

npm i https://pkg.pr.new/@trigger.dev/react-hooks@603d5e4

@trigger.dev/redis-worker

npm i https://pkg.pr.new/@trigger.dev/redis-worker@603d5e4

@trigger.dev/rsc

npm i https://pkg.pr.new/@trigger.dev/rsc@603d5e4

@trigger.dev/schema-to-json

npm i https://pkg.pr.new/@trigger.dev/schema-to-json@603d5e4

@trigger.dev/sdk

npm i https://pkg.pr.new/@trigger.dev/sdk@603d5e4

commit: 603d5e4

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
packages/trigger-sdk/skills/trigger-cost-savings/SKILL.md (1)

3-7: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Frontmatter description must be a single line (unresolved from prior review).

The description: > multiline YAML block scalar will not parse correctly. The SDK's frontmatter parser only supports single-line key: value pairs; it will read description as just ">" instead of the intended text. Collapse the description to a single line.

🐛 Proposed fix
-description: >
-  Analyze Trigger.dev tasks, schedules, and runs for cost optimization opportunities. Use when
-  asked to reduce spend, optimize costs, audit usage, right-size machines, or review task
-  efficiency. Combines static source analysis with live run analysis via the Trigger.dev MCP
-  tools (list_runs, get_run_details, get_current_worker).
+description: "Analyze Trigger.dev tasks, schedules, and runs for cost optimization opportunities. Use when asked to reduce spend, optimize costs, audit usage, right-size machines, or review task efficiency. Combines static source analysis with live run analysis via the Trigger.dev MCP tools (list_runs, get_run_details, get_current_worker)."

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7f96d702-97d9-4db6-90b3-61789b9be626

📥 Commits

Reviewing files that changed from the base of the PR and between 95db45c and 603d5e4.

📒 Files selected for processing (16)
  • .changeset/trigger-skill-namespace-and-docs.md
  • docs/mcp-agent-rules.mdx
  • docs/skills.mdx
  • packages/cli-v3/skills/trigger-authoring-chat-agent/SKILL.md
  • packages/cli-v3/skills/trigger-authoring-tasks/SKILL.md
  • packages/cli-v3/skills/trigger-chat-agent-advanced/SKILL.md
  • packages/cli-v3/skills/trigger-cost-savings/SKILL.md
  • packages/cli-v3/skills/trigger-getting-started/SKILL.md
  • packages/cli-v3/skills/trigger-realtime-and-frontend/SKILL.md
  • packages/cli-v3/src/commands/init.ts
  • packages/trigger-sdk/skills/trigger-authoring-chat-agent/SKILL.md
  • packages/trigger-sdk/skills/trigger-authoring-tasks/SKILL.md
  • packages/trigger-sdk/skills/trigger-chat-agent-advanced/SKILL.md
  • packages/trigger-sdk/skills/trigger-cost-savings/SKILL.md
  • packages/trigger-sdk/skills/trigger-realtime-and-frontend/SKILL.md
  • scripts/bundleSdkDocs.ts
✅ Files skipped from review due to trivial changes (10)
  • packages/trigger-sdk/skills/trigger-authoring-tasks/SKILL.md
  • packages/cli-v3/skills/trigger-cost-savings/SKILL.md
  • packages/cli-v3/src/commands/init.ts
  • docs/mcp-agent-rules.mdx
  • packages/cli-v3/skills/trigger-authoring-tasks/SKILL.md
  • packages/cli-v3/skills/trigger-getting-started/SKILL.md
  • packages/cli-v3/skills/trigger-chat-agent-advanced/SKILL.md
  • packages/cli-v3/skills/trigger-authoring-chat-agent/SKILL.md
  • packages/trigger-sdk/skills/trigger-authoring-chat-agent/SKILL.md
  • packages/trigger-sdk/skills/trigger-chat-agent-advanced/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • .changeset/trigger-skill-namespace-and-docs.md
  • scripts/bundleSdkDocs.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (39)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (10, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (5, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (6, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (7, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (11, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (1, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (8, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (4, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (9, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (2, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (12, 12)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (7, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (9, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (3, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (5, 10)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (3, 12)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (8, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (4, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (10, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (6, 10)
  • GitHub Check: sdk-compat / Node.js 22.12 (ubuntu-latest)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (1, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (2, 10)
  • GitHub Check: packages / 🧪 Unit Tests: Packages (3, 3)
  • GitHub Check: sdk-compat / Cloudflare Workers
  • GitHub Check: packages / 🧪 Unit Tests: Packages (1, 3)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
  • GitHub Check: sdk-compat / Deno Runtime
  • GitHub Check: sdk-compat / Node.js 20.20 (ubuntu-latest)
  • GitHub Check: packages / 🧪 Unit Tests: Packages (2, 3)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: sdk-compat / Bun Runtime
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp
  • GitHub Check: typecheck / typecheck
  • GitHub Check: Build and publish previews
  • GitHub Check: audit
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (2)
docs/**/*.mdx

📄 CodeRabbit inference engine (docs/CLAUDE.md)

docs/**/*.mdx: MDX documentation pages must include frontmatter with title (required), description (required), and sidebarTitle (optional) in YAML format
Use Mintlify components for structured content: , , , , , , /, /
Always import from @trigger.dev/sdk in code examples (never from @trigger.dev/sdk/v3)
Code examples must be complete and runnable where possible
Use language tags in code fences: typescript, bash, json

Files:

  • docs/skills.mdx
**/*.{js,ts,tsx,jsx,css,json,md}

📄 CodeRabbit inference engine (AGENTS.md)

Use Prettier for code formatting and run pnpm run format before committing

Files:

  • packages/cli-v3/skills/trigger-realtime-and-frontend/SKILL.md
  • packages/trigger-sdk/skills/trigger-cost-savings/SKILL.md
  • packages/trigger-sdk/skills/trigger-realtime-and-frontend/SKILL.md
🧠 Learnings (2)
📚 Learning: 2026-03-10T12:44:14.176Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 3200
File: docs/config/config-file.mdx:353-368
Timestamp: 2026-03-10T12:44:14.176Z
Learning: In the trigger.dev repo, docs PRs are often companions to implementation PRs. When reviewing docs PRs (MDX files under docs/), check the PR description for any companion/related PR references and verify that the documented features exist in those companion PRs before flagging missing implementations. This ensures docs stay in sync with code changes across related PRs.

Applied to files:

  • docs/skills.mdx
📚 Learning: 2026-04-30T20:30:29.458Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3226
File: docs/ai-chat/quick-start.mdx:13-13
Timestamp: 2026-04-30T20:30:29.458Z
Learning: In this repo’s documentation MDX files (`docs/**/*.mdx`), use `ts` and `tsx` (not `typescript`) as the code-fence language tags for TypeScript/TSX snippets. Do not flag `ts`/`tsx` code-fence language tags as incorrect in any docs MDX file, since this is the site-wide Mintlify-compatible convention.

Applied to files:

  • docs/skills.mdx
🪛 LanguageTool
docs/skills.mdx

[uncategorized] ~27-~27: The official name of this software platform is spelled with a capital “H”.
Context: ... (.claude/skills/, .cursor/skills/, .github/skills/, .agents/skills/). It also a...

(GITHUB)

packages/trigger-sdk/skills/trigger-cost-savings/SKILL.md

[uncategorized] ~116-~116: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ... (see the adjacent package.json). The full cost documentation ships alongside it under ...

(EN_COMPOUND_ADJECTIVE_INTERNAL)

🪛 SkillSpector (2.1.1)
packages/cli-v3/skills/trigger-realtime-and-frontend/SKILL.md

[error] 29: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 29: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 29: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 29: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))

packages/trigger-sdk/skills/trigger-realtime-and-frontend/SKILL.md

[error] 235: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 235: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 235: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))

🔇 Additional comments (6)
docs/skills.mdx (1)

1-51: LGTM!

packages/cli-v3/skills/trigger-realtime-and-frontend/SKILL.md (1)

2-2: LGTM!

Also applies to: 13-13, 22-22, 58-58

packages/trigger-sdk/skills/trigger-cost-savings/SKILL.md (2)

25-46: LGTM! Documentation paths, MCP prerequisites, workflow, and principles are clear and complete.


91-116: LGTM! Cost table, principles, and versioning info are well-structured and accurate.

packages/trigger-sdk/skills/trigger-realtime-and-frontend/SKILL.md (2)

2-2: LGTM!

Also applies to: 13-13, 265-266


30-276: LGTM! Code examples are complete, runnable, and properly tagged with ts/tsx language identifiers. Documentation structure and sibling-skill references are correct and consistent.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 0 new potential issues.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants