本文へ移動
cccskills
無料GitHub で公開日本語紹介

X

Xの投稿やスレッド、記事の公開、検索、ブックマーク取得、プロフィール確認、ポストの閲覧を、X APIとxurl CLIを通じて行うスキルです。

原文原文の説明を見る

Runs all X (Twitter) operations via X API v2 and the xurl CLI: post tweets and threads with media, publish X Articles, search, fetch bookmarks, sweep new bookmarks into idea-issues with LifeOS Upgrade analysis, look up profiles, read tweets. USE WHEN post to X, tweet, post thread, search X, search Twitter, X bookmarks, fetch bookmarks, pull bookmarks, check bookmarks, twitter bookmarks, what have I bookmarked, bookmarks for upgrades, tb, bookmark sweep, bookmark ideas, read tweet, X article, X profile, Twitter profile, lookup user, who is on X, authorize X. NOT FOR posting the same content to several platforms at once, writing social copy, Instagram/LinkedIn/TikTok data (Apify within each platform’s terms), bulk reads beyond what the X API plan allows (use your own exported data or a data product X licenses).

danielmiessler/LifeOSスター 19,635(GitHub 19,635 + cccskills 0)

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • Xにポストやスレッドを投稿したいとき
  • 話題やアカウントをX上で検索したいとき
  • ブックマークを取得して整理したいとき
  • Xのプロフィールや投稿を確認したいとき

日本語での紹介

できること

X API v2とxurl CLIを通じて、X上の投稿を読む・検索する、プロフィールを調べる、ブックマークを取得するといった操作を行います。単独のポストやスレッド、画像・動画などのメディアを含む投稿を作成でき、長文のX Articlesも下書きまたは公開できます。新しいブックマークを確認し、アイデア候補として課題にまとめる処理もあります。投稿や記事を公開した後は、読み戻して結果を確認します。

こんなときに便利

Xへの投稿やスレッド作成を頼みたいとき、特定の話題やアカウントの投稿を探したいときに使えます。保存したブックマークの確認や、気になるアカウントのプロフィール確認にも向いています。X上の操作をまとめて扱うため、各機能で認証情報を個別に設定する必要を減らせます。

使い方の例

  • 「この内容をXに投稿して」
  • 「最近のブックマークを20件見せて」
  • 「このXの投稿を読んで、内容を確認して」

注意点

利用にはX APIの認証設定が必要です。投稿や記事の公開は実際のアカウントに反映され、操作前に本人の確認を求めます。APIの利用枠を超える大量取得や、Instagram・LinkedIn・TikTokの操作には対応しません。X ArticlesはAPIから公開後に編集・削除できず、公開は取り消せない操作です。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

資料チェック

SKILL.md の記述から、注意が要る操作と導入の前提を AI が確認しました。点数は実際に動かした結果(実行検証)だけで付けています。

安全面送信・削除・コマンド実行などの扱いが明示されているか
A良好公開前の本人確認と、記事公開後に編集・削除できない点が明記されています。
導入のしやすさ必要なツールや API キーが少ないか、書かれているか
B一部不足Setup.mdと必要な認証情報名は示されていますが、導入手順全体は提示範囲にありません。

点数には入れていません。 2026年10月28日 時点で AI(OpenAI Codex)が判定しました。目安なので、入れる前に原文も確認してください。

評価が違うと思ったら、見直しを依頼する

どの項目が、なぜ違うと思うかを書いてください。ログインは不要です。内容を SKILL.md と照らし合わせて評価を作り直し、この欄に反映します。

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

含まれるファイル(19)

  • SKILL.md12.8 KB
  • Intents/Bookmarks.md2.1 KB
  • Intents/Post.md3.7 KB
  • Intents/Profile.md827 B
  • Intents/PullBookmarks.md12.2 KB
  • Intents/Read.md1.7 KB
  • Intents/Search.md1.4 KB
  • Setup.md8.0 KB
  • Tools/article.ts28.3 KB
  • Tools/bookmark-issue.ts15.6 KB
  • Tools/bookmarks.ts12.7 KB
  • Tools/delete.ts1.8 KB
  • Tools/media.ts9.0 KB
  • Tools/post.ts12.4 KB
  • Tools/profile.ts2.6 KB
  • Tools/read.ts3.7 KB
  • Tools/search.ts2.8 KB
  • Tools/TwitterText.ts3.0 KB
  • Tools/x-client.ts25.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

X — Unified X (Twitter) API

Contents: Ideal State · Intent Routing · Tools Reference · CLI: xurl · Data & Config · Gotchas · Examples

Handles every X (Twitter) operation through the X API v2 (direct fetch()) and the xurl CLI: post single tweets, threads and media, publish long-form Articles, search recent tweets, fetch bookmarks, look up user profiles, and read tweets by ID or URL. Other skills delegate their X work here, so the credentials, the auth handling and the OAuth 2.0 token store live in one place; if each skill wired up its own, the secrets would sprawl and the refresh chain would break.

Not for posting the same content to several platforms (Broadcast), writing social copy (a copywriting skill), or bulk collection beyond what the X API allows. X reads use the official API or the principal’s own exported data; when X refuses a read, the intent stops and reports it.

Ideal State

  • Every X operation runs through this skill's tools or xurl on the auth mode it needs, and every X read goes through Tools/read.ts, never a web fetch or browser.
  • Nothing reaches the account (a tweet, thread, media post or published Article) without the principal's confirmation, and a post is reported done only after reading it back.
  • Posted text and URLs go out exactly as given, measured by X's weighted count; over-limit text is rejected, never cut.
  • The OAuth 2.0 grant survives every run: one refresher per grant, and a missing scope or revoked grant ends in a surfaced re-authorization URL, never a guess.

Intent Routing

IntentTriggerFile
Post"post to X", "tweet", "post tweet", "send tweet", "thread"Intents/Post.md
Search"search X", "search twitter", "find tweets"Intents/Search.md
Bookmarks"X bookmarks", "fetch bookmarks", "re-authorize bookmarks", "authorize X", "bookmark token expired"Intents/Bookmarks.md
PullBookmarks"pull bookmarks", "check bookmarks", "bookmark sweep", "bookmarks for upgrades", "tb", "quick bookmark check"Intents/PullBookmarks.md
Profile"X profile", "twitter profile", "lookup user", "who is @user"Intents/Profile.md
Read"read tweet", "get tweet", "fetch tweet"Intents/Read.md
Article"X article", "Twitter article", "long-form on X", "publish an article to X"Tools/article.ts: create --file piece.md drafts (the default), --publish publishes, then read the post back with Tools/read.ts. Publishing is irreversible through the API.
FileRead when
Setup.mdfirst-time setup: the token-store Config.md, the X app and its secrets, and the first-run proof

Tools Reference

All tools are in ~/.claude/skills/X/Tools/ and run with bun. Each intent carries the command for its own tool (post.ts, search.ts, profile.ts, read.ts, bookmarks.ts, and bookmark-issue.ts for the sweep's check, create, skip and audit); this table holds only the tools no intent owns. Which auth mode each path uses is in Gotchas.

ToolPurposeUsage
x-client.tsCredential loader, token store, auth helpersImported by the other tools
media.tsChunked media upload (video/image/GIF)bun run media.ts upload clip.mp4
article.tsLong-form X Articles: markdown to content_state, draft, publishbun run article.ts create --file piece.md --publish
delete.tsDelete tweets by idbun run delete.ts <id> [<id> ...]
send gate, video PII gateWhat stops a post and how each block is reportedPost intent § Tool contract (Intents/Post.md)

CLI: xurl

xurl is the official X CLI. Use for quick API calls not covered by tools:

# Quick lookups
xurl /2/users/me
xurl /2/tweets/1234567890

# Search
xurl "/2/tweets/search/recent?query=from:<username>&max_results=10"

# Post (use Tools/post.ts instead for threads)
xurl -X POST /2/tweets -d '{"text":"Hello"}'

Data & Config

Config: LIFEOS/USER/CUSTOMIZATIONS/SKILLS/X/Config.md (a fenced yaml block choosing the OAuth 2.0 token store: local, a 0600 file on this machine that x-client.ts refreshes, or cloudflare-kv, a KV namespace that another process such as a scheduled Worker refreshes). Setup, field table and first-run proof: Setup.md. Without it, reads still work on the bearer token, posting falls back to OAuth 1.0a text-only, and every OAuth 2.0 path (media, Articles, bookmarks, delete) stops with an error naming Setup.md.

The bookmark sweep (PullBookmarks) reads three more things from the same directory and the work-tracking config: the bookmark_sweep mapping in that yaml block (issue labels, property label prefix), PREFERENCES.md (relevance profile and what counts as an idea), and the repo for idea-issues (bookmark_sweep.repo, default the repo in LIFEOS/USER/WORK/work_repo.json). Its state lives outside the skill tree in LIFEOS/MEMORY/STATE/X/ (bookmarks-state.json, bookmark-issues.json). The caller outside the skill is Pulse's Synapse module, which reads bookmark-issues.json; the former scheduled sweep that shelled out to Tools/bookmark-issue.ts is retired.

Secrets, all from ~/.claude/.env, loaded by Tools/x-client.ts and never hardcoded (names only):

VarPurpose
TWITTER_CLIENT_IDOAuth 2.0 client ID (authorize + local refresh)
TWITTER_CLIENT_SECRETOAuth 2.0 client secret
X_BEARER_TOKENApp-only bearer token (reads)
TWITTER_API_KEY, TWITTER_API_KEY_SECRET, X_ACCESS_TOKEN, X_ACCESS_TOKEN_SECRETOptional OAuth 1.0a text-only posting fallback
CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN, X_TOKENS_KV_NAMESPACEOnly for token_store: cloudflare-kv

Gotchas

  • A published X Article cannot be deleted or edited through the API. X documents POST /2/articles/draft and POST /2/articles/{id}/publish and nothing else — no GET, no PATCH, no DELETE. Drafts are free to create and invisible until published, so iterate on drafts and treat --publish as one-way. article.ts defaults to draft-only for exactly this reason. The X web UI does offer Edit and Delete on a published Article, so a bad publish is recoverable by hand in the browser, not in code.
  • Article content_state is DraftJS in snake_case, not the camelCase DraftJS raw state every online example shows: inline_style_ranges, entity_ranges, and a flat entities array of {key, value} rather than an entityMap object. Offsets index the stripped text (markers removed). Images, embedded posts, code and dividers are atomic blocks whose single-space text is covered entirely by one entity range — a zero-length atomic block is rejected.
  • X's 280-character limit is weighted, not JavaScript text.length. HTTP(S) URLs count as exactly 23 characters and emoji/Unicode follow X weighting in Tools/TwitterText.ts. Tools/post.ts sends the exact caller input or rejects it (Post intent).
  • read.ts returns article and long-tweet text in one call. It requests tweet.fields=article,note_tweet, while X answers WebFetch with 402 and automation browsers are usually logged out, so any other route first only burns time.
  • One refresh chain per grant, ever. X rotates the refresh token on every refresh and treats reuse of a consumed one as theft, revoking the whole grant until a human re-authorizes. With token_store: local, x-client.ts is the only refresher: refreshes run behind <token_file>.lock, waiters re-read the file instead of replaying a consumed token, and writes are tmp+rename. With cloudflare-kv, the external owner refreshes and this client never does. Never call the token endpoint directly with a stored refresh token — always go through getValidTokens() — and never point two installs' local stores at the same grant.
  • Three auth modes, not one. Posting, media, Articles and delete = OAuth 2.0 user context (OAuth 1.0a text-only fallback when no OAuth 2.0 store is configured), reads (search, profiles, tweets) = app-only bearer token, bookmarks = OAuth 2.0 PKCE. A 401 on one path says nothing about the other two.
  • Prefer the OAuth 2.0 store for posting. OAuth 1.0a portal keys can be revoked or regenerated without notice and then 401 on every post; post.ts uses the OAuth 2.0 store whenever one is configured and falls back to OAuth 1.0a only without one. If posting 403s, read the body first: type: …/spend-cap-reached means the account's Billing Cycle Cap in the X developer console is hit (every endpoint 403s until the cap is raised or the cycle resets). Otherwise the grant lacks tweet.write: re-run bookmarks.ts authorize. The consent click is a human's, so surface the URL; if the app grant is still active on the account, authorize completes with no click.
  • Media upload needs its own scope: media.write. Without it POST /2/media/upload returns a bare 403 while /2/tweets keeps working, which reads as "video posting is broken" rather than "the grant is short a scope". SCOPES in bookmarks.ts carries it; a grant authorized without it must be re-authorized once.
  • The v2 media endpoints are sub-paths, not command= parameters, and X's own chunked-upload doc still describes the retired v1.1 shape. The working contract is: POST /2/media/upload/initialize (JSON body: media_type, total_bytes, media_category) → POST /2/media/upload/{id}/append (multipart: segment_index, media, segments ≤5MB) → POST /2/media/upload/{id}/finalize. Sending command=INIT to the base path returns 400 "Missing media field in JSON" — the parameter is ignored and the call is read as a simple upload, so the error names the wrong problem. Images ≤5MB skip all of it: one multipart POST /2/media/upload with a media field.
  • Status is the one call that still speaks the old dialect: GET /2/media/upload?media_id=<id>&command=STATUS. It rejects media_ids (the plural that every other v2 endpoint takes) and has no sub-path form. Video/GIF process asynchronously — poll to succeeded before attaching, because an unprocessed media_id publishes a tweet with no video and no error. All of this is encoded in Tools/media.ts.

Examples

Example 1: Read a tweet link

User: "read this: https://x.com/<user>/status/<id>"
→ bun run Tools/read.ts <url> (immediately — no browser attempts)
→ Returns the tweet, plus the full article plain_text when the post carries an X Article

read.ts takes a status URL or a numeric tweet ID. A bare x.com/i/article/<id> link is an article ID, not a tweet ID, and the API has no read-by-article-ID call; use the status URL of the post that carries the article.

Example 2: Fetch recent bookmarks

User: "show my last 20 X bookmarks"
→ Bookmarks intent: bun run Tools/bookmarks.ts fetch 20
→ Author, text and links per bookmark

Example 3: Bookmark sweep

User: "tb"  (or "just check bookmarks" for quick mode: last 30, MEDIUM skipped)
→ PullBookmarks intent: fetch 50 --json, filter seenIds
→ each new bookmark created-or-skipped inline via bookmark-issue.ts, audit passes, Upgrade report with prior-work tags

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

AnnualReports

無料概要あり

複数ベンダーの年次サイバーセキュリティ報告書を探して取得し、脅威やランサムウェア、侵害統計の傾向を出典付きで比較・分析します。

  • 脅威レポートをカテゴリ別に探したいとき
  • 特定ベンダーの報告書を取得したいとき
  • ランサムウェア動向を複数社で比較したいとき
danielmiessler/LifeOS2万2026年10月28日 更新

ApertureOscillation

無料概要あり

個別の機能や部品の設計と、システム全体の目的を同じ問いで比較し、両者の食い違い、適切な実装範囲、全体との整合性を3段階で整理するスキルです。

  • サービスやライブラリの分割判断
  • 機能要求と製品方針を比較したいとき
  • 新しい部品と既存システムの整合性確認
danielmiessler/LifeOS2万2026年10月28日 更新

Aphorisms

無料概要あり

文章のテーマに合う格言や引用を探し、著者・出典と選定理由を添えて提案します。引用の追加、思想家の調査、利用履歴の管理を通じて、同じ引用の繰り返しも防ぎます。

  • ニュースレター向けの引用探し
  • 出典付きの引用を重複なく保存
  • 思想家の言葉をテーマ別に調査
danielmiessler/LifeOS2万2026年10月28日 更新

Art

無料概要あり

ブログの挿絵や技術図解、比較図、マンガ、アイコンなどを用途別の手順で制作します。形式に合う構図や配色を組み立て、確認用の画像を出力します。

  • ブログの見出し画像を作りたいとき
  • システムの仕組みを図解したいとき
  • 比較や時系列を可視化したいとき
danielmiessler/LifeOS2万2026年10月28日 更新

ArtDirection

無料概要あり

画像や映像、スライド、サイト画面の品質を複数の判定役で評価し、修正点の整理から基準を満たした成果物の引き渡しまで進めます。

  • 画像の修正点を優先順に整理したいとき
  • 映像やスライドを基準に沿って評価したいとき
  • 公開前に見た目が基準を満たすか確認したいとき
danielmiessler/LifeOS2万2026年10月28日 更新

ArXiv

無料概要あり

arXivの論文をテーマ・分野・論文IDで探し、著者や要旨、リンクをまとめます。新着論文の確認や、用意されている場合はAlphaXivのAI生成概要の取得にも対応します。

  • AI・機械学習の新着論文の確認
  • 特定テーマの論文を探したいとき
  • 論文IDやarXivのURLで照会
danielmiessler/LifeOS2万2026年10月28日 更新

danielmiessler のスキルをすべて見る

このスキルの問題を報告する