Use this skill when the user wants Agent-engineering-positioned X/Twitter content from technical inputs including GitHub repos, owner/repo strings, local paths, arXiv/alphaXiv papers, blog/docs URLs, PDFs, notes, source lists, existing posting packs, raw ideas, KYC/support complaints, profile text, or prior run workspaces. It collects evidence, separates verified facts from inference and user vision, drafts responsible posts or threads with reusable assets and concrete discussion questions, governs GPT Image 2-style visual assets, optionally publishes through the official X API, records outcomes, and can synthesize skill-evolution reports or patch plans without weakening claim safety.
How this skill is triggered — by the user, by Claude, or both
Slash command
/github-repo-to-x-threads:github-repo-to-x-threadsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Turn technical sources into responsible, high-signal X content for an Agent engineering account. The goal is not hype or generic AI curation. The goal is a post that reinforces one public promise: **Agent 工程如何从 demo 变成可靠系统**.
references/agent-engineering-brand-profile.mdreferences/bug-report-rewrite-template.mdreferences/content-quality-gates.mdreferences/creator-style-patterns.mdreferences/cross-check-review-template.mdreferences/model-intelligence-quality-chain.mdreferences/paper-to-system-template.mdreferences/posting-pack-template.mdreferences/profile-bio-pinned-post.mdreferences/run-workspace-contract.mdreferences/self-evolving-strategy.mdreferences/skill-evolution-system.mdreferences/thread-quality-checklist.mdreferences/weekly-content-cadence.mdreferences/x-eval-rubric.mdrouting-eval.jsonlscripts/brand_profile.pyscripts/check_image_assets.pyscripts/collect_repo_context.pyscripts/model_quality_chain.pyTurn technical sources into responsible, high-signal X content for an Agent engineering account. The goal is not hype or generic AI curation. The goal is a post that reinforces one public promise: Agent 工程如何从 demo 变成可靠系统.
Use this skill when the user asks things like:
Default account positioning:
Agent 工程实战派
Core question: Agent 工程如何从 demo 变成可靠系统?
Main content pillars:
Content routing:
references/profile-bio-pinned-post.md.Public shape requirements:
Read references/agent-engineering-brand-profile.md for the full account
contract, references/bug-report-rewrite-template.md for support/KYC rewrites,
references/paper-to-system-template.md for research-paper inputs, and
references/model-intelligence-quality-chain.md for the model-side quality
chain. Read references/creator-style-patterns.md when improving content
quality, taste, cadence, demo value, or creator-pattern fit.
Use creator patterns as content modes, not as impersonation targets. Do not copy a specific creator's catchphrases, personal identity, emoji habits, or community nicknames.
Default modes:
engineering_mentor: AI/Agent updates become engineering judgment,
practical rules, product critique, and caveats.demo_first_tool: tools and workflows are explained through real tested
steps, screenshots/video plans, use cases, and limitations.test_catalog: model/news/previews are short, visual, status-aware, and
separated into official, tested, leaked, rumored, or unverified.builder_resource_log: build-in-public progress uses short sentences,
numbered resources, open-source/community loops, and one saveable list.product_translator_longform: papers, podcasts, English sources, tools, and
product cases become Chinese long-form explanations with product implications,
resource links, and clear source/interpretation boundaries.Before drafting, choose one primary mode and one optional secondary mode. The mode must change the output: hook, evidence, media plan, reusable asset, and discussion question should all match it.
Before public copy is marked ready, the model must expose these stages:
source_grounding: inspectable facts and unsafe claims.brand_lane: main-account pillar or off-main/professional bug-report lane.angle_tournament: materially different theses, not one summary rewritten.creator_pattern: engineering mentor, demo-first tool, test catalog,
builder resource log, or product translator longform selected without
impersonation.asset_design: reusable asset selected before drafting.draft_synthesis: thesis -> mechanism -> example -> caveat -> attribution/question.adversarial_review: attack unsupported claims, generic voice, missing
asset/question, emotion leakage, and image governance.final_gate: ready/revise/block with exact reason.If a stage is missing, treat the pack as not fully reviewed.
Infer these from the prompt when possible. Ask only if the missing answer would cause a misleading post.
owner/repo strings, local paths, arXiv/alphaXiv papers, web URLs, PDFs/notes, existing posting packs, raw ideas, profile/bio prompts, KYC/support complaints, or a source-list file.independent sharer unless the user clearly says they are the author, maintainer, contributor, or company/team member.manual-safe. Use official-api-publish only when the user explicitly wants CLI posting/uploading and has configured official X API user credentials. Never default to cookie/session/proxy-based posting services.record-and-suggest. Improve future strategy through local strategy memory, but do not silently rewrite claims or skill instructions after one successful post.In command examples, <skill-dir> means the directory that contains this SKILL.md. Resolve relative paths from this skill directory before running bundled scripts.
Do this first whenever the input is not clearly a single GitHub/local repo, or whenever the user asks for adaptive strategy, publishing, or self-improvement.
Use the router:
python -B <skill-dir>/scripts/x_strategy_router.py <source-or-input> \
--prompt "<full user request>"
For a governed arbitrary-input workspace:
python -B <skill-dir>/scripts/run_any_to_x_pack.py <source-or-input> \
--prompt "<full user request>" \
--run-id <stable-run-id>
The router writes or returns a strategy_decision.json shape with:
Read references/self-evolving-strategy.md when the user wants "any input", adaptive strategy, self-evolving behavior, postmortem feedback, or a reusable posting system. Read references/skill-evolution-system.md when the user asks the skill itself to learn from evals, publish outcomes, metrics, or Trending experiments. Read references/content-quality-gates.md and references/creator-style-patterns.md when a draft is safe but generic, too smooth, too abstract, too newsy, missing demo value, or the user complains that it lacks taste.
Input routing rules:
owner/repo / local repo -> use repo evidence workflow below.Do not write the thread from memory, source title, repo name, or URL alone.
For multi-repo or durable work, create a governed run workspace first:
python -B <skill-dir>/scripts/run_repo_to_x_pack.py <repo-or-path> [more repos...] --refresh
This writes all generated artifacts under repo-to-x-workspace/runs/<run-id>/, which is ignored by git. Use this as the user's accessible source of truth for the run.
For arbitrary non-repo inputs, use run_any_to_x_pack.py to create the same governed surface, then collect evidence into the generated repo_context.json / source_context.json.
Run workspace layout:
repo-to-x-workspace/runs/<run-id>/
run_manifest.json
SUMMARY.md
repos/<repo-id>/
repo_context.json
file_manifest.txt
claims_ledger.json
cross_check_review.md
posting_pack.md
images_manifest.json
images/
repo/
If the user gives a remote GitHub repo:
If the user gives a local repo path:
origin remote if present.Prefer the bundled helper when useful:
python -B <skill-dir>/scripts/collect_repo_context.py <github-url-or-owner/repo-or-local-path> \
--out repo-to-x-workspace/context/collect-repo-context
Then inspect the generated repo_context.json and file_manifest.txt.
Minimum evidence to collect:
pyproject.toml, package.json, Cargo.toml, go.mod, etc.).For paper/web/file inputs, collect the equivalent source evidence:
If a metadata source fails, state that it was unavailable. Do not invent stars, maintainers, releases, affiliations, benchmarks, code availability, paper results, or roadmap items.
For one-off single repo work, the lighter helper is acceptable. For anything involving multiple repos, comparison, repeatability, review, generated images, or final posting packs, use run_repo_to_x_pack.py.
Create a short internal claim ledger before drafting. You do not have to show every detail, but the final answer should reflect this separation:
Examples:
When using the governed workspace, fill or update claims_ledger.json in the repo directory. Every public factual claim in posting_pack.md should map to one of:
repo_context.json,Claims without evidence should be moved to unknown_or_unsafe and removed or softened before posting.
This is the most important reputation safeguard.
If the project is not the user's:
If the user is the author or maintainer:
Choose one strategy and state it briefly before the draft.
Good default strategies:
posting_pack.md already exists.For the user's common target style, prefer:
Adaptive structure:
The structure is a thinking scaffold, not a fixed post count. Drop sections that are irrelevant, merge thin sections, and add sections when the repo needs more careful attribution, evidence, comparisons, caveats, or user vision. A shorter accurate thread is better than padded content; a longer careful thread is better than compressing away responsibility.
Length guidance:
(1/N), (2/N), etc. after the final post count is known. Do not lock to 8 posts before drafting and reviewing the content.Avoid:
Before locking the draft, do an angle pass:
Run a content-quality gate before treating hook polishing as the problem:
When Grok is configured and the user complains about quality, rigidity, taste, or weak hooks, run a draft tournament before publishing:
python -B <skill-dir>/scripts/x_draft_tournament.py <repo-run-dir> \
--prompt "User taste feedback or desired style" \
--write-proposed-pack
This writes draft_tournament.json, draft_tournament.md, and optionally posting_pack.proposed.md. Treat the proposed pack as a candidate, not as publish-approved. Re-run claim, image, and eval gates before live publish.
The final output should reduce the user's posting friction. After drafting, convert the thread into a practical publishing pack.
Include:
OK, Tight, or Split based on visible length. Do not force exact counts when multilingual text makes counting unreliable; use a conservative estimate and split posts that are clearly too long.manual-safe or official-api-publish.Keep this section practical. Avoid long explanations after the user has a paste-ready draft.
When using a run workspace, write the final copy into posting_pack.md and keep generated image paths in images_manifest.json. Do not leave the final usable output only in chat.
Suggested final-mile template:
**Ready To Post**
```text
(1/N) ...
(2/N) ...
```
**Posting Map**
- Post 1: attach image 1, alt text: ...
- Post 4: attach image 2, alt text: ...
- Disclosure: Generated conceptual visual, not an official project screenshot.
**Length Audit**
- 1/N: OK
- 2/N: Tight, do not add more text
- 3/N: OK
**Pre-Flight**
- Repo owner credited.
- Personal vision labeled as personal.
- Agent engineering brand fit is explicit.
- Reusable asset is present.
- Concrete discussion question is present.
- No unsupported "best/first/only" claim.
- Images are conceptual or attributed.
- Link works.
Only use this mode when the user explicitly asks for CLI publishing or full automation. This path can publish the first post and the rest of the thread from the CLI. The first post is created with POST /2/tweets without a reply field; each later post is created with reply.in_reply_to_tweet_id pointing to the previous post by default.
Do not use non-API website automation, browser scripting, cookie replay, hidden GraphQL calls, auth_session services, proxy-based posting, or third-party APIs as the default publish path. If the user asks for a free no-ban fully automated path, explain that the safe full-automation path is the official X API and that X API writes are pay-per-use.
Credential rule:
X_BEARER_TOKEN is not enough to publish because it is app-only/read-oriented.tweet.read users.read tweet.write media.write offline.access.X_OAUTH2_ACCESS_TOKEN and X_OAUTH2_REFRESH_TOKEN into a local ignored .env.One-time credential setup:
python -B <skill-dir>/scripts/x_oauth2_pkce_setup.py --env-file .env
The helper opens the X consent screen, listens on http://127.0.0.1:8765/callback by default, exchanges the code, and stores tokens locally. If the X app uses a different callback URL, set X_REDIRECT_URI or pass --redirect-uri.
Dry-run a publish plan before any live post:
python -B <skill-dir>/scripts/x_publish_thread.py \
repo-to-x-workspace/runs/<run-id>/repos/<repo-id>
Live publish only after the user confirms the posting pack and images:
python -B <skill-dir>/scripts/x_publish_thread.py \
repo-to-x-workspace/runs/<run-id>/repos/<repo-id> \
--live
The live publisher:
posting_pack.md or posting_queue.json,images_manifest.json,made_with_ai when generated images are attached,x_publish_log.json without tokens.Never run --live if cross_check_review.md is not pass, referenced images are missing from images_manifest.json, or the user has not explicitly approved the final copy.
Default rule: a technical final X posting pack includes actual generated images. When this skill is invoked for a repo/paper/source-to-X technical pack, treat image generation as required by default. Use the imagegen skill / built-in image_gen tool after the text strategy is clear unless the user explicitly opts out with text-only, no images, prompts-only, or manual images. Professional bug reports are the exception: use real evidence screenshots supplied by the user or text-only copy; do not generate fake KYC/support evidence. Do not say "images were not generated because the user did not explicitly request generated assets"; invoking this skill is enough signal to generate the default visual pack for technical posts.
Hard triggers: if the user asks for GPT Image 2, Image 2, image2, generated images, actual images, or "配图", generate images. Do not stop at prompts. Do not satisfy an image request by drawing low-quality placeholder cards with Python, SVG, HTML/CSS, or canvas unless the user explicitly asks for deterministic code-native graphics.
If the built-in image tool returns an image in chat or under $CODEX_HOME/generated_images/..., copy or move the selected image file into the repo run directory's images/ folder, then register it. If an actual-image pack is required and the tool cannot expose a governable local file path, the image gate is blocked. Do not register prompt-only as a fallback, and do not pretend a chat-only image is a local posting asset.
Responsible visual rules:
Good image concepts:
GitHub repo -> evidence extraction -> claims ledger -> X thread -> generated visuals.For each image, output:
If image generation is available, generate 1-3 images by default. Do not stop at prompts. If image generation is not available for an actual-image pack, stop at a blocked image gate and report the limitation. Prompt-only output is allowed only when the user explicitly requested prompt-only/text-only/manual-image mode.
Generated images must be stored under the repo run directory's images/ folder and recorded in images_manifest.json when a run workspace exists. Do not leave generated images only in chat, Downloads, a hidden app cache, or a random temp folder when the user asked for a governed posting pack.
After each generated image file exists locally, register it:
python -B <skill-dir>/scripts/register_image_asset.py <repo-run-dir> /path/to/generated.png \
--id image-1 \
--post 1/N \
--purpose "hook visual" \
--prompt "..." \
--alt-text "..." \
--disclosure "Generated conceptual visual, not an official project screenshot."
Only when the user explicitly requested prompt-only output, register a prompt-only asset and label it as non-publish-ready media:
python -B <skill-dir>/scripts/register_image_asset.py <repo-run-dir> \
--prompt-only \
--prompt-only-reason user_requested_prompt_only \
--id image-1 \
--post 1/N \
--purpose "hook visual" \
--prompt "..." \
--alt-text "..."
Before saying the pack is ready, check images_manifest.json:
posting_pack.md has an entry,path, sha256, and mime_type,alt_text and disclosure,review_status set to approved or are clearly marked as needing review.When a run workspace exists, run the image gate before presenting "Ready To Post":
python -B <skill-dir>/scripts/check_image_assets.py <repo-run-dir>
If this command fails because images are still planned or prompt_only, use imagegen / built-in image generation and register the generated files before claiming the pack is ready. Only pass --allow-prompt-only when the user explicitly requested prompt-only/text-only/manual-image mode; never use it as a fallback for failed image generation.
Default Image 2 pack:
Image prompt rules:
16:9 for landscape technical diagrams or 4:5 for high-feed visual weight.Use this format unless the user asks otherwise:
**Evidence**
- Repo: ...
- Local source checked: ...
- Live metadata checked: ...
- Public-safe facts: ...
- Caveats: ...
**Posting Strategy**
...
**Ready To Post**
```text
(1/N) ...
(2/N) ...
...
```
**Posting Map**
- Post 1: attach image 1, alt text: ...
- Disclosure: ...
**Length Audit**
- 1/N: OK
- 2/N: OK
**Images**
1. Purpose: ...
Prompt: ...
Alt text: ...
Disclosure: ...
**Do Not Say**
- ...
If the answer is for immediate posting, the Ready To Post block is the primary artifact. Keep surrounding analysis brief enough that the user can quickly find the copyable thread.
Before presenting a final posting pack as ready, run the review gate:
posting_pack.md against claims_ledger.json.cross_check_review.md with pass, revise, or block.revise or block, do not present the pack as ready to post; present the required fixes first.The review gate is required for multi-repo runs and strongly preferred for single-repo runs.
Keep generated artifacts out of git:
.envrepo-to-x-workspace/Before committing or publishing the skill repo, run:
git status --short --ignored
git diff --cached --check
rg -n --hidden --glob '!.env' --glob '!.git/**' '(g[h]p_|g[h]o_|github_[p]at_|BEGIN [A-Z ]{0,30}PRIVATE KEY)' . || true
Use this loop when the user wants the skill to get better over time, when publishing is completed, or when feedback/metrics are available.
strategy_decision.json with x_strategy_router.py or run_any_to_x_pack.py.python -B <skill-dir>/scripts/record_post_outcome.py <repo-run-dir> \
--manual-quality 0.8 \
--lesson "Reusable lesson from this run."
python -B <skill-dir>/scripts/record_post_outcome.py <repo-run-dir> \
--impressions 10000 \
--likes 120 \
--reposts 18 \
--replies 9 \
--bookmarks 35 \
--lesson "Reusable lesson from this run."
The outcome recorder writes local ignored memory under:
repo-to-x-workspace/strategy-memory/outcomes.jsonl
repo-to-x-workspace/strategy-memory/strategy_profile.json
Use local strategy memory as a bias for future strategy selection. Do not treat engagement as proof that a claim was true, and do not silently insert performance-driven rules into the canonical skill without explicit review.
When the user asks for a broader "skills 自进化体系", or after a batch of evals, Trending experiments, or live posts, synthesize the evidence before editing the canonical skill:
python -B <skill-dir>/scripts/x_skill_evolution.py \
--runs-root repo-to-x-workspace/runs \
--memory-root repo-to-x-workspace/strategy-memory
This writes an ignored workspace under:
repo-to-x-workspace/skill-evolution/<run-id>/
signal_ledger.json
skill_evolution_summary.json
skill_evolution_report.md
skill_patch_plan.md
Use --apply-profile only when you want future router runs to read the proposed
rules as local strategy-memory guidance:
python -B <skill-dir>/scripts/x_skill_evolution.py --apply-profile
That flag updates strategy_profile.json with evolution_guidance; it does not
edit SKILL.md, prompts, eval gates, or public copy. Convert a patch plan into
canonical skill changes only after reviewing the signal ledger and adding or
updating a regression eval. See references/skill-evolution-system.md for the
full contract.
Use the X eval agent when the user asks whether a post is strong, algorithm-friendly, likely to perform, safe to publish, or when they provide Grok/API access for automatic scoring.
Read references/x-eval-rubric.md for the scoring contract. The evaluator is an approximation, not the real X ranking oracle.
Before publishing a final pack, run:
python -B <skill-dir>/scripts/x_eval_post.py <repo-run-dir>
This reads:
posting_pack.md,claims_ledger.json,cross_check_review.md,images_manifest.json,strategy_decision.json,GROK_API_KEY / GROK_MODEL from .env.It writes:
post_eval.json
x_eval_report.md
If GROK_API_KEY is available, Grok is used as the semantic evaluator. If not, the script falls back to deterministic rubric scoring. Treat Grok as a reviewer, not as evidence.
If the evaluator returns revise because of angle_freshness, specificity_density, or voice_authenticity, run x_draft_tournament.py instead of only trimming text. A safe but forgettable thread should be rewritten around a stronger angle.
After publishing, collect metrics:
python -B <skill-dir>/scripts/x_collect_metrics.py <repo-run-dir>
Then calibrate strategy memory:
python -B <skill-dir>/scripts/x_calibrate_strategy.py <repo-run-dir> \
--lesson "Reusable lesson from this post."
Publish gate recommendation:
post_eval.json decision should be ready, or the user explicitly approves publishing despite revise.claim_safety must stay above the threshold in x-eval-rubric.md.brand_clarity, cta_specificity, asset_value, emotion_control, and
account_fit should pass; a safe post can still be revised if it blurs the
account.cross_check_review.md and image gates still matter more than a high Grok score.Use this when the user wants to pull from GitHub Trending, try many repos, burn tokens, benchmark quality, or converge the skill's strategy.
Default to a two-stage funnel:
Run the fast screen:
python -B <skill-dir>/scripts/x_trending_experiment.py \
--limit 10 \
--rounds 3 \
--since daily \
--metadata-only
Use deep clone mode only for a small candidate set:
python -B <skill-dir>/scripts/x_trending_experiment.py \
--limit 3 \
--rounds 3 \
--since daily \
--refresh
The experiment writes:
repo-to-x-workspace/runs/<run-id>/
trending_sources.txt
trending_experiment_results.json
trending_experiment_report.md
repos/<owner__repo>/
posting_pack_round1.md
posting_pack_round2.md
posting_pack_round3.md
experiment_eval_round*.json
Experiment rules:
--text-only-eval during early screening; ignore image/media feedback until publish prep.Before finalizing, run this checklist:
Ready To Post block without rewriting formatting?Use this pattern when the user says the project is not theirs:
(1/N) Agent 系统最容易重复踩坑的地方,不是模型不够聪明,而是失败没有地方沉淀。
<repo> by <owner> 正在处理 <verified project scope>. 我不是项目成员,只是从 Agent 工程视角看它的 failure-memory 价值。
<repo URL>
下面是我的个人理解和一个可复用检查表。
Then continue with verified facts first, and the user's vision second.
npx claudepluginhub sunflowerslwtech/sunkit --plugin github-repo-to-x-threadsCaptures writing style profiles from X posts, tracks user pools, scans social intelligence, and applies style-matching to draft content.
Writes X (Twitter) posts in Silas's direct, dense, practitioner-first voice with thinking-out-loud cadence. Use when drafting tweets, threads, or X content as Silas.
Drafts X/Twitter tweets and threads in the voice of build-in-public founders, using GTM operator patterns from a curated corpus. Best when asked to write a tweet or thread about a milestone, hot take, or lesson.