Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计通过

x-pagex 页

Agent Skill

x-page 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

10,592

周安装

455

GitHub Stars

公开资料未说明

下载量

3,713
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:x-page(x 页)
来源仓库:https://github.com/seph1709/x-page
安装命令:
openclaw skills install x-page
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install x-page

简介

x-page 是集成 X/Twitter API 的 PowerShell 管理工具,用于发帖、回复、搜索和分析社交媒体内容。

  • 适用于需要自动化发布推文、管理互动或进行社交数据分析的任务场景。
  • 支持发帖、点赞、转发、搜索用户及获取分析数据等核心功能。
  • 安装命令为 openclaw skills install x-page,需配置 ~/.config/x-twitter/credentials.json 并确保 PowerShell 环境可用。
  • 使用前请确认 API 密钥有效性及网络访问权限,避免因认证失败导致功能异常。

SKILL.md

name
x-twitter
description
X/Twitter manager: post, reply, search, like, retweet & get analytics. Requires: powershell/pwsh. Reads ~/.config/x-twitter/credentials.json (X_API_KEY, X_API_SECRET, X_ACCESS_TOKEN, X_ACCESS_SECRET). App credentials permanent; account tokens rotate periodically and immediately if host is compromised. Grant minimal permissions only. No data forwarded; all calls go to api.twitter.com only.
metadata
{"openclaw":{"emoji":"[x]","requires":{"anyBins":["powershell","pwsh"]}}}

x-twitter - Universal X/Twitter API Skill

Constructs and executes X API v2 calls inline based on what the user wants. No scripts needed.

API version: v2 Base URL: https://api.twitter.com/2

Requires an X Developer App with OAuth 1.0a User Context credentials. Free tier supports posting, reading own timeline, and basic lookups. Elevated/Pro tier required for search and higher rate limits.

STEP 1 - Load Credentials

Credentials are stored in ~/.config/x-twitter/credentials.json.

$cfg           = Get-Content "$HOME/.config/x-twitter/credentials.json" -Raw | ConvertFrom-Json
$apiKey        = $cfg.X_API_KEY
$apiSecret     = $cfg.X_API_SECRET
$accessToken   = $cfg.X_ACCESS_TOKEN
$accessSecret  = $cfg.X_ACCESS_SECRET

If the file does not exist, guide setup. Required fields:

FieldPurpose
X_API_KEYApp API Key (Consumer Key) - from X Developer Portal
X_API_SECRETApp API Secret (Consumer Secret) - from X Developer Portal
X_ACCESS_TOKENAccount Access Token - from X Developer Portal
X_ACCESS_SECRETAccount Access Token Secret - from X Developer Portal

One-time setup:

  1. Go to X Developer Portal
  2. Create a Project and App (or use existing)
  3. Under App Settings -> User authentication settings: enable OAuth 1.0a with Read and Write permissions
  4. Go to App Keys and Tokens -> Generate Access Token and Secret (for your own account)
  5. Save all four values:
@{
    X_API_KEY       = "your_api_key"
    X_API_SECRET    = "your_api_secret"
    X_ACCESS_TOKEN  = "your_access_token"
    X_ACCESS_SECRET = "your_access_token_secret"
} | ConvertTo-Json | Set-Content "$HOME/.config/x-twitter/credentials.json" -Encoding UTF8

Restrict file permissions immediately after saving:

# Windows
icacls "$HOME/.config/x-twitter/credentials.json" /inheritance:r /grant:r "$($env:USERNAME):(R,W)"
# macOS / Linux
# chmod 600 ~/.config/x-twitter/credentials.json
Never commit this file to version control. It contains long-lived secrets. Rotate X_ACCESS_TOKEN and X_ACCESS_SECRET periodically and immediately if the host is ever compromised. X_API_KEY and X_API_SECRET are app-level credentials - keep them permanently but treat as sensitive. This skill makes no external calls other than to api.twitter.com. No data is forwarded to third parties.

STEP 2 - Figure Out the API Call

X API v2 uses OAuth 1.0a for user-context actions (post, delete, like, retweet) and Bearer Token for read-only public data. This skill uses OAuth 1.0a for all calls (covers both read and write).

OAuth 1.0a Signing Helper

All requests require an OAuth 1.0a Authorization header. Use this helper:

function Get-OAuthHeader {
    param($method, $url, $apiKey, $apiSecret, $accessToken, $accessSecret, [hashtable]$params = @{})
    $nonce     = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes([System.Guid]::NewGuid().ToString("N")))
    $timestamp = [int][double]::Parse(([datetime]::UtcNow - [datetime]"1970-01-01").TotalSeconds)
    $oauthParams = @{
        oauth_consumer_key     = $apiKey
        oauth_nonce            = $nonce
        oauth_signature_method = "HMAC-SHA1"
        oauth_timestamp        = $timestamp
        oauth_token            = $accessToken
        oauth_version          = "1.0"
    }
    # Merge all params for signature base
    $allParams = @{}
    $oauthParams.GetEnumerator() | ForEach-Object { $allParams[$_.Key] = $_.Value }
    $params.GetEnumerator() | ForEach-Object { $allParams[$_.Key] = $_.Value }
    # Build signature base string
    $sortedParams = ($allParams.GetEnumerator() | Sort-Object Key | ForEach-Object {
        "$([Uri]::EscapeDataString($_.Key))=$([Uri]::EscapeDataString($_.Value))"
    }) -join "&"
    $baseString = "$method&$([Uri]::EscapeDataString($url))&$([Uri]::EscapeDataString($sortedParams))"
    # Sign
    $signingKey = "$([Uri]::EscapeDataString($apiSecret))&$([Uri]::EscapeDataString($accessSecret))"
    $hmac = New-Object System.Security.Cryptography.HMACSHA1
    $hmac.Key = [System.Text.Encoding]::ASCII.GetBytes($signingKey)
    $signature = [System.Convert]::ToBase64String($hmac.ComputeHash([System.Text.Encoding]::ASCII.GetBytes($baseString)))
    $oauthParams["oauth_signature"] = $signature
    # Build header
    $headerParts = $oauthParams.GetEnumerator() | Sort-Object Key | ForEach-Object {
        "$([Uri]::EscapeDataString($_.Key))=`"$([Uri]::EscapeDataString($_.Value))`""
    }
    return "OAuth $($headerParts -join ', ')"
}

Common Endpoints

What user wantsMethodEndpoint
Post a tweetPOST/tweets body: text
Reply to a tweetPOST/tweets body: text + reply.in_reply_to_tweet_id
Quote a tweetPOST/tweets body: text + quote_tweet_id
Delete a tweetDELETE/tweets/{id}
Like a tweetPOST/users/{id}/likes body: tweet_id
Unlike a tweetDELETE/users/{id}/likes/{tweet_id}
RetweetPOST/users/{id}/retweets body: tweet_id
Undo retweetDELETE/users/{id}/retweets/{tweet_id}
Get own timelineGET/users/{id}/tweets?max_results=10&tweet.fields=created_at,public_metrics
Get home timelineGET/users/{id}/timelines/reverse_chronological?max_results=10
Search recent tweetsGET/tweets/search/recent?query=...&max_results=10
Get tweet by IDGET/tweets/{id}?tweet.fields=created_at,public_metrics,author_id
Get own user infoGET/users/me?user.fields=username,name,public_metrics,description
Get user by usernameGET/users/by/username/{username}?user.fields=public_metrics
Get followersGET/users/{id}/followers?max_results=100
Get followingGET/users/{id}/following?max_results=100
Follow a userPOST/users/{id}/following body: target_user_id
Unfollow a userDELETE/users/{id}/following/{target_id}
Get mentionsGET/users/{id}/mentions?max_results=10&tweet.fields=created_at,author_id
Get bookmarksGET/users/{id}/bookmarks?max_results=10
Bookmark a tweetPOST/users/{id}/bookmarks body: tweet_id
Create a listPOST/lists body: name, private
Get own listsGET/users/{id}/owned_lists
Add member to listPOST/lists/{id}/members body: user_id

API Call Patterns

GET:

$url    = "https://api.twitter.com/2/ENDPOINT"
$authHeader = Get-OAuthHeader -method "GET" -url $url -apiKey $apiKey -apiSecret $apiSecret -accessToken $accessToken -accessSecret $accessSecret
$result = Invoke-RestMethod -Uri $url -Headers @{ Authorization = $authHeader } -ErrorAction Stop

GET with query params (include in signature):

$url    = "https://api.twitter.com/2/tweets/search/recent"
$qp     = @{ query = "from:username"; max_results = "10" }
$authHeader = Get-OAuthHeader -method "GET" -url $url -apiKey $apiKey -apiSecret $apiSecret -accessToken $accessToken -accessSecret $accessSecret -params $qp
$qs     = ($qp.GetEnumerator() | ForEach-Object { "$($_.Key)=$([Uri]::EscapeDataString($_.Value))" }) -join "&"
$result = Invoke-RestMethod -Uri "$url`?$qs" -Headers @{ Authorization = $authHeader } -ErrorAction Stop

POST (JSON body):

$url    = "https://api.twitter.com/2/tweets"
$body   = @{ text = "Hello from OpenClaw!" } | ConvertTo-Json
$authHeader = Get-OAuthHeader -method "POST" -url $url -apiKey $apiKey -apiSecret $apiSecret -accessToken $accessToken -accessSecret $accessSecret
$result = Invoke-RestMethod -Uri $url -Method POST -Headers @{ Authorization = $authHeader; "Content-Type" = "application/json" } -Body $body -ErrorAction Stop
Write-Host "Posted tweet ID: $($result.data.id)"

DELETE:

$url    = "https://api.twitter.com/2/tweets/{id}"
$authHeader = Get-OAuthHeader -method "DELETE" -url $url -apiKey $apiKey -apiSecret $apiSecret -accessToken $accessToken -accessSecret $accessSecret
$result = Invoke-RestMethod -Uri $url -Method DELETE -Headers @{ Authorization = $authHeader } -ErrorAction Stop

Get Own User ID (needed for user-context endpoints)

$url    = "https://api.twitter.com/2/users/me"
$authHeader = Get-OAuthHeader -method "GET" -url $url -apiKey $apiKey -apiSecret $apiSecret -accessToken $accessToken -accessSecret $accessSecret
$me     = Invoke-RestMethod -Uri $url -Headers @{ Authorization = $authHeader } -ErrorAction Stop
$userId = $me.data.id

Post with Media (image attachment)

# Step 1: Upload media via v1.1 endpoint (media upload is not on v2 yet)
$mediaUrl   = "https://upload.twitter.com/1.1/media/upload.json"
$fileBytes  = [System.IO.File]::ReadAllBytes($imagePath)
$b64        = [System.Convert]::ToBase64String($fileBytes)
$uploadAuth = Get-OAuthHeader -method "POST" -url $mediaUrl -apiKey $apiKey -apiSecret $apiSecret -accessToken $accessToken -accessSecret $accessSecret
$upload     = Invoke-RestMethod -Uri $mediaUrl -Method POST -Headers @{ Authorization = $uploadAuth; "Content-Type" = "application/json" } `
    -Body (@{ media_data = $b64 } | ConvertTo-Json) -ErrorAction Stop
$mediaId    = $upload.media_id_string
# Step 2: Post tweet with media
$tweetUrl   = "https://api.twitter.com/2/tweets"
$tweetAuth  = Get-OAuthHeader -method "POST" -url $tweetUrl -apiKey $apiKey -apiSecret $apiSecret -accessToken $accessToken -accessSecret $accessSecret
$result     = Invoke-RestMethod -Uri $tweetUrl -Method POST `
    -Headers @{ Authorization = $tweetAuth; "Content-Type" = "application/json" } `
    -Body (@{ text = $caption; media = @{ media_ids = @($mediaId) } } | ConvertTo-Json -Depth 3) -ErrorAction Stop
Write-Host "Posted tweet with media ID: $($result.data.id)"

STEP 3 - Handle Errors

try {
    # ... API call ...
} catch {
    $err    = $_.ErrorDetails.Message | ConvertFrom-Json -ErrorAction SilentlyContinue
    $status = $_.Exception.Response.StatusCode.value__
    $title  = $err.title
    $detail = $err.detail
    Write-Host "HTTP $status - $title : $detail"
}
HTTP StatusTitle / CodeMeaningFix
400Invalid RequestBad parameters or malformed JSONCheck required fields; ensure JSON body is valid
401UnauthorizedInvalid or expired credentialsRegenerate Access Token and Secret in Developer Portal
403ForbiddenApp lacks permission or write access disabledEnable Read and Write in App -> User authentication settings
403duplicate-contentTweet text is a duplicateChange the tweet text
429Too Many RequestsRate limit exceededCheck x-rate-limit-reset header; wait until reset time
404Not FoundTweet or user does not existVerify the ID; tweet may have been deleted
453Access to endpoint deniedEndpoint requires elevated access tierUpgrade to Basic/Pro at developer.twitter.com

Rate Limits (Free Tier)

ActionLimit
POST /tweets17 tweets per 24h per user; 50 per app
DELETE /tweets50 per 15 min
GET /users/me25 per 24h
GET /tweets/search/recentRequires Basic tier or above
GET timelines5 per 15 min (Free); 180 per 15 min (Basic)

If rate limited: read the x-rate-limit-reset response header (Unix timestamp) and tell the user when they can retry.

Access Tiers

TierCostKey limits
Free$017 tweets/day write; very limited read
Basic$100/month100 tweets/day; search; higher read limits
Pro$5000/monthFull access; high rate limits

AGENT RULES

  • Always load credentials first. If missing or incomplete, guide setup.
  • Always use OAuth 1.0a via the Get-OAuthHeader helper - never send raw tokens in query strings.
  • Get own user ID first when calling user-context endpoints (/users/{id}/...) - use /users/me.
  • Never embed tokens as literals - read all four credential fields fresh from disk at runtime.
  • Rotate credentials if the host is ever compromised: regenerate Access Token and Secret in Developer Portal.
  • Rate limits: on HTTP 429, read x-rate-limit-reset header and tell the user the exact retry time.
  • Free tier restrictions: search requires Basic tier; if user gets 453 "Access to endpoint denied", tell them the required tier and link to developer.twitter.com/en/portal/products.
  • Media upload: uses v1.1 upload endpoint (upload.twitter.com) - this is intentional and expected; it is still Twitter/X infrastructure. State this if the user asks.
  • Least-privilege: instruct user to enable only Read and Write in app settings; do not request DM permissions unless explicitly needed.
  • All API calls go to api.twitter.com and upload.twitter.com only - both are X/Twitter infrastructure. No external forwarding, no third-party services.
  • Construct API calls inline from user intent - do not look for script files.
  • On any error: parse HTTP status, map to the table above, tell the user exactly what to do.
  • Duplicate tweet: if user tries to post the same text twice, tell them X blocks duplicate content and ask them to change the wording.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

72.54%
按下载量换算2,693

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills