x

x is a command for coding agents from kanaerulabs/growth-kit. It costs 12 tokens per session (4,491 once invoked), scanned A, original, MIT.

A command that turns an article, document, URL, PDF, or plain text into a ready-to-copy thread for X, the social network formerly called Twitter.

In plain words
What is it for?
Reading supported content sources, extracting their main information, and generating an X thread in a chosen language.
Why use it?
It removes the need to manually reshape longer content into a sequence of short posts.

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/kanaerulabs/growth-kit/x
Clone the repo
git clone --depth 1 https://github.com/kanaerulabs/growth-kit

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 x

README.md
[![agentmods](https://agentmods.dev/badge/commands/kanaerulabs/growth-kit/x.svg)](https://agentmods.dev/commands/kanaerulabs/growth-kit/x)
Your own site
<a href="https://agentmods.dev/commands/kanaerulabs/growth-kit/x"><img src="https://agentmods.dev/badge/commands/kanaerulabs/growth-kit/x.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 4,491 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.04491
Opus 5 $0.00006 $0.02246
Sonnet 5 $0.00002 $0.00898
Haiku 4.5 $0.00001 $0.00449

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

Security

Grade A, and why

x 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 5d 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.

publisher-plugin/commands/x.md · 554 lines

How it starts

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

Generate a copy-pastable X thread from any content source - blog posts, articles, PDFs, URLs, or plain text.

Usage: $ARGUMENTS

Process:

  1. Parse Input Arguments

    • Extract content input and optional language parameter
    • Examples:
      • 2025-10-06-my-post (slug only, default English)
      • 2025-10-06-my-post ja (slug with Japanese)
      • path/to/article.md (file path)
      • https://myblog.com/post (URL)
      • docs/whitepaper.pdf en (PDF with language)
  2. Universal Input Detection

    If input looks like a file path (contains / or file extension):

    • Use Read tool to check if file exists
    • Detect format by extension:
      • .md / .mdx → Parse markdown with frontmatter (extract title, description, body, metadata)
      • .pdf → Inform user PDF parsing is limited, suggest converting to markdown first
      • .docx → Inform user DOCX parsing is limited, suggest converting to markdown first
      • .html → Read and extract main content, strip HTML tags
      • .txt → Read as plain text
      • .json → Parse JSON and extract relevant fields
    • Extract: title, description, body content, metadata

    If input looks like a URL (starts with http:// or https://):

    • Use WebFetch tool to retrieve the page
    • Prompt: "Extract the main article content, title, and description from this page"
    • Parse and clean the text

    If input is a slug (no / and no protocol):

    • Search codebase using Glob: **/*${input}*.md
    • Common patterns to check:
      • src/content/blog/posts/{en,ja}/*${input}*.md
      • content/blog/*${input}*.md
      • posts/*${input}*.md
      • blog/*${input}*.md
    • If language specified, prioritize matching language folder
    • Use Read tool to parse markdown file with frontmatter
  3. Determine Language (default: English):

    • If user explicitly specifies "ja" → Japanese
    • If user explicitly specifies "en" → English
    • If file path contains /ja/ → Japanese
    • If content appears to be in Japanese → Japanese
    • Otherwise → English
  4. Generate THREE versions in the target language:

    Version 1: Thread (5-8 posts)

    • For English: Follow Kanaeru Labs' X voice (see guidelines below)
    • For Japanese: Use professional yet accessible Japanese tone
    • Break into digestible posts (max 280 chars each)

    Version 2: Single Long (Premium)

    • Structured format with clear sections
    • For Japanese: Use 【brackets】: 【とは】【誰のため】【主な特徴】【次にすべきこと】
    • For English: Use headers: What it is: Who it's for: Key features: What to do next:

    Version 3: Single Short (~280 chars)

    • Concise announcement
    • 2-3 key benefits with emojis
    • Links and hashtags
  5. Generate all three versions directly using Claude's built-in capabilities:

    • Read the blog content using Read tool
    • Extract key insights and stats from the content
    • Create all 3 versions following the guidelines below
    • Validate character counts
    • PURE CLAUDE - NO external scripts, NO npm, NO dependencies
    • APPLY HUMANIZATION (see Humanization Guidelines below)
  6. Display all versions to the user in terminal:

    • Show thread posts with character counts
    • Show single long version
    • Show single short version
    • Format for easy copy-pasting
  7. Create tri-format HTML preview file using Write tool:

    • IMPORTANT: Check if file exists first: ls -la x-thread-[LANG].html 2>&1
    • If file exists, use Read tool first (even just 1 line): Read('x-thread-[LANG].html', limit=1)
    • Then use Write tool to create/update: x-thread-[LANG].html in user's current directory
    • Include THREE tabs with tab switcher UI:
      • Tab 1: Thread - 5-8 posts with individual "Copy Post" buttons
      • Tab 2: Single Long - Structured format with sections, one "Copy" button
      • Tab 3: Single Short - Concise version (~280 chars), one "Copy" button
    • Use X branding (black theme)
    • Tab switcher at top for easy navigation
    • Use Bash tool to open: open x-thread-[LANG].html && open https://x.com/compose/post
    • Works in ANY repo type (Python, Rust, Go, etc.)

Read the full file on GitHub · 554 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. 5d ago First seen · 554 lines · 12 tokens per session scan A cc161c6115c7

Subscribe to this mod's changes

x is a command published in the GitHub repository kanaerulabs/growth-kit (15 stars, last pushed 7mo ago), licensed MIT. It adds 12 tokens to every session and 4,491 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.