anbeime/skill / skills/qiaomu-x-article-publisher
x-article-publisher
Verified自媒体创作者与内容创作者在需要将 Markdown 长文发布到 X (Twitter) Articles 编辑器时使用。技能自动将 Markdown 转换为富文本并完美保留排版,支持持久化免密登录与封面上传,一键完成发布,大幅提升长文分发效率。
| File | Kind | Size |
|---|---|---|
| .gitignore | other | 736 B |
| CHANGELOG.md | markdown | 1.5 KB |
| LICENSE | other | 1.0 KB |
| README.md | markdown | 4.8 KB |
| SKILL.md | skill md | 7.6 KB |
| data/.gitignore | other | 701 B |
| data/.gitkeep | other | 0 B |
| data/browser_state/.gitkeep | other | 53 B |
| metadata.json | config | 702 B |
| scripts/auth_manager.py | script | 8.9 KB |
| scripts/copy_to_clipboard.py | script | 6.0 KB |
| scripts/debug_editor.py | script | 4.9 KB |
| scripts/debug_page.py | script | 2.3 KB |
| scripts/parse_markdown.py | script | 21.9 KB |
| scripts/publish_article.py | script | 41.1 KB |
| scripts/site_config.py | script | 1.7 KB |
scripts/site_config.py
View on GitHub# ~/.claude/skills/x-article-publisher/scripts/site_config.py
r"""
==============================================================================
X (Twitter) 站点配置 - Site Configuration for X Authentication
==============================================================================
PURPOSE:
定义 X (Twitter) 的认证验证策略,使用共享浏览器认证框架
VALIDATION STRATEGY:
1. URL 正则匹配 "^https://x\.com/home" (精确检查登录后跳转)
2. DOM 元素 "nav[aria-label='Primary']" 存在 (主导航验证)
CRITICAL:
X 对自动化检测敏感,使用真实 Chrome + 浏览器指纹保持一致性
ARCHITECTURE:
Config-driven validation → BrowserAuthManager → Persistent authentication
"""
import sys
from pathlib import Path
# ============================================================================
# PATH CONFIGURATION - 使用skill内部的browser_auth库
# ============================================================================
SKILL_DIR = Path(__file__).parent.parent
sys.path.insert(0, str(SKILL_DIR / "lib"))
from browser_auth import SiteConfig
# ============================================================================
# X (TWITTER) CONFIGURATION
# ============================================================================
X_TWITTER_CONFIG = SiteConfig(
site_name="x-twitter",
login_url="https://x.com/i/flow/login",
# 验证策略:登录成功后跳转到 Home 时间线
success_indicators={
"url_pattern": r"^https://x\.com/home", # 精确 URL 匹配
"element_exists": "nav[aria-label='Primary']" # 主导航元素验证
},
login_timeout_minutes=10 # 登录超时时间(包括 2FA 验证)
)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |