Skip to content

anbeime/skill / skills/qiaomu-x-article-publisher/qiaomu-x-article-publisher-github

x-article-publisher

Verified

内容创作者在需要将 Markdown 长文发布到 X (Twitter) 时,使用此技能一键将 Markdown 自动转换为富文本并发布至 X Articles,完美保留排版,免去手动调整与重复登录烦恼,让长文分发更高效。

FileKindSize
.gitignoreother392 B
CHANGELOG.mdmarkdown1.5 KB
CONTRIBUTING.mdmarkdown2.4 KB
LICENSEother1.0 KB
README.mdmarkdown3.4 KB
README_FULL.mdmarkdown5.0 KB
SKILL.mdskill md7.5 KB
data/.gitignoreother701 B
data/.gitkeepother0 B
data/browser_state/.gitkeepother53 B
metadata.jsonconfig702 B
scripts/auth_manager.pyscript8.9 KB
scripts/copy_to_clipboard.pyscript6.0 KB
scripts/debug_editor.pyscript4.9 KB
scripts/debug_page.pyscript2.3 KB
scripts/parse_markdown.pyscript16.7 KB
scripts/publish_article.pyscript39.5 KB
scripts/site_config.pyscript1.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 验证)
)
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall