Agent skill

Trigger Basic

by trycompai in trycompai/comp

Only the most important rules for writing basic Trigger.dev tasks

AGPL-3.0Auto-check passed

Install Trigger Basic

skills CLI
$ npx skills add trycompai/comp --skill trigger-basic -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install trycompai/comp trigger-basic --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/trycompai/comp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/trigger-basic .claude/skills/trigger-basic && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
trigger-basic
GitHub stars
2k
Token cost
~1.3k tokens
SKILL.md length
133 words
Files
1
Skills in repo
31
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Only the most important rules for writing basic Trigger.dev tasks

  • SKILL.md covers Basic Task, Schema Task (with validation), Scheduled Task and Triggering Tasks, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Trigger Basic is an agent skill from trycompai/comp. Only the most important rules for writing basic Trigger.dev tasks

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: AI Native platform to get companies compliant - Vanta & Drata Alternative. The licence is AGPL-3.0.

Example prompts

  • “/trigger-basic”

What it can do on your machine

Read from SKILL.md and the folder at commit 0117612. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Trigger Basic loads about 1.3k tokens when it runs. Until then it costs about 20 tokens; SKILL.md has 133 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~20
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from trycompai/comp at commit 0117612, republished under its AGPL-3.0 licence (© trycompai). 133 words, ~1,267 tokens.

Download SKILL.mdSave it as .claude/skills/trigger-basic/SKILL.md (or your agent's skills folder).
name
trigger-basic
description
Only the most important rules for writing basic Trigger.dev tasks

Source Cursor rule: .cursor/rules/trigger.basic.mdc. Original file scope: **/trigger/**/*.ts. Original Cursor alwaysApply: false.

Trigger.dev Basic Tasks (v4)

MUST use @trigger.dev/sdk (v4), NEVER client.defineJob

Basic Task

ts
import { task } from "@trigger.dev/sdk";

export const processData = task({
  id: "process-data",
  retry: {
    maxAttempts: 10,
    factor: 1.8,
    minTimeoutInMs: 500,
    maxTimeoutInMs: 30_000,
    randomize: false,
  },
  run: async (payload: { userId: string; data: any[] }) => {
    // Task logic - runs for long time, no timeouts
    console.log(`Processing ${payload.data.length} items for user ${payload.userId}`);
    return { processed: payload.data.length };
  },
});

Schema Task (with validation)

ts
import { schemaTask } from "@trigger.dev/sdk";
import { z } from "zod";

export const validatedTask = schemaTask({
  id: "validated-task",
  schema: z.object({
    name: z.string(),
    age: z.number(),
    email: z.string().email(),
  }),
  run: async (payload) => {
    // Payload is automatically validated and typed
    return { message: `Hello ${payload.name}, age ${payload.age}` };
  },
});

Scheduled Task

ts
import { schedules } from "@trigger.dev/sdk";

const dailyReport = schedules.task({
  id: "daily-report",
  cron: "0 9 * * *", // Daily at 9:00 AM UTC
  // or with timezone: cron: { pattern: "0 9 * * *", timezone: "America/New_York" },
  run: async (payload) => {
    console.log("Scheduled run at:", payload.timestamp);
    console.log("Last run was:", payload.lastTimestamp);
    console.log("Next 5 runs:", payload.upcoming);

    // Generate daily report logic
    return { reportGenerated: true, date: payload.timestamp };
  },
});

Triggering Tasks

From Backend Code
ts
import { tasks } from "@trigger.dev/sdk";
import type { processData } from "./trigger/tasks";

// Single trigger
const handle = await tasks.trigger<typeof processData>("process-data", {
  userId: "123",
  data: [{ id: 1 }, { id: 2 }],
});

// Batch trigger
const batchHandle = await tasks.batchTrigger<typeof processData>("process-data", [
  { payload: { userId: "123", data: [{ id: 1 }] } },
  { payload: { userId: "456", data: [{ id: 2 }] } },
]);
From Inside Tasks (with Result handling)
ts
export const parentTask = task({
  id: "parent-task",
  run: async (payload) => {
    // Trigger and continue
    const handle = await childTask.trigger({ data: "value" });

    // Trigger and wait - returns Result object, NOT task output
    const result = await childTask.triggerAndWait({ data: "value" });
    if (result.ok) {
      console.log("Task output:", result.output); // Actual task return value
    } else {
      console.error("Task failed:", result.error);
    }

    // Quick unwrap (throws on error)
    const output = await childTask.triggerAndWait({ data: "value" }).unwrap();

    // Batch trigger and wait
    const results = await childTask.batchTriggerAndWait([
      { payload: { data: "item1" } },
      { payload: { data: "item2" } },
    ]);

    for (const run of results) {
      if (run.ok) {
        console.log("Success:", run.output);
      } else {
        console.log("Failed:", run.error);
      }
    }
  },
});

export const childTask = task({
  id: "child-task",
  run: async (payload: { data: string }) => {
    return { processed: payload.data };
  },
});

Never wrap triggerAndWait or batchTriggerAndWait calls in a Promise.all or Promise.allSettled as this is not supported in Trigger.dev tasks.

Waits

ts
import { task, wait } from "@trigger.dev/sdk";

export const taskWithWaits = task({
  id: "task-with-waits",
  run: async (payload) => {
    console.log("Starting task");

    // Wait for specific duration
    await wait.for({ seconds: 30 });
    await wait.for({ minutes: 5 });
    await wait.for({ hours: 1 });
    await wait.for({ days: 1 });

    // Wait until a future date
    await wait.until({ date: new Date(Date.now() + 24 * 60 * 60 * 1000) });

    // Wait for token (from external system)
    await wait.forToken({
      token: "user-approval-token",
      timeoutInSeconds: 3600, // 1 hour timeout
    });

    console.log("All waits completed");
    return { status: "completed" };
  },
});

Never wrap wait calls in a Promise.all or Promise.allSettled as this is not supported in Trigger.dev tasks.

Key Points

  • Result vs Output: triggerAndWait() returns a Result object with ok, output, error properties - NOT the direct task output
  • Type safety: Use import type for task references when triggering from backend
  • Waits > 5 seconds: Automatically checkpointed, don't count toward compute usage

NEVER Use (v2 deprecated)

ts
// BREAKS APPLICATION
client.defineJob({
  id: "job-id",
  run: async (payload, io) => {
    /* ... */
  },
});

Use v4 SDK (@trigger.dev/sdk), check result.ok before accessing result.output

© trycompai, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/trigger-basic of trycompai/comp.

Open the folder on GitHubat commit 0117612

Compare with similar skills

Trigger Basic next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Trigger Basic compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Trigger Basic this skilltrycompai/comp2k—~1.3kAutomated safety check: PassAGPL-3.0
Importasgeirtj/system_prompts_leaks69k—~3.5kAutomated safety check: PassCC0-1.0
Nx Importnrwl/nx29k6 repos~3.5kAutomated safety check: PassMIT
Type Only Importsthedaviddias/Front-End-Checklist74k—~558Automated safety check: PassMIT
Import Memoryasgeirtj/system_prompts_leaks69k—~2.7kAutomated safety check: WarnCC0-1.0
Hermes Importsaffaan-m/ECC276k1 repos~752Automated safety check: PassMIT

Similar skills

  • Import

    asgeirtj/system_prompts_leaks

    Handle explicit /import requests for read-only transcript recovery and a resume checkpoint, or continue work from other coding agents and unnamed artifacts.

    69k GitHub stars~3.5k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Nx Import

    nrwl/nx

    Import, merge, or combine repositories into an Nx workspace using nx import.

    29k GitHub starsUsed in 6 repos~3.5k tokens
    DevelopmentAuto-check passed
  • Type Only Imports

    thedaviddias/Front-End-Checklist

    A skill your agent uses when auditing import statements in TypeScript files, setting up a new TypeScript project, or investigating unexpected bundle inclusions from type-only dependencies.

    74k GitHub stars~558 tokensUpdated 3 days ago
    Auto-check passed
  • Import Memory

    asgeirtj/system_prompts_leaks

    Import a memory export from another AI assistant into Claude's memory — conversationally, additively, and with the content treated as data.

    69k GitHub stars~2.7k tokensUpdated yesterday
    Auto-check: warnings
  • Hermes Imports

    affaan-m/ECC

    Convert local Hermes operator workflows into sanitized ECC skills and release-pack artifacts.

    276k GitHub starsUsed in 1 repo~752 tokens
    Auto-check passed
  • Hermes Imports

    affaan-m/ECC

    将本地 Hermes 操作员工作流转换为经过清理的 ECC 技能和发布包工件。在准备将 Hermes 工作流用于公共 ECC 重用而不泄露私有工作区状态、凭据或仅本地路径时使用。

    276k GitHub stars~324 tokensUpdated 4 days ago
    Auto-check passed

More from trycompai/comp

All 31 skills in this repo
  • API Endpoint Contract

    trycompai/comp

    The contract every new or modified API endpoint must follow so it is correct for the public OpenAPI spec, the MCP server (npm @trycompai/mcp-server), the ValidationPipe, and the docs.

    2k GitHub stars~2.7k tokensUpdated yesterday
    Auto-check passed
  • Check Results Service

    trycompai/comp

    How to reuse ANY integration check's results in a feature via the universal CheckResultsService (apps/api integration-platform).

    2k GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • Data

    trycompai/comp

    A skill your agent uses when implementing data fetching, API calls, server/client components, or SWR hooks

    2k GitHub stars~955 tokensUpdated yesterday
    Auto-check passed
  • A skill your agent uses when SDK generation failed or seeing errors.

    2k GitHub stars~938 tokensUpdated yesterday
    Auto-check passed
  • Forms

    trycompai/comp

    A skill your agent uses when building forms - covers React Hook Form, Zod validation, and form patterns

    2k GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • Code

    trycompai/comp

    A skill your agent uses when writing TypeScript/React code - covers type safety, component patterns, and file organization

    2k GitHub stars~909 tokensUpdated yesterday
    Auto-check: warnings

Questions about Trigger Basic

What does Trigger Basic do?

Only the most important rules for writing basic Trigger.dev tasks. Trigger Basic is an agent skill from trycompai/comp.

How do I install Trigger Basic in Claude Code?

Run `npx skills add trycompai/comp --skill trigger-basic -a claude-code`. Or copy the skill folder (.agents/skills/trigger-basic in trycompai/comp) into .claude/skills/trigger-basic in your project. Claude Code loads it when a task matches its description.

How do I install Trigger Basic in Codex?

Run `npx skills add trycompai/comp --skill trigger-basic -a codex`. Or copy the skill folder (.agents/skills/trigger-basic in trycompai/comp) into .agents/skills/trigger-basic in your project. Codex loads it when a task matches its description.

Can I use Trigger Basic in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add trycompai/comp --skill trigger-basic -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/trigger-basic, .gemini/skills/trigger-basic, .github/skills/trigger-basic and .opencode/skills/trigger-basic in your project.

What does Trigger Basic need to run?

SKILL.md names no scripts, command-line tools or credentials: Trigger Basic is instructions for the agent only.

Does Trigger Basic access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Trigger Basic safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Trigger Basic use?

Trigger Basic is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Trigger Basic use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Trigger Basic?

Skills that share tags, products or a category with Trigger Basic: Import (asgeirtj/system_prompts_leaks, 69k stars), Nx Import (nrwl/nx, 29k stars), Type Only Imports (thedaviddias/Front-End-Checklist, 74k stars) and Import Memory (asgeirtj/system_prompts_leaks, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Trigger Basic?

trycompai (a GitHub organization) maintains it in trycompai/comp, which has 2,023 GitHub stars. The repository holds 31 skills in this directory. The repository was last updated on October 7, 2026.

Source: trycompai/comp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.