AI Agents6 min readUpdated 2026-06-29
X/Twitter + n8n AI Prompt Library
Battle-tested AI prompts for classifying, drafting, and enriching X/Twitter records inside n8n.
Key takeaways
- Prompts are code.
- Structured outputs always.
- Cache aggressively.
- Version like software.
Prompts are code. Here's the versioned library we deploy for X/Twitter + n8n across classify, draft, enrich and summarize tasks.
Classify prompt
Structured-output schema, temperature 0, one-shot example, deterministic. Costs cents per 1k records.
Draft prompt
Role + brand voice + explicit constraints. Human-in-loop approval required.
Enrich prompt
Extract JSON matching the X/Twitter field schema. Reject anything that doesn't validate.
Summarize prompt
Bullet output, max length, focus areas explicit. Cache identical inputs.
Frequently asked questions
- Where do I store prompts?
- Postgres or Notion with version numbers.
- Testing?
- Golden dataset of 20-50 examples; diff on every prompt change.
- Models?
- GPT-4o-mini for scale, GPT-4o for quality-sensitive drafts.
- Guardrails?
- Schema validation + human approval for writes.