graduate-to-trigger
Skill70 starsChanged 2 months agoMITView on GitHub
Graduate a research process (processes/find-*.md) into a production trigger.dev scheduled task. Use when user decides a monitoring process is ready for automated daily/weekly execution. Handles config generation, task scaffolding, deploy, and validation.
- Reads credentials
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- research-agentSkill
- research-process-builderSkill
- trigger-agentsSkill
- trigger-configSkill
- trigger-cost-savingsSkill
- trigger-realtimeSkill
- trigger-setupSkill
- trigger-tasksSkill
- research-process-builderSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Before graduating, the process spec should have:
- Distinctive: line 31
If any are missing, help the user fill them in first.
- Very specific: line 43
Read processes/find-{name}.md and extract:
- Very specific: line 56
Create a round config in trigger/src/pipeline/round-configs.ts or a new config file if the process doesn't fit the funding round pattern.
- Very specific: line 59
Add to existing round-configs.ts
- Very specific: line 60
Follow SERIES_A_CONFIG structure exactly
- Distinctive: line 106
Check logs for expected output
- Distinctive: line 107
If validation script exists, run against GT
- Very specific: line 133
Ensure these are set in trigger.dev cloud (npx trigger.dev env):
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Graduate to Trigger.dev
Take a validated research process from processes/find-*.md and deploy it as a trigger.dev scheduled task.
When to Use
- User explicitly says "graduate this" or "make this run automatically" or "deploy to trigger.dev"
- Process is a monitoring type (date-in → results-out, runs on schedule)
- Process has validated queries with known hit rates
When NOT to Use
- Lookup processes (company-in → data-out) — these are L3a agents, not trigger.dev tasks
- Process has < 5 ground truth results — stay at L1, keep testing
- Process runs < 1x/week — not worth the infra
- User hasn't decided to graduate yet — graduation decision belongs to user
Prerequisites
Before graduating, the process spec should have:
- Validated search queries with GT hit rates
- Defined output schema (what fields the webhook/Supabase needs)
- Cost per run estimated
- Schedule defined (daily, weekly, etc.)
If any are missing, help the user fill them in first.
Required Skills
Load these trigger.dev skills as needed during graduation:
trigger-tasks— task definition patterns, cron, retries, queuestrigger-config— trigger.config.ts setup, env vars, build configtrigger-cost-savings— optimize for cost after initial deploytrigger-setup— if this is first trigger.dev task in a new repo
Phase 1: Read Process Spec
Read processes/find-{name}.md and extract:
QUERIES → SerperDev query definitions (id, query string, num results)
FILTER_RULES → Round/noise patterns, exclusion regexes
OUTPUT_SCHEMA → Fields the webhook/Supabase expects
SCHEDULE → Cron pattern (default: "0 7 * * *" = daily 7am ET)
ROUND_LABEL → Display name (e.g. "Series A", "Competitor News")
TABLE_NAME → Supabase table (default: "funding_discoveries")Phase 2: Generate Config
Create a round config in trigger/src/pipeline/round-configs.ts or a new config file if the process doesn't fit the funding round pattern.
For funding rounds (Series A/B/C pattern):
- Add to existing
round-configs.ts - Follow SERIES_A_CONFIG structure exactly
For non-funding processes (news, competitors, growth signals):
- Create
trigger/src/configs/{process-name}.ts - Define process-specific types if output schema differs from EnrichedRecord
Phase 3: Generate Task Files
Scaffold from existing templates:
trigger/src/{process-name}-daily.ts → schedules.task, cron pattern, daily
trigger/src/{process-name}-weekly.ts → schedules.task, qdr:w catch-upTemplate pattern (copy from series-a-daily.ts):
import { schedules, logger } from "@trigger.dev/sdk";
import { runFundingPipeline } from "./pipeline/pipeline.js";
import { PROCESS_CONFIG } from "./pipeline/round-configs.js";
export const processDaily = schedules.task({
id: "{process-name}-daily",
cron: { pattern: "CRON_HERE", timezone: "America/New_York" },
retry: { maxAttempts: 3, factor: 2, minTimeoutInMs: 10_000, maxTimeoutInMs: 120_000, randomize: true },
run: async (payload) => {
const date = payload.timestamp.toISOString().split("T")[0];
const result = await runFundingPipeline({
roundConfig: PROCESS_CONFIG,
pipelineId: "{process_name}_daily",
tbs: "qdr:d",
date,
skipEnrich: false,
maxEnrich: 20,
dryRun: false,
});
return { date: result.date, companyCount: result.companyCount, durationMs: result.stats.durationMs, stats: result.stats };
},
});Phase 4: Validate & Deploy
npx tsc --noEmit— typechecknpx trigger.dev@latest deploy— deploy- Trigger test run from dashboard (empty payload)
- Check logs for expected output
- If validation script exists, run against GT
Shared Pipeline Infrastructure
These modules are shared across ALL graduated processes — don't duplicate:
| Module | What it does | Modify? |
pipeline.ts | 4-stage orchestrator (discover→filter→enrich→output) | No |
filters.ts | Score, filter, fuzzy dedup | Add process-specific patterns only |
spider.ts | Scrape with retry (20s→45s→direct) | No |
openai.ts | GPT-4o-mini extraction | No |
domain-lookup.ts | 3-tier domain resolution | No |
serper.ts | SerperDev search | No |
supabase.ts | Upsert with score-wins | No |
webhook.ts | Clay webhook push | No |
Process-Specific Parts (the only custom code)
- Queries — different search strings per process
- Filter patterns — different round/noise regexes
- Extraction prompt — different fields to pull from articles
- Output schema — different columns (if not funding)
Env Vars
Ensure these are set in trigger.dev cloud (npx trigger.dev env):
SERPER_API_KEY— searchSPIDER_API_KEY— scrapingOPENAI_API_KEY— extractionSUPABASE_PROJECT_URL— storageSUPABASE_ANON_KEYorSUPABASE_KEY— auth- Process-specific webhook URLs:
CLAY_WEBHOOK_URL_{PROCESS},CLAY_WEBHOOK_AUTH_{PROCESS}
Cost Reference
| Service | Unit Cost |
| Serper | $0.0075/search |
| Spider | ~$0.001/page |
| OpenAI gpt-4o-mini | ~$0.15/1M in (cached prompts cheaper) |
| Trigger.dev | Free tier: 500 runs/mo |
| Supabase | Free tier |
Typical daily monitoring run: ~$0.30/run × 30 days = ~$9/mo per process.
Graduation Checklist (for handoff)
After deploying, confirm:
- Task appears in trigger.dev dashboard
- Cron schedule is correct
- Test run completes without errors
- Data appears in Supabase
- Webhook fires to Clay (if configured)
- dryRun flag works (no output when true)
- Weekly catch-up task also deployed
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

