X Algorithmのロゴ

X Algorithm

コミュニティ
carson2222
x-algorithm

For Youアルゴリズムに評価されるX(Twitter)投稿を作成します。オープンソース化されたXのレコメンドシステム(GrokベースのTransformerランカー、Phoenix検索、Thunderのネットワーク内ストア、Groxのコンテンツ理解パイプライン)に基づいています。投稿、スレッド、返信、引用の作成、コンテンツ戦略の立案、既存の下書きのレビューや書き直し、投稿の反応が伸びなかった理由の分析、For Youのランキングの仕組みの理解をユーザーが求めたときに使用します。「ツイートを書いて」「Xの投稿」「twitterの投稿」「スレッド」「バズるツイート」「この投稿を改善して」「なぜ反応が悪かった?」「何を投稿すればいい?」「xのアルゴリズム」「おすすめフィード」「twitterのアルゴリズム」などの依頼が起動のきっかけになります。

Add to TypingMind

概要

公開者carson2222
リポジトリskills
スキル名x-algorithm
スター
112
フォーク
4
同梱ファイル
指示のみ
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    carson2222がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「X Algorithm」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/carson2222/skills/tree/main/x-algorithm
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/carson2222/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/x-algorithm .claude/skills/x-algorithm
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでX Algorithmを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にX Algorithmを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、X Algorithmは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

X Algorithm: Writing Posts That Get Ranked

A single source of truth for writing on X, derived directly from the open-sourced For You algorithm. No folklore, no growth-hack myths — only what the actual ranker, retrieval system, and content classifiers reward or punish.

How the Feed Actually Works

Every For You impression is the output of this pipeline:

Sources                Filters               Scoring                 Selection
─────────              ───────               ───────                 ─────────
Thunder (in-network)   age, vf, muted        Phoenix transformer     top-K by score
Phoenix (OON ANN)      blocks, dedupe        → P(19 actions)         author diversity
ads / wtf / prompts    seen/served           weighted sum            ads blender
                       subscription gate     OON multiplier

Two ways into a user's feed:

  1. Thunder (in-network) — they follow you. Sub-millisecond lookup. Always preferred.
  2. Phoenix retrieval (out-of-network) — a two-tower model embeds your post and the user's engagement history into the same space, then ANN-searches. You land here when your content lives in the topical neighborhood of posts the user recently engaged with.

Then Phoenix ranking (a Grok-based transformer) predicts probabilities for ~19 engagement actions per candidate, the Weighted Scorer combines them, Author Diversity decays repeated authors, OON Scorer down-weights out-of-network, and the top-K wins.

There are no hand-engineered relevance features anymore. The transformer learns from the user's UserActionSequence (their recent aggregated actions). That is the entire feature set.

The 19 Actions That Define Your Score

The ranker predicts a probability for each. Final score = Σ(weight × P(action)).

Positive signals (you want these)

ActionWhat it isWhy it matters
favoritelikeBaseline engagement.
replysomeone repliesStrong — replies have their own weight.
retweetrepostStrong distribution signal.
quotequote postAmplification + a separate quoted_click and quoted_vqv reward chain.
photo_expandtap to expand imageImage must be intriguing at thumbnail size.
clicktap a link/postHeadline/curiosity gap matters.
profile_clicktap your name/avatarYour identity made them curious.
vqv"video quality view"Only counted if video_duration_ms > MIN_VIDEO_DURATION_MS. No 2-second loops.
sharenative share menu
share_via_dmshared in DMIndependent signal — "I want my friend to see this".
share_via_copy_linkcopied linkSave-worthy content.
dwelldwelled at allBinary. The hook has to land.
cont_dwell_timecontinuous dwell durationLonger linger = more weight.
cont_click_dwell_timedwell after clicking into postReward for delivering on the click.
follow_authorviewer follows youOne of the strongest positive signals.

Negative signals (these subtract from your score)

ActionEffect
not_interestedManual "not interested" tap.
block_authorBlock.
mute_authorMute.
reportReport.
not_dwelledScroll-past with no dwell. Heavy penalty. Most posts die here.

The negative weights are real and subtractive — a post that gets scrolled past by many users actively pushes its own score down. "No engagement" is not neutral; not_dwelled is negative.

What This Means For How You Write

1. Optimize for diverse engagement, not just likes

The model weights 19 actions. A post that earns one reply and one share and one quote outperforms a post with three likes. Write things people want to reply to, quote, save, or DM.

2. The hook has to stop the scroll

Every scroll-past is a not_dwelled negative. The first visible line (and the thumbnail of any media) is the entire battle. If the user doesn't dwell, you don't just get zero — you go negative.

3. Longer is fine if it earns the dwell

cont_dwell_time is a continuous weight. A post people read for 12 seconds beats one read for 2. But that only works if the hook earns the read — pad-for-length kills you on not_dwelled.

4. Make it quotable, not just likeable

Quotes trigger quote_score + downstream quoted_click_score + quoted_vqv_score. A take that begs for "this, but also…" outperforms a self-contained one.

5. Convert viewers to followers

follow_author is heavily weighted. Every post should make the case for following you — clear identity, distinct voice, on-niche signal. Profile + pinned post matter because profile_click also scores.

6. Avoid anything that risks block / mute / report / not_interested

Rage-bait, slop, misleading hooks, engagement farming — these maximize short-term click but blow up not_interested/mute, which are weighted negatively. Net is often negative.

7. Video must be substantive

vqv only counts when video duration exceeds the minimum threshold. Sub-threshold loops literally cannot earn the video reward. There's also a quoted_vqv reward when your video is quoted — make videos that beg to be quoted.

8. Images: thumbnail-test everything

photo_expand is its own positive signal. The thumbnail has to make someone tap. Crops, faces, contrast, clear focal point.

9. Make content shareable, not just consumable

share, share_via_dm, share_via_copy_link are three independent rewards. Frameworks, lists, screenshots of useful info, before/after, "saved this for later" content — these all score.

What Will Quietly Kill Your Post

These run before scoring — if any fires for a viewer, your post is dropped from their candidate set entirely.

FilterTriggers whenImplication
AgeFilterPost older than thresholdTimeliness matters. Posts decay out of consideration.
MutedKeywordFilterYour text contains a user's muted keywordCommon words (e.g. "crypto", "AI", politics terms) lock you out of muted audiences.
AuthorSocialgraphFilterViewer blocked/muted youPermanent for that viewer.
VFFilter (visibility)Safety classifier marks DropSpam, violence, gore, PTOS violations → invisible everywhere.
IneligibleSubscriptionFilterPaywalled post, viewer not subscribedLocks paid content to subscribers only.
PreviouslySeenPostsFilterViewer already saw itOne impression per viewer.
PreviouslyServedPostsFilterAlready served this sessionSame.
RepostDeduplicationFilterMultiple reposts of same contentMass-repost manipulation collapses.
DedupConversationFilterMultiple branches of one threadOnly one branch shown.
SelfpostFilterYou're the viewerNever see your own.

Practical implications:

  • A "controversial topic hook" is also a "muted keyword" landmine. Calibrate.
  • One conversation, one branch — replying 10 times to your own thread doesn't multiply reach.
  • Mass-rebloging your own old content gets collapsed.

Content Understanding (Grox)

Beyond the ranker, a separate grox/ pipeline runs VLM-based classifiers on posts:

  • Banger initial screen — a vision-language model scores quality_score (0–1), threshold 0.4 for positive. Also emits slop_score and has_minor_score, plus taxonomy categories.
  • Post safety screen deluxe — VLM safety pass for PTOS policy.
  • Spam detection — aggressive on accounts <1K followers replying. If you reply-spam from a small account, the spam classifier flags you and the in_reply_user_follower_count bucket determines logging.
  • PTOS policy / safety_ptos_category — policy enforcement.
  • Multimodal post embedder (v2 / v5) — multimodal embeddings used downstream.

So a post is also being judged on visual + textual quality by an LLM. AI-generated slop is detected and scored against you. Posts with minors flagged. Topical categorization happens automatically — you don't pick the category, the classifier does.

Distribution Mechanics

In-network vs Out-of-network

Out-of-network candidates are multiplied by OON_WEIGHT_FACTOR (< 1.0) in OONScorer / RankingScorer. In-network always wins on equal scores. The single highest-leverage growth move on X remains: be followed by people in the audience you want to reach.

Two exceptions where OON penalty softens:

  1. Topic match — if the viewer follows topics that match the post, TopicOonWeightFactor replaces the regular OON factor (typically higher → easier OON reach).
  2. New users — eligible new users (account younger than a threshold AND following at least NEW_USER_MIN_FOLLOWING) get NEW_USER_OON_WEIGHT_FACTOR instead.

Implication: Topical, categorizable posts travel further OON than generic ones. The Phoenix two-tower retrieval needs a coherent neighborhood to embed your post into.

Mutual follow Jaccard (MinHash)

MutualFollowJaccardHydrator computes the Jaccard similarity between the viewer's follow graph and the author's follow graph via MinHash (≥256 hashes). Authors whose graph overlaps the viewer's get a stronger signal. Tribe matters. Posts from authors followed by accounts the viewer also follows have a structural advantage.

Author diversity decay

AuthorDiversityScorer ranks by score, then for each subsequent post by the same author, multiplies score by decay_factor^position + floor. Burst-posting collapses your own scores within one feed render. Space posts out. Five posts in five minutes is worse than five posts over a day.

Engagement caching window

EngagementCountsHydrator caches like/reply/repost/quote counts:

  • New tweets (<30 min old): 5-min TTL
  • Older: 10-min TTL

The first ~30 minutes set the trajectory the rest of the system rides on. Early engagement compounds. Post when your audience is online.

A Pre-Post Checklist

Before you publish, gate against this list:

  1. Hook in the first visible line — would a stranger stop scrolling? If not, rewrite. (not_dwelled is negative.)
  2. One specific, on-niche idea — needed for Phoenix retrieval to embed you in a useful neighborhood.
  3. Replyable / quotable — does it have a hook for a take or a "yes, but" — or is it self-contained and dead-end?
  4. Shareable — would someone DM this or copy the link?
  5. Image / video tested at thumbnail size — crop, focal point, contrast. Videos longer than the min-duration threshold.
  6. No muted-keyword landmines for the audience you're targeting.
  7. No slop / clickbait that risks not_interested, mute, report.
  8. Identity intact — would profile_click reward a clear "follow this account because…" payoff?
  9. Timing — is your audience awake? First 30 min decides the rest.
  10. Spacing — not stacked on top of your own recent posts.

Replies, Quotes, Threads

  • Replies from <1K-follower accounts are aggressively spam-screened. Quality over quantity. One thoughtful reply > ten "great post 🔥".
  • A separate reply-ranking model decides reply order on conversations. Same content rules apply at higher selectivity.
  • Quote posts are doubly valuable to you: they trigger the quote-side rewards (quote, quoted_click, quoted_vqv) for the quoted author. Quote good posts in your niche — it's a positive signal for them AND puts you in front of their audience.
  • Threads: only one branch of a conversation is shown per viewer (DedupConversationFilter). Posting a 10-reply self-thread doesn't multiply impressions of the same conversation. Lead post must stand alone.

When the User Asks "Why Did This Flop?"

Walk through, in order:

  1. Filter dropouts — too old? muted keyword? safety flag? subscription-gated?
  2. Hook / dwell — would a stranger stop on the first line? If not, every scroll-past pushed score down.
  3. OON viability — was it topical and embedable, or generic and floating?
  4. Author diversity — did you post 4 other times in the same window?
  5. Negative signals — did the framing invite mutes / not-interested?
  6. Visual quality — would the banger initial screen score this >0.4? Any AI-slop tells?
  7. In-network base — do you have followers in the audience that should care? OON is hard. The followers route is the moat.
  8. Timing — first 30 min set the curve. Was anyone online?

Anti-Patterns The Algorithm Punishes

  • Engagement-bait questions ("agree?", "RT if you agree") — they trigger not_interested from sophisticated users; net negative.
  • Reply-guy spam from small accounts — flagged by spam classifier.
  • Posting the same idea 5x in a day — author diversity decay + repost dedup.
  • 2-second meme loops as primary video format — sub-threshold for vqv.
  • Threaded mega-posts where the first tweet is just "🧵" — viewer never dwells past it.
  • AI-generated slop with no edit — banger screen's slop_score flags it.
  • Hostile / dunking content — short-term click, long-term mute/block/report.

What's NOT In The Algorithm (Despite Folklore)

  • No link penalty as a hard rule. Links are scored via click_score and cont_click_dwell_time — if people click and dwell, you're rewarded.
  • No follower-count multiplier. The transformer doesn't see your follower count as a feature. Reach is driven by predicted engagement, mutual-follow Jaccard, in-network membership, and topic match.
  • No "post X times per day" rule. Author diversity decays within a single feed render, not across days.
  • No "best time to post" hardcoded. The 30-min engagement-cache window is real, but "when" depends entirely on when your specific audience is online.

How To Use This Skill

When the user asks you to write or improve a post:

  1. Ask (or infer) the goal: reach, replies, follows, shares, clicks.
  2. Ask (or infer) the audience: who follows them, what topic neighborhood?
  3. Draft against the pre-post checklist, optimizing for the goal's primary action.
  4. Call out specific algorithmic risks in the draft (muted keywords, hook strength, length-for-dwell trade-off, OON viability).
  5. If reviewing existing copy, run the "why did this flop" sequence.
  6. Never recommend tactics that look like engagement farming — net-negative on not_interested / mute.

Be direct. Cite the mechanism (e.g., "not_dwelled is weighted negative — your first line has to stop the scroll") so the user learns the why, not just the what.

よくある質問

AIスキル「X Algorithm」では何ができますか?

For Youアルゴリズムに評価されるX(Twitter)投稿を作成します。オープンソース化されたXのレコメンドシステム(GrokベースのTransformerランカー、Phoenix検索、Thunderのネットワーク内ストア、Groxのコンテンツ理解パイプライン)に基づいています。投稿、スレッド、返信、引用の作成、コンテンツ戦略の立案、既存の下書きのレビューや書き直し、投稿の反応が伸びなかった理由の分析、For Youのランキングの仕組みの理解をユーザーが求めたときに使用します。「ツイートを書いて」「Xの投稿」「twitterの投稿」「スレッド」「バズるツイート」「この投稿を改善して」「なぜ反応が悪かった?」「何を投稿すればいい?」「xのアルゴリズム」「おすすめフィード」「twitterのアルゴリズム」などの依頼が起動のきっかけになります。

TypingMindでX Algorithmを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。X Algorithmはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにX Algorithmをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/carson2222/skills/tree/main/x-algorithmを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

X Algorithmを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

X Algorithmで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもX Algorithmを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「X Algorithm」は無料ですか?

はい。carson2222がApache-2.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇