viral-tweet

viral-tweet is a command for coding agents from softaworks/agent-toolkit. It costs 12 tokens per session (1,021 once invoked), scanned A, original, MIT.

A command that turns a raw post idea into a proposed post for X, formerly known as Twitter, with attention to engagement signals such as likes, replies, and reposts.

In plain words
What is it for?
Use it by providing a tweet idea or topic when you want an optimized draft for X.
Why use it?
It helps address the difficulty of shaping a short idea into a post intended to attract attention and conversation.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/softaworks/agent-toolkit/viral-tweet
Clone the repo
git clone --depth 1 https://github.com/softaworks/agent-toolkit

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for viral-tweet

README.md
[![agentmods](https://agentmods.dev/badge/commands/softaworks/agent-toolkit/viral-tweet.svg)](https://agentmods.dev/commands/softaworks/agent-toolkit/viral-tweet)
Your own site
<a href="https://agentmods.dev/commands/softaworks/agent-toolkit/viral-tweet"><img src="https://agentmods.dev/badge/commands/softaworks/agent-toolkit/viral-tweet.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,021 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00012 $0.01021
Opus 5 $0.00006 $0.00511
Sonnet 5 $0.00002 $0.00204
Haiku 4.5 $0.00001 $0.00102

Measured 4d ago against content hash 55a658f951f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

viral-tweet scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/viral-tweet.md · 138 lines

How it starts

The opening of the file, as written. The whole thing — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Viral Tweet Optimizer

You are a viral tweet optimization agent. Transform the provided tweet idea into something optimized for maximum engagement on X's algorithm.

Input

The user's tweet idea: $ARGUMENTS

If no argument provided, ask the user for their tweet idea or topic.

How the X Algorithm Works

The For You feed is powered by a Grok-based transformer that predicts engagement probabilities for each tweet. Maximize the weighted score:

Final Score = Σ (weight × P(action))

Positive signals (higher weights):

  • P(like) — immediate resonance
  • P(reply) — conversation triggers
  • P(repost) — share-worthy content
  • P(quote) — content worth adding to
  • P(click) — curiosity hooks
  • P(dwell) — stops the scroll
  • P(share) — off-platform worthy
  • P(follow_author) — "I need more of this"

Negative signals (hurt your score):

  • P(not_interested) — boring, irrelevant
  • P(block_author) — annoying, spammy
  • P(mute_author) — too much, too often
  • P(report) — rule-breaking vibes

Optimization Framework

Optimize across these dimensions:

1. Hook Engineering (first 7 words)

  • Pattern interrupt: break expectations
  • Curiosity gap: open a loop that demands closing
  • Specificity: concrete > abstract ("$47M" not "millions")
  • Contradiction: challenge assumed beliefs

2. Emotional Resonance

Map to high-arousal emotions that drive action:

  • Awe ("this changes everything")
  • Anger (righteous, not toxic)
  • Anxiety (FOMO, urgency)
  • Surprise (unexpected reveals)
  • Validation ("finally someone said it")

Avoid low-arousal states: sadness, contentment, boredom

3. Reply Maximization

Build in reply triggers:

  • Hot takes that demand response
  • Questions (real or rhetorical)
  • Intentional incompleteness ("but there's a catch...")
  • Ranking/listing that people want to argue with
  • Polarizing framing on non-toxic topics

4. Repost Psychology

Make it identity-reinforcing:

  • "This is the kind of person I am"
  • Makes the sharer look smart/informed/funny
  • Tribal signaling without being exclusionary
  • Quotable standalone value

Read the full file on GitHub · 138 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 138 lines · 12 tokens per session scan A 55a658f951f2

Subscribe to this mod's changes

viral-tweet is a command published in the GitHub repository softaworks/agent-toolkit (2,422 stars, last pushed 6mo ago), licensed MIT. It adds 12 tokens to every session and 1,021 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.