微算力 · API 导航与自营网关
API 接入 EN
未登录登录
📁

用文件夹管理你的推文排期

Xqueue · v1.0.3
效率 安全 B 级 作者 madebydia 公开目录收录
下载 1.3k 安装 0 收藏 3.7k 浏览 10

简介

用文件夹管理推文排期,无需前端,文件系统即界面,支持线程、多媒体和自动填充

原始描述

File-based X/Twitter post scheduler. Drop tweets into day/time folders, they post automatically. No frontend, no app — your file system is the UI.

安装

下载 zip 解压后,把里面的文件放进你的 Agent 的 skills 目录即可使用。

给 Agent 的直链(让它自己下载安装):

Claude Code 放 ~/.claude/skills/;Codex、TypingMind 等按各自文档的 skills 目录放置。技能申请什么权限由作者决定,装前请确认。

中文使用说明 来自收录源

核心用法

XQueue 将文件系统本身转化为 X/Twitter 的排程界面。用户通过创建 xqueue/ 目录结构,按星期和时间(如 Monday/9am/)放置 .md 或 .txt 文件即可设定发布计划。内置的 cron 每 15 分钟扫描一次:若当前时间对应文件夹有内容则发布并清理;若为空则自动从 backlog/ 文件夹按字母顺序拉取最旧内容填充。支持线程(用 --- 分隔)、多图/视频附件(同目录放置媒体文件)、以及 X 社区定向发布(首行标注 Post to Community:)。

显著优点

  1. 极简架构:零数据库、零前端、零依赖复杂部署,纯 Python + 文件系统即可运行
  2. 版本控制友好:推文内容即文本文件,天然适配 Git 管理、批量编辑和协作流程
  3. 自动化兜底:backlog 机制允许批量创作,系统自动填充空档,降低排期焦虑
  4. 多媒体支持:JPG/PNG/GIF 自动附加,最多 4 张,按字母序排列
  5. 社区原生:内置 X Communities 支持,无需手动复制社区 ID

潜在局限

  • 精度限制:15 分钟轮询周期意味着实际发布时间可能有 0-15 分钟延迟
  • 单实例设计:无多用户或分布式锁机制,不适合团队协作同一账号
  • 状态隐式:无可视化面板,队列状态需手动浏览文件夹或查看 posted.log
  • 字符硬性截断:超过 280 字符直接拒绝发布,无自动分段或提示修剪
  • 平台绑定:API 变动(如 X API 计费策略调整)可能直接影响功能可用性

适合人群

  • 开发者/技术写作者,习惯用文件和 Git 管理内容
  • 追求极简工具栈的独立创作者和小团队
  • 需要规律发布但不想维护复杂社媒管理后台的用户

常规风险

  • 误删风险:deleteAfterPost 默认为 true,文件发布后永久删除,若未备份则内容丢失
  • 重复发布:关闭 deleteAfterPost 后,每周循环会导致相同内容重复推送
  • 凭据暴露:需配置 X API 四元组(Consumer Key/Secret, Access Token/Secret),存在.env 泄露风险
  • 时区混淆:依赖用户正确配置 timezone,错误设置导致发布时机错位
  • API 配额:高频检查(15分钟)+ 多线程发布可能快速消耗 X API 免费额度

技能正文


name: xqueue description: File-based X/Twitter post scheduler. Drop tweets into day/time folders, they post automatically. No frontend, no app — your file system is the UI. metadata: {"openclaw":{"requires":{"env":["X_CONSUMER_KEY","X_CONSUMER_SECRET","X_ACCESS_TOKEN","X_ACCESS_TOKEN_SECRET"],"bins":["python3"],"pip":["requests","requests-oauthlib"]},"permissions":{"filesystem":"read/write within xqueue/ directory","network":"api.x.com, upload.twitter.com","keychain":"optional macOS Keychain if XQUEUE_KEYCHAIN_ACCOUNT is set"}}}

XQueue

A file-based post scheduler for X (Twitter). Your file system is the UI.

How It Works

Create a folder structure with days and times. Drop tweet files into the time slots. A cron job checks every 15 minutes — if it's the right day and time and there's content, it posts and cleans up.

xqueue/
  config.json
  backlog/
    ebook-launch-thread.md
    ai-tools-roundup.md
  Sunday/
    10am/
      my-tweet.md
      photo.jpg
  Monday/
    9am/
      thread-about-shipping.md
    12pm/
    5pm/
  Tuesday/
    ...

The schedule cycles weekly. Monday's 9am slot fires every Monday at 9am. If the folder is empty, it pulls the oldest file from backlog/ (sorted alphabetically). If there's content in the slot, it posts that and backlog waits. This means you can schedule up to a week of specific content, and dump everything else in backlog — it'll fill empty slots automatically.

After posting, files are deleted (by default) so they don't repeat.

Setup

Run the setup command to create your queue:

python3 xqueue-setup.py

This asks you:

  1. How many times per day do you want to post?
  2. What times? (or let it pick optimal times)
  3. What timezone?
  4. Any X communities to post to?
  5. Thread separator preference (default: ---)
  6. Delete after posting? (recommended yes — if off, posts may send twice)

Creates the full folder structure + config.json.

Tweet Format

Simple tweet

Just write the text in a .md or .txt file:

This is my tweet. It can be up to 280 characters.

Tweet with community

Start with Post to [community name]: on the first line:

Post to Build in Public: Just shipped my first ClawHub skill. File-based tweet scheduler, no frontend needed.

Thread

One file, tweets separated by your configured separator (default ---):

I built a file-based tweet scheduler with no frontend. Your filesystem is the UI.
---
Drop a .md file into Monday/9am/ and a cron job posts it. Empty slot? It pulls from a backlog/ folder automatically.
---
No database, no app, no dashboard. Just folders and text files. Sometimes the simplest architecture wins.

Tweet with media

Put image/video files in the same time folder as the tweet. Supported: JPG, PNG, GIF (under 5MB for images, 15MB for GIF).

9am/
  tweet.md        ← the text
  progress.png    ← gets attached

If multiple media files exist, they attach in alphabetical order (max 4 per tweet).

Config

xqueue/config.json:

{
  "timezone": "America/Chicago",
  "separator": "---",
  "deleteAfterPost": true,
  "communities": {
    "Build in Public": "community_id",
    "Indie Hackers": "community_id"
  },
  "logFile": "xqueue/posted.log",
  "dryRun": false
}

During setup, paste the community URL (like x.com/i/communities/123456) or the numeric ID directly. The script extracts the ID and asks for a display name. Plain names without an ID are rejected — everything needed to post is captured upfront.

Backlog

The xqueue/backlog/ folder holds tweets that aren't scheduled for a specific slot. When the cron fires and a time slot is empty, it pulls the oldest file from backlog (alphabetical sort — prefix with numbers like 01-, 02- to control order).

This lets you batch-write content without worrying about fitting it into exactly the right number of weekly slots. Schedule what's time-sensitive, backlog the rest.

Cron Integration

The skill includes a cron job that runs every 15 minutes:

  • Checks current day + time against folder structure
  • If slot has content → post it
  • If slot is empty → pull oldest from backlog/
  • If both are empty → skip
  • Logs results to posted.log
  • Deletes posted files (if deleteAfterPost is on)

What Goes Where

You want to... Do this
Schedule a tweet for Tuesday 9am Drop a .md file in xqueue/Tuesday/9am/
Post a thread One .md file with --- between tweets
Attach an image Put the image file in the same folder as the .md file
Post to a community Start text with Post to Community Name:
Reorder posts Move files between time folders
Skip a time slot Leave the folder empty
See what's queued Browse the xqueue folder
See what already posted Check xqueue/posted.log
Queue content without a specific time Drop it in xqueue/backlog/
Control backlog order Prefix filenames: 01-first.md, 02-second.md

Important

  • deleteAfterPost: true (default) means each file posts once then gets removed. If you turn this off, the same content will post again next week when the cycle repeats.
  • Tweets over 280 characters are rejected (logged as error, not posted).
  • Thread tweets are each checked for 280 char limit individually.
  • Empty folders are silently skipped.
  • The cron checks every 15 minutes, so posts go out within 0-15 min of the scheduled time.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

其他来源收录

同一技能在不同目录的原始页面:

标签

social-mediaautomationtwitterschedulerfile-basedcroncontent-managementdeveloper-toolsminimalist

同类 Skill