Twitter
One account, three lanes: read evidence, plan typed acts, execute an approved
plan.
This is the public branded X (Twitter) catalog skill for the message-send action
family. Its core invariant: the agent may read, audit, draft, and plan freely,
but every act that publishes to a public timeline or mutates the account stops
at a human approval gate, and the sealed receipt proves which acts ran, against
which plan digest, with which provider evidence.
Write for the operator who owns the account, the reviewer who approves a live
act, and downstream skills that consume the resulting packets. Keep each plan
to the smallest evidence-backed act set that satisfies the objective. Existing
post and user ids must come from supplied evidence, never memory or guesswork;
name missing evidence as a blocker.
What this skill does
Seven runners:
read: collect account evidence from the live API through the twitter
connector. Queries: snapshot, posts, mentions, search, following,
followers. A query without params.user_id reads the authenticated
account; with it, another account. The connector reads whole pages until it
has at least max_items, keeps every item of them, and reports in
next_cursor where a further read starts (pass it back as
params.pagination_token). Emits runx/twitter.evidence.v1.
Read-only; no gate.
read-archive: inspect one contained X archive export (tweets.js,
following.js, or follower.js) through the runtime's digest-bound artifact
page seam. Twitter code receives bounded, record-complete pages and never a
path or whole-file escape hatch. The runtime snapshots up to 512 MiB and this
skill requests 512 KiB pages; the page size is not a total archive limit.
Emits the same runx/twitter.evidence.v1 packet; no gate.
plan: turn one bounded objective plus evidence into runx/twitter.plan.v1, an
explicit list of typed acts with rationale, using agent judgment, then bind
the exact plan through native data.digest. This is the curated lane, for
dozens of acts that each deserve a reason. A plan is a draft; it delivers
nothing. The result exposes twitter_plan.data and the matching
digest_result.data.digest required by execute; callers never calculate
the digest themselves.
select: the bulk lane. Apply a deterministic predicate to an archive export
and emit a compact plan, no agent judgment. Use it when the criterion is
mechanical and the match set runs to thousands, where a per-item rationale
would be wrong and would exceed the runtime output limit. Two targets:
posts pages tweets.js and emits delete_post acts (predicate: author,
date range, engagement threshold), with identical results across page sizes;
users reads a bounded following.js bundle and emits
unfollow acts (predicate: non_mutual: true for accounts you follow that
do not follow back, needing follower.js too, or an explicit user_ids
list). Emits runx/twitter.selection.v1 carrying a digest-bound twitter_plan.
execute: run the next batch of an approved plan as one twitter connector
operation behind its own approval, sealing per-act outcomes into
runx/twitter.execution.v1 and appending one compact progress fact to a durable
execution ledger. A batch is one published act (a post, reply, quote, or one
thread segment), or the contiguous run of up to 50 acts of one other kind
from the cursor. The approval binds that exact call. The kernel records each
act's outcome as it lands and stops sending at a rate limit, so a monotonic
cursor, not an accumulated id list, is enough to resume safely.
Durable operation memory and continuation
The skill remembers an operation in its bound store, local to the workspace
by default. It saves the exact plan once under its native digest, separately
from the compact execution progress stream. The saved plan preserves the
objective, account principal, exact content and targets, rationale, evidence
references and any applied context bindings. Progress preserves the pinned
account id, next act, partial thread cursor, cumulative processed, succeeded and failed act counts, a bounded last failure
evidence reference, the last batch summary and structured stop advice. No host opens the store database, reconstructs
completed ids or calculates plan hashes.
On the first execute, supply plan_json and its native plan_digest from
plan or select. A valid plan is saved before the effect approval; saving it
is not approval. On later calls, omit plan_json and supply only the digest.
The skill reads its own progress, selects the next batch and derives the
expected stream version and canonical retry key. The logical store defaults to
local://twitter; pass data_source_uri when the operation uses another
binding, and keep using that same workspace and store.
status reads one plan and its progress without contacting X. It returns the
objective, principal, current cursor, partial thread, last batch, next batch
summary, cumulative outcome counts, failure evidence, structured stop,
retry_at, and compact next_input for execute. It never returns
an approval or claims a proposed batch has run. needs_plan means this store
has no saved plan: provide the original exact plan once, rather than
inventing it or resetting a progress stream.
recent lists a bounded page of prior execution summaries and plan digests.
It does not scan history or return every post. A plan saved at an approval
pause has no completed batch yet; find that paused invocation through native
run history and resume its run id.
Each execution reads the bound account. It runs only when that account matches
the plan's principal (account:@handle, case insensitive) and, once progress
has pinned an account id, that same account. The exact approval identifies the
verified handle, account id, target and payload. Another available account is
never a fallback.
A native invocation and a multi-batch plan have different identities. If the
invocation pauses, continue that run id through runx resume; do not start
another run to escape an approval. If a call is interrupted or its outcome is
unknown, read native history and reconcile that same invocation first. Runx
owns in-flight custody and whether an effect may be retried. Only after a batch
is sealed and its result understood should another execute start the next
batch. A saved plan, status, receipt or supplied approval reference is context,
never new authority. Relay only actual operator decisions bound to the exact
native request.
Threads advance one segment per batch. The saved cursor contains the next
segment and confirmed reply id, so continuation does not repost earlier
segments. The cursor counts processed acts. Only provider-confirmed successful acts
increment counts.succeeded; settled refusals increment counts.failed. A
partially published thread is not a completed act. Failures remain visible
across later batches through cumulative counts and a bounded last_failure
containing the act, reason and native evidence reference. At the end, execution
returns completed_with_failures and status returns complete_with_failures
when any terminal act failed. Detailed outcomes remain in native evidence. A refused plan, digest mismatch or already-complete plan does not
append a fake progress event.
stop.action distinguishes wait, review and reconcile. A known rate
reset gives waiting status and a conditional next_input: the host must
wait until retry_at before using it. Unknown retry timing or account,
authentication and billing problems require review and expose no automatic
next input. An unsettled or ambiguous outcome asks for native reconciliation;
never start a replacement publish invocation to escape it. After resolving a
review stop, an operator may explicitly invoke execute again under a fresh
exact native approval. retry_at is the provider's reported reset, not proof the account will be
ready then. Wait until that time before another attempt, or stop for the
operator when retry timing is unknown. Inspect native failure evidence for
calls that fail before a settled batch result. Do not loop on permission,
billing, account restrictions or unknown acknowledgement. The host owns
scheduling and may choose a stricter cadence or spending cap. A CLI host can
return the wait to its operator; Fieldwork can persist a wakeup on its Work.
The skill contains no sleeping process, scheduler or personal memory service.
Direct CLI use
Use the installed CLI's inspection for exact input contracts. Select the
workspace and connector once, then use the same workspace for continuation:
runx connector use twitter --credential user
runx connector use store
runx skill ./skills/twitter read -i query=snapshot --json
runx skill ./skills/twitter recent --json
runx skill ./skills/twitter status -i plan_digest=<native-plan-digest> --json
runx skill ./skills/twitter execute -i plan_digest=<native-plan-digest> --json
For the first execution, --inputs <file-or-stdin> carries the original plan
and native digest; subsequent executions use the compact next_input from
status. Local paths above illustrate a checkout; installed registry packages and
other compatible hosts use the same runner contracts. Paths, run ids and
artifact references come from runx, never guessed filesystem layouts.
The operating sequence is evidence → grounded plan or deterministic selection
→ exact native approval → bounded execution → status or native recovery.
Codex supplies judgment and relays the person's decisions. It needs no X HTTP,
SQL, batching, canonical hashing or private operator scripts. Fieldwork owns
ongoing goals, brand/taste context, longer-lived memory and future wakeups;
the same skill and native evidence work from either host.
Connector implementations
The skill targets typed X operations, not an HTTP library or browser driver.
An API implementation and an X-specific browser implementation can implement
the same operations if they preserve account binding, exact payload semantics,
bounded outcomes, idempotency/custody requirements and truthful finality. A
generic browser connector alone does not implement post.create or
users.follow: its X-specific implementation must translate those operations
and verify their results. Bind an implementation explicitly; do not silently
switch transport or account after a failure. Missing operations are readiness
failures, not permission to fall back to ad hoc browser or HTTP code. The
current packaged connector uses the X API; this skill change does not supply
or claim a working browser implementation.
Each runner emits exactly one packet for its lane: typed evidence with
provenance and a content digest, a curated or bulk act plan bound by digest, or
provider outcomes bound to the executed plan digest and appended to the ledger.
The act vocabulary, with its consequence class:
| kind |
consequence |
params |
post |
public_send |
text |
reply |
public_send |
text, in_reply_to |
quote |
public_send |
text, quote_of |
thread |
public_send |
texts (ordered, max 25) |
repost |
public_send |
post_id |
delete_post |
live_mutation |
post_id |
unfollow |
live_mutation |
target_user_id |
mute |
live_mutation |
target_user_id |
block |
live_mutation |
target_user_id |
follow |
live_mutation |
target_user_id |
like |
live_mutation |
post_id |
Every kind is consequential, so every plan sets
gates.human_approval_required: true. follow, like, and repost are
engagement acts and share a hard cap of 10 per plan. Direct messages are
outside this skill.
A published act is confirmed by reading the post back. The other kinds are
acknowledged: X answers each with the resulting state (following: false,
deleted: true), which is the evidence, and has no read of one follow or like
cheap enough to confirm a batch. They set a state, so resending one changes
nothing. An answer that does not state the resulting state stops the cursor at
that act, and a later batch sends it again.
Post and reply text, and each thread segment, is a non-empty string of at
most 4000 characters, published verbatim; ids are X id strings. A plan that
breaks either is refused before approval.
When to use this skill
- Promote a release, publish a thread, or reply to a mention on behalf of a
named principal, with content bound verbatim in the plan.
- Audit an account's own post history or following list and prune it: bulk
delete old posts, unfollow low-value accounts, against operator-stated
criteria.
- Gather timeline, mention, or search evidence for downstream research,
triage, or lead skills that consume
runx/twitter.evidence.v1.
- Route a
message-send plan onto X as its provider delivery lane.
When not to use this skill
- To send direct messages or manage DM conversations.
- To farm engagement: follow-churn, mass liking, coordinated reposting, or any
volume pattern designed to game visibility. The engagement cap is not a
budget to fill.
- To mention, reply to, or dogpile users who have not engaged with the
principal, at volume.
- To operate an account the operator does not control, or to automate consumer
account creation.
- To bypass the approval gate, the act caps, or the operator's spending limit
on the pay-per-use API.
Procedure
For the plan runner, build twitter_plan this way:
- Hold one bounded objective. If the ask bundles unrelated jobs (a promo
thread plus a follow purge), return
needs_input with the split.
- Ground every reference. Ids for
delete_post, unfollow, reply,
quote, like, mute, and block must come from evidence_json or an
explicit operator-supplied id. If the evidence is missing or stale, name it
as a blocker; never invent or approximate an id.
- Write public content into the act params verbatim: the exact
text or
texts to publish, shaped by brand_context when supplied. Do not plan a
summary of what will be written; approval binds the exact words.
- Give every act a stable
act_id (act-001 onward), its kind, params,
its consequence from the table, and a one-line rationale tied to the
objective or the operator's stated criteria.
- Apply
operator_policy narrowly. A prune criterion like "no engagement and
older than 2023" selects only posts the evidence shows meet it; borderline
items go to open_questions, not into the act list.
- Keep the plan small: at most 50 acts, at most 10 engagement acts, threads
at most 25 segments. A larger job becomes staged plans.
- Set
decision: ready when acts are grounded and complete; needs_input
for missing objective, principal, evidence, or content; reject for asks
outside the vocabulary or inside the abuse boundaries.
- Never place credentials, bearer tokens, raw API dumps, or third-party
personal data beyond public ids and handles in the plan.
Edge cases and stop conditions
- Mixed objective: return
needs_input with the runner or plan split.
- Id not in evidence: blocker; the plan stays
needs_input.
- Prune criteria ambiguous: select the unambiguous items, list the rest in
open_questions.
- Rate limit or provider refusal during read: the read fails with the
provider's reason; a read is whole or it fails.
- Oversized user-selection archive: the current two-file
users selector
refuses when either bounded text file exceeds the native read limit; it never
treats truncation as an empty following/follower set. read-archive itself
remains paged. Do not claim an oversized users bulk plan was evaluated.
- Rate limit during execute: nothing more is sent; the acts before it are
settled and the packet reports
next_act_index, remaining_count, and the
reset time. After the reset, inspect status and invoke its compact next input;
the skill reads and verifies the latest stream version itself.
- One act refused: a refused act is recorded as
failed with the
provider's reason and the cursor moves past it. Unfollowing a deactivated
account is already the state the act asked for, so it counts as done.
- Plan digest mismatch on execute: the apply step refuses and executes
nothing. A refusal is receipt evidence, not a fake ledger transition.
- Concurrent or interrupted work: reconcile the native run first. The skill
derives its stream version and batch key; a host must not invent either.
- Partially posted thread: resume from the ledger's
active_thread cursor;
never restart the thread from its first confirmed segment.
- Approval missing or denied: the execute graph stops at the gate.
- No bound account: admission refuses before any provider call; bind one
with
runx connector use twitter --credential user.
- Fully autonomous live posting requested:
reject; the gate is the
contract.
Outputs
read and read-archive return runx/twitter.evidence.v1: typed post or
user records with metrics, the cursor the next live read starts from, and
provenance naming the provider answers or archive artifact by digest.
plan returns runx/twitter.plan.v1 as twitter_plan.data, with its
digest as digest_result.data.digest. Each act carries its consequence and
rationale, and context_bindings preserve the exact brand or taste context
the planner applied.
select returns runx/twitter.selection.v1: the matched records and the
twitter_plan a driver hands to execute, with plan_digest bound so the
approved and executed bytes are provably identical.
execute returns runx/twitter.execution.v1 for the current bounded batch:
each act's result, where the next batch resumes, cumulative counts, any
structured stop, and the provider's reported rate and reset, which the next
host needs.
Worked example
Input: objective "delete my zero-engagement posts from before 2024",
principal account:@example, evidence from
read-archive(query: posts, archive_file: data/tweets.js) showing three matching
posts, operator_policy "keep anything with replies".
Output: decision: ready; three delete_post acts, each carrying the post id
from the evidence and a rationale quoting its age and zero metrics;
gates.human_approval_required: true; one borderline post with two replies
listed in open_questions. Execution then stops at the approval gate, and the
sealed receipt binds the approved digest to the three deletions the provider
confirmed.
Inputs
read: query (required), params (user_id, q, pagination_token),
max_items.
read-archive: query and relative archive_file (required),
archive_base (workspace default, or skill for packaged fixtures), and
max_items.
plan: objective (required), principal (required), evidence_json,
operator_policy, brand_context, operator_context.
select: objective (required), principal (required), target (posts
default, or users), archive_file (posts), following_file and
followers_file (users), predicate (required: posts take rt_of,
is_retweet, text_prefix, text_contains, max_likes, max_reposts,
before_year, after_year; users take non_mutual or user_ids),
archive_base, max_acts.
execute: plan_digest (required), optional plan_json on the first call,
data_source_uri (default local://twitter) and max_acts (1–50). Native
digest verification precedes saving the plan or provider effects. Version,
retry identity and next batch are derived inside the skill.
status: plan_digest (required), optional data_source_uri and max_acts.
recent: optional data_source_uri, limit (1–100, default 5) and page
cursor. Only execution summaries are listed.
Credentials and cost
The twitter connector declares two credentials, and the bound account's
credential decides how a request authenticates. Credentials never appear as
inputs or receipt material.
user: one JSON object holding consumer_key, consumer_secret,
access_token, access_secret (OAuth 1.0a user context). Required for
every mutation and for the authenticated account's own reads. Bind it with
runx connector use twitter --credential user, the JSON on stdin.
app: the app-context bearer token, enough for search and reads that name
another account by user_id. Bind it with runx connector use twitter --credential app, the token on stdin.
The X API bills per request on current plans and a post containing a link
costs a large multiple of a plain one, so prefer archive exports for bulk
history, set a spending cap in the developer portal, and let max_items and
the act caps bound each run.
Agent task contract
twitter-plan
Follow the plan procedure and act vocabulary above. Return one
twitter_plan containing decision, objective, principal, typed acts,
approval gates, evidence locators, open questions, blockers, and a truthful success
checkpoint. Every referenced post or user id must be grounded in supplied
evidence, and every public word must appear verbatim in the act params. A plan
never executes, publishes, deletes, follows, or otherwise mutates the account.
1---2name: twitter3description: >-4 Govern X (Twitter) account work through three lanes: evidence reads, typed5 act plans for posting and account hygiene, and gated execution with per-act6 provider evidence. Nothing reaches a live timeline or mutates an account7 without an explicit approval recorded in the receipt.8metadata:9 source: https://skillmd.com/skills/runxhq/twitter10---1112# Twitter1314One account, three lanes: read evidence, plan typed acts, execute an approved15plan.1617This is the public branded X (Twitter) catalog skill for the `message-send` action18family. Its core invariant: the agent may read, audit, draft, and plan freely,19but every act that publishes to a public timeline or mutates the account stops20at a human approval gate, and the sealed receipt proves which acts ran, against21which plan digest, with which provider evidence.2223Write for the operator who owns the account, the reviewer who approves a live24act, and downstream skills that consume the resulting packets. Keep each plan25to the smallest evidence-backed act set that satisfies the objective. Existing26post and user ids must come from supplied evidence, never memory or guesswork;27name missing evidence as a blocker.2829## What this skill does3031Seven runners:3233- `read`: collect account evidence from the live API through the `twitter`34 connector. Queries: `snapshot`, `posts`, `mentions`, `search`, `following`,35 `followers`. A query without `params.user_id` reads the authenticated36 account; with it, another account. The connector reads whole pages until it37 has at least `max_items`, keeps every item of them, and reports in38 `next_cursor` where a further read starts (pass it back as39 `params.pagination_token`). Emits `runx/twitter.evidence.v1`.40 Read-only; no gate.41- `read-archive`: inspect one contained X archive export (`tweets.js`,42 `following.js`, or `follower.js`) through the runtime's digest-bound artifact43 page seam. Twitter code receives bounded, record-complete pages and never a44 path or whole-file escape hatch. The runtime snapshots up to 512 MiB and this45 skill requests 512 KiB pages; the page size is not a total archive limit.46 Emits the same `runx/twitter.evidence.v1` packet; no gate.47- `plan`: turn one bounded objective plus evidence into `runx/twitter.plan.v1`, an48 explicit list of typed acts with rationale, using agent judgment, then bind49 the exact plan through native `data.digest`. This is the curated lane, for50 dozens of acts that each deserve a reason. A plan is a draft; it delivers51 nothing. The result exposes `twitter_plan.data` and the matching52 `digest_result.data.digest` required by `execute`; callers never calculate53 the digest themselves.54- `select`: the bulk lane. Apply a deterministic predicate to an archive export55 and emit a compact plan, no agent judgment. Use it when the criterion is56 mechanical and the match set runs to thousands, where a per-item rationale57 would be wrong and would exceed the runtime output limit. Two targets:58 `posts` pages `tweets.js` and emits `delete_post` acts (predicate: author,59 date range, engagement threshold), with identical results across page sizes;60 `users` reads a bounded `following.js` bundle and emits61 `unfollow` acts (predicate: `non_mutual: true` for accounts you follow that62 do not follow back, needing `follower.js` too, or an explicit `user_ids`63 list). Emits `runx/twitter.selection.v1` carrying a digest-bound `twitter_plan`.64- `execute`: run the next batch of an approved plan as one `twitter` connector65 operation behind its own approval, sealing per-act outcomes into66 `runx/twitter.execution.v1` and appending one compact progress fact to a durable67 execution ledger. A batch is one published act (a post, reply, quote, or one68 thread segment), or the contiguous run of up to 50 acts of one other kind69 from the cursor. The approval binds that exact call. The kernel records each70 act's outcome as it lands and stops sending at a rate limit, so a monotonic71 cursor, not an accumulated id list, is enough to resume safely.7273### Durable operation memory and continuation7475The skill remembers an operation in its bound `store`, local to the workspace76by default. It saves the exact plan once under its native digest, separately77from the compact execution progress stream. The saved plan preserves the78objective, account principal, exact content and targets, rationale, evidence79references and any applied context bindings. Progress preserves the pinned80account id, next act, partial thread cursor, cumulative processed, succeeded and failed act counts, a bounded last failure81evidence reference, the last batch summary and structured stop advice. No host opens the store database, reconstructs82completed ids or calculates plan hashes.8384On the first `execute`, supply `plan_json` and its native `plan_digest` from85`plan` or `select`. A valid plan is saved before the effect approval; saving it86is not approval. On later calls, omit `plan_json` and supply only the digest.87The skill reads its own progress, selects the next batch and derives the88expected stream version and canonical retry key. The logical store defaults to89`local://twitter`; pass `data_source_uri` when the operation uses another90binding, and keep using that same workspace and store.9192- `status` reads one plan and its progress without contacting X. It returns the93 objective, principal, current cursor, partial thread, last batch, next batch94 summary, cumulative outcome counts, failure evidence, structured `stop`,95 `retry_at`, and compact `next_input` for `execute`. It never returns96 an approval or claims a proposed batch has run. `needs_plan` means this store97 has no saved plan: provide the original exact plan once, rather than98 inventing it or resetting a progress stream.99- `recent` lists a bounded page of prior execution summaries and plan digests.100 It does not scan history or return every post. A plan saved at an approval101 pause has no completed batch yet; find that paused invocation through native102 run history and resume its run id.103104Each execution reads the bound account. It runs only when that account matches105the plan's principal (`account:@handle`, case insensitive) and, once progress106has pinned an account id, that same account. The exact approval identifies the107verified handle, account id, target and payload. Another available account is108never a fallback.109110A native invocation and a multi-batch plan have different identities. If the111invocation pauses, continue **that run id** through `runx resume`; do not start112another run to escape an approval. If a call is interrupted or its outcome is113unknown, read native history and reconcile that same invocation first. Runx114owns in-flight custody and whether an effect may be retried. Only after a batch115is sealed and its result understood should another `execute` start the next116batch. A saved plan, status, receipt or supplied approval reference is context,117never new authority. Relay only actual operator decisions bound to the exact118native request.119120Threads advance one segment per batch. The saved cursor contains the next121segment and confirmed reply id, so continuation does not repost earlier122segments. The cursor counts processed acts. Only provider-confirmed successful acts123increment `counts.succeeded`; settled refusals increment `counts.failed`. A124partially published thread is not a completed act. Failures remain visible125across later batches through cumulative counts and a bounded `last_failure`126containing the act, reason and native evidence reference. At the end, execution127returns `completed_with_failures` and status returns `complete_with_failures`128when any terminal act failed. Detailed outcomes remain in native evidence. A refused plan, digest mismatch or already-complete plan does not129append a fake progress event.130131`stop.action` distinguishes `wait`, `review` and `reconcile`. A known rate132reset gives `waiting` status and a conditional `next_input`: the host must133wait until `retry_at` before using it. Unknown retry timing or account,134authentication and billing problems require review and expose no automatic135next input. An unsettled or ambiguous outcome asks for native reconciliation;136never start a replacement publish invocation to escape it. After resolving a137review stop, an operator may explicitly invoke execute again under a fresh138exact native approval. `retry_at` is the provider's reported reset, not proof the account will be139ready then. Wait until that time before another attempt, or stop for the140operator when retry timing is unknown. Inspect native failure evidence for141calls that fail before a settled batch result. Do not loop on permission,142billing, account restrictions or unknown acknowledgement. The host owns143scheduling and may choose a stricter cadence or spending cap. A CLI host can144return the wait to its operator; Fieldwork can persist a wakeup on its Work.145The skill contains no sleeping process, scheduler or personal memory service.146147### Direct CLI use148149Use the installed CLI's inspection for exact input contracts. Select the150workspace and connector once, then use the same workspace for continuation:151152```sh153runx connector use twitter --credential user154runx connector use store155runx skill ./skills/twitter read -i query=snapshot --json156runx skill ./skills/twitter recent --json157runx skill ./skills/twitter status -i plan_digest=<native-plan-digest> --json158runx skill ./skills/twitter execute -i plan_digest=<native-plan-digest> --json159```160161For the first execution, `--inputs <file-or-stdin>` carries the original plan162and native digest; subsequent executions use the compact `next_input` from163status. Local paths above illustrate a checkout; installed registry packages and164other compatible hosts use the same runner contracts. Paths, run ids and165artifact references come from runx, never guessed filesystem layouts.166167The operating sequence is evidence → grounded plan or deterministic selection168→ exact native approval → bounded execution → status or native recovery.169Codex supplies judgment and relays the person's decisions. It needs no X HTTP,170SQL, batching, canonical hashing or private operator scripts. Fieldwork owns171ongoing goals, brand/taste context, longer-lived memory and future wakeups;172the same skill and native evidence work from either host.173174### Connector implementations175176The skill targets typed X operations, not an HTTP library or browser driver.177An API implementation and an X-specific browser implementation can implement178the same operations if they preserve account binding, exact payload semantics,179bounded outcomes, idempotency/custody requirements and truthful finality. A180generic browser connector alone does not implement `post.create` or181`users.follow`: its X-specific implementation must translate those operations182and verify their results. Bind an implementation explicitly; do not silently183switch transport or account after a failure. Missing operations are readiness184failures, not permission to fall back to ad hoc browser or HTTP code. The185current packaged connector uses the X API; this skill change does not supply186or claim a working browser implementation.187188Each runner emits exactly one packet for its lane: typed evidence with189provenance and a content digest, a curated or bulk act plan bound by digest, or190provider outcomes bound to the executed plan digest and appended to the ledger.191192The act vocabulary, with its consequence class:193194| kind | consequence | params |195| --- | --- | --- |196| `post` | public_send | `text` |197| `reply` | public_send | `text`, `in_reply_to` |198| `quote` | public_send | `text`, `quote_of` |199| `thread` | public_send | `texts` (ordered, max 25) |200| `repost` | public_send | `post_id` |201| `delete_post` | live_mutation | `post_id` |202| `unfollow` | live_mutation | `target_user_id` |203| `mute` | live_mutation | `target_user_id` |204| `block` | live_mutation | `target_user_id` |205| `follow` | live_mutation | `target_user_id` |206| `like` | live_mutation | `post_id` |207208Every kind is consequential, so every plan sets209`gates.human_approval_required: true`. `follow`, `like`, and `repost` are210engagement acts and share a hard cap of 10 per plan. Direct messages are211outside this skill.212213A published act is confirmed by reading the post back. The other kinds are214acknowledged: X answers each with the resulting state (`following: false`,215`deleted: true`), which is the evidence, and has no read of one follow or like216cheap enough to confirm a batch. They set a state, so resending one changes217nothing. An answer that does not state the resulting state stops the cursor at218that act, and a later batch sends it again.219220Post and reply `text`, and each thread segment, is a non-empty string of at221most 4000 characters, published verbatim; ids are X id strings. A plan that222breaks either is refused before approval.223224## When to use this skill225226- Promote a release, publish a thread, or reply to a mention on behalf of a227 named principal, with content bound verbatim in the plan.228- Audit an account's own post history or following list and prune it: bulk229 delete old posts, unfollow low-value accounts, against operator-stated230 criteria.231- Gather timeline, mention, or search evidence for downstream research,232 triage, or lead skills that consume `runx/twitter.evidence.v1`.233- Route a `message-send` plan onto X as its provider delivery lane.234235## When not to use this skill236237- To send direct messages or manage DM conversations.238- To farm engagement: follow-churn, mass liking, coordinated reposting, or any239 volume pattern designed to game visibility. The engagement cap is not a240 budget to fill.241- To mention, reply to, or dogpile users who have not engaged with the242 principal, at volume.243- To operate an account the operator does not control, or to automate consumer244 account creation.245- To bypass the approval gate, the act caps, or the operator's spending limit246 on the pay-per-use API.247248## Procedure249250For the `plan` runner, build `twitter_plan` this way:2512521. Hold one bounded objective. If the ask bundles unrelated jobs (a promo253 thread plus a follow purge), return `needs_input` with the split.2542. Ground every reference. Ids for `delete_post`, `unfollow`, `reply`,255 `quote`, `like`, `mute`, and `block` must come from `evidence_json` or an256 explicit operator-supplied id. If the evidence is missing or stale, name it257 as a blocker; never invent or approximate an id.2583. Write public content into the act params verbatim: the exact `text` or259 `texts` to publish, shaped by `brand_context` when supplied. Do not plan a260 summary of what will be written; approval binds the exact words.2614. Give every act a stable `act_id` (`act-001` onward), its `kind`, `params`,262 its `consequence` from the table, and a one-line `rationale` tied to the263 objective or the operator's stated criteria.2645. Apply `operator_policy` narrowly. A prune criterion like "no engagement and265 older than 2023" selects only posts the evidence shows meet it; borderline266 items go to `open_questions`, not into the act list.2676. Keep the plan small: at most 50 acts, at most 10 engagement acts, threads268 at most 25 segments. A larger job becomes staged plans.2697. Set `decision`: `ready` when acts are grounded and complete; `needs_input`270 for missing objective, principal, evidence, or content; `reject` for asks271 outside the vocabulary or inside the abuse boundaries.2728. Never place credentials, bearer tokens, raw API dumps, or third-party273 personal data beyond public ids and handles in the plan.274275## Edge cases and stop conditions276277- **Mixed objective:** return `needs_input` with the runner or plan split.278- **Id not in evidence:** blocker; the plan stays `needs_input`.279- **Prune criteria ambiguous:** select the unambiguous items, list the rest in280 `open_questions`.281- **Rate limit or provider refusal during read:** the read fails with the282 provider's reason; a read is whole or it fails.283- **Oversized user-selection archive:** the current two-file `users` selector284 refuses when either bounded text file exceeds the native read limit; it never285 treats truncation as an empty following/follower set. `read-archive` itself286 remains paged. Do not claim an oversized users bulk plan was evaluated.287- **Rate limit during execute:** nothing more is sent; the acts before it are288 settled and the packet reports `next_act_index`, `remaining_count`, and the289 reset time. After the reset, inspect `status` and invoke its compact next input;290 the skill reads and verifies the latest stream version itself.291- **One act refused:** a refused act is recorded as `failed` with the292 provider's reason and the cursor moves past it. Unfollowing a deactivated293 account is already the state the act asked for, so it counts as done.294- **Plan digest mismatch on execute:** the apply step refuses and executes295 nothing. A refusal is receipt evidence, not a fake ledger transition.296- **Concurrent or interrupted work:** reconcile the native run first. The skill297 derives its stream version and batch key; a host must not invent either.298- **Partially posted thread:** resume from the ledger's `active_thread` cursor;299 never restart the thread from its first confirmed segment.300- **Approval missing or denied:** the execute graph stops at the gate.301- **No bound account:** admission refuses before any provider call; bind one302 with `runx connector use twitter --credential user`.303- **Fully autonomous live posting requested:** `reject`; the gate is the304 contract.305306## Outputs307308- `read` and `read-archive` return `runx/twitter.evidence.v1`: typed post or309 user records with metrics, the cursor the next live read starts from, and310 provenance naming the provider answers or archive artifact by digest.311- `plan` returns `runx/twitter.plan.v1` as `twitter_plan.data`, with its312 digest as `digest_result.data.digest`. Each act carries its consequence and313 rationale, and `context_bindings` preserve the exact brand or taste context314 the planner applied.315- `select` returns `runx/twitter.selection.v1`: the matched records and the316 `twitter_plan` a driver hands to `execute`, with `plan_digest` bound so the317 approved and executed bytes are provably identical.318- `execute` returns `runx/twitter.execution.v1` for the current bounded batch:319 each act's result, where the next batch resumes, cumulative counts, any320 structured stop, and the provider's reported rate and reset, which the next321 host needs.322323## Worked example324325Input: objective "delete my zero-engagement posts from before 2024",326principal `account:@example`, evidence from327`read-archive(query: posts, archive_file: data/tweets.js)` showing three matching328posts, operator_policy "keep anything with replies".329330Output: `decision: ready`; three `delete_post` acts, each carrying the post id331from the evidence and a rationale quoting its age and zero metrics;332`gates.human_approval_required: true`; one borderline post with two replies333listed in `open_questions`. Execution then stops at the approval gate, and the334sealed receipt binds the approved digest to the three deletions the provider335confirmed.336337## Inputs338339- `read`: `query` (required), `params` (`user_id`, `q`, `pagination_token`),340 `max_items`.341- `read-archive`: `query` and relative `archive_file` (required),342 `archive_base` (`workspace` default, or `skill` for packaged fixtures), and343 `max_items`.344- `plan`: `objective` (required), `principal` (required), `evidence_json`,345 `operator_policy`, `brand_context`, `operator_context`.346- `select`: `objective` (required), `principal` (required), `target` (`posts`347 default, or `users`), `archive_file` (posts), `following_file` and348 `followers_file` (users), `predicate` (required: posts take `rt_of`,349 `is_retweet`, `text_prefix`, `text_contains`, `max_likes`, `max_reposts`,350 `before_year`, `after_year`; users take `non_mutual` or `user_ids`),351 `archive_base`, `max_acts`.352- `execute`: `plan_digest` (required), optional `plan_json` on the first call,353 `data_source_uri` (default `local://twitter`) and `max_acts` (1–50). Native354 digest verification precedes saving the plan or provider effects. Version,355 retry identity and next batch are derived inside the skill.356- `status`: `plan_digest` (required), optional `data_source_uri` and `max_acts`.357- `recent`: optional `data_source_uri`, `limit` (1–100, default 5) and page358 `cursor`. Only execution summaries are listed.359360## Credentials and cost361362The `twitter` connector declares two credentials, and the bound account's363credential decides how a request authenticates. Credentials never appear as364inputs or receipt material.365366- `user`: one JSON object holding `consumer_key`, `consumer_secret`,367 `access_token`, `access_secret` (OAuth 1.0a user context). Required for368 every mutation and for the authenticated account's own reads. Bind it with369 `runx connector use twitter --credential user`, the JSON on stdin.370- `app`: the app-context bearer token, enough for `search` and reads that name371 another account by `user_id`. Bind it with `runx connector use twitter372 --credential app`, the token on stdin.373374The X API bills per request on current plans and a post containing a link375costs a large multiple of a plain one, so prefer archive exports for bulk376history, set a spending cap in the developer portal, and let `max_items` and377the act caps bound each run.378379## Agent task contract380381### `twitter-plan`382383Follow the `plan` procedure and act vocabulary above. Return one384`twitter_plan` containing `decision`, `objective`, `principal`, typed `acts`,385approval gates, evidence locators, open questions, blockers, and a truthful success386checkpoint. Every referenced post or user id must be grounded in supplied387evidence, and every public word must appear verbatim in the act params. A plan388never executes, publishes, deletes, follows, or otherwise mutates the account.