关于 queue
queue 是用于管理文章队列的技能,通过脚本操作 SQLite 数据库中的文章记录。它支持按作者或语言筛选,并跟踪文章从待处理到发布的状态。
主要功能
- 01查看队列状态和文章详情
- 02按作者或语言筛选文章
- 03更新文章状态
- 04记录作者、语言和输出文件
- 05检查作者及语言配置
适用场景
- 01查看待处理文章及队列概况
- 02筛选特定作者或语言的文章
- 03写作后将文章状态更新为草稿
- 04维护文章的多语言输出记录
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ mwguerra/ claude-code-plugins --skill queue安装后在 Claude Code 中输入/queue确认已加载。
附带文件references/schema-reference.md
详细介绍
文章队列
管理存储在 SQLite 数据库(.article_writer/article_writer.db)中的文章队列。
数据访问
所有数据都存储在 SQLite 数据库的 articles 表中。所有操作都使用提供的脚本:
# Queue summary
bun run "${CLAUDE_PLUGIN_ROOT}"/scripts/queue.ts status
# List articles (with filters)
bun run "${CLAUDE_PLUGIN_ROOT}"/scripts/queue.ts list [filter]
# Show article details
bun run "${CLAUDE_PLUGIN_ROOT}"/scripts/queue.ts show <id>
# Stats and operations
bun run "${CLAUDE_PLUGIN_ROOT}"/scripts/article-stats.ts --summary
bun run "${CLAUDE_PLUGIN_ROOT}"/scripts/article-stats.ts --get <id>
bun run "${CLAUDE_PLUGIN_ROOT}"/scripts/article-stats.ts --set-status <status> <id>
架构参考
字段请参见 references/schema-reference.md。
关键字段
作者引用
文章通过 author_id、author_name 和 author_languages 列引用作者:
{
"author_id": "mwguerra",
"author_name": "MW Guerra",
"author_languages": ["pt_BR", "en_US"]
}
如果未指定作者,则使用默认作者(sort_order 最小)。
输出文件(按语言)
{
"output_folder": "content/articles/2025_01_15_rate-limiting/",
"output_files": [
{
"language": "pt_BR",
"path": "content/articles/2025_01_15_rate-limiting/rate-limiting.pt_BR.md",
"translated_at": "2025-01-15T14:00:00Z"
},
{
"language": "en_US",
"path": "content/articles/2025_01_15_rate-limiting/rate-limiting.en_US.md",
"translated_at": "2025-01-15T16:00:00Z"
}
]
}
时间戳
created_at:任务添加到队列的时间written_at:主文章完成的时间published_at:文章发布的时间updated_at:最后修改的时间
操作
状态摘要
bun run "${CLAUDE_PLUGIN_ROOT}"/scripts/queue.ts status
按作者筛选
bun run "${CLAUDE_PLUGIN_ROOT}"/scripts/queue.ts list author:mwguerra
按语言筛选
bun run "${CLAUDE_PLUGIN_ROOT}"/scripts/queue.ts list lang:en_US
撰写后更新
bun run "${CLAUDE_PLUGIN_ROOT}"/scripts/queue.ts update <id> status:draft
添加翻译
更新 output_files JSON 列,添加其他语言条目。
状态流转
pending -> in_progress -> draft -> review -> published
|
archived
默认作者
添加任务时若未指定作者:
- 查询默认作者:
SELECT * FROM authors ORDER BY sort_order ASC LIMIT 1 - 在文章记录中存储 author_id、author_name 和 author_languages
验证
处理前:
- 确认 authors 表中存在 author_id
- 验证语言是作者所支持语言的子集
- 检查是否包含所有必填字段
评论
支持 Markdown