threads-skills: Instructions file for Claude Code

CLAUDE.md

threads-skills CLAUDE.md is an instructions file for Claude Code from gaojiongwenv587-beep/threads-skills. It costs 848 tokens per session, scanned A, original, MIT.

Development instructions for a Python browser-automation project that controls Threads through the Chrome DevTools Protocol. It includes a command-line interface for checking login status, listing feeds, posting threads, and searching.

In plain words
What is it for?
Use it to develop, test, format, and operate Threads automation, including login checks, feed listing, posting, searching, and selector verification.
Why use it?
It gives developers a consistent structure for maintaining the automation code, running checks, and updating page selectors when Threads changes its layout. Selectors are the rules used to find page elements.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions Claude Code.

This is gaojiongwenv587-beep/threads-skills's own configuration. It tells Claude Code how to work on threads-skills itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything threads-skills configures →

Reuse

Borrowing it

Nothing to install: this file belongs to gaojiongwenv587-beep/threads-skills. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/gaojiongwenv587-beep/threads-skills/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/gaojiongwenv587-beep/threads-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for threads-skills CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/gaojiongwenv587-beep/threads-skills/claude-md/github.svg)](https://agentmods.dev/instructions/gaojiongwenv587-beep/threads-skills/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/gaojiongwenv587-beep/threads-skills/claude-md"><img src="https://agentmods.dev/badge/instructions/gaojiongwenv587-beep/threads-skills/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for threads-skills CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/gaojiongwenv587-beep/threads-skills/claude-md"><img src="https://agentmods.dev/badge/instructions/gaojiongwenv587-beep/threads-skills/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 848 This file is loaded in full into every session.
When invoked 848 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00848 $0.00848
Opus 5 $0.00424 $0.00424
Sonnet 5 $0.00170 $0.00170
Haiku 4.5 $0.00085 $0.00085

Measured 11d ago against content hash 8bc6665a94f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

threads-skills CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 91 lines

How it starts

The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.

threads-skills

Threads 自动化 Claude Code Skills,基于 Python CDP 浏览器自动化引擎。

开发命令

uv sync                    # 安装依赖
uv run ruff check .        # Lint 检查
uv run ruff format .       # 代码格式化
uv run pytest              # 运行测试

架构

双层结构:scripts/ 是 Python CDP 自动化引擎,skills/ 是 Claude Code Skills 定义(SKILL.md 格式)。

  • scripts/threads/ — 核心自动化库(模块化,每个功能一个文件)
  • scripts/cli.py — 统一 CLI 入口,JSON 结构化输出
  • skills/*/SKILL.md — 指导 Claude 如何调用 scripts/

调用方式

python scripts/cli.py check-login
python scripts/cli.py list-feeds
python scripts/cli.py post-thread --content "Hello Threads"
python scripts/cli.py search --query "关键词"

选择器维护流程(Threads 改版时)

所有 CSS 选择器集中在 scripts/threads/selectors.py,标注 ✅已验证 / ⚠️未验证。

验证/更新流程:

# 1. 启动 Chrome 并在浏览器里手动打开 threads.net
python scripts/chrome_launcher.py

# 2. 运行探针脚本(探查当前页面实际 DOM 结构)
uv run python scripts/inspector.py

# 探查登录页
uv run python scripts/inspector.py --url "https://www.threads.net/login"

# 3. 根据探针输出的 ✅命中 结果,更新 selectors.py 中对应选择器
# 4. 把 ⚠️未验证 标注改为 ✅已验证

探针脚本会输出:

  • 每个候选选择器是否命中(✅/❌)
  • 页面中所有 aria-labeldata-testid 的枚举
  • script 标签中 JSON 数据的结构摘要
  • 第一个帖子容器的 HTML 片段

代码规范

  • 行长度上限 100 字符
  • 完整 type hints,使用 from __future__ import annotations
  • 异常继承 ThreadsErrorthreads/errors.py
  • CLI exit code:0=成功,1=未登录,2=错误
  • 用户可见错误信息使用中文
  • JSON 输出 ensure_ascii=False

安全约束

  • 发布类操作必须有用户确认机制
  • 敏感内容通过文件传递,不内联到命令行参数
  • Chrome Profile 目录隔离账号 cookies(存放在 ~/.threads/

CLI 子命令

CLI 子命令 分类 说明
check-login 认证 检查登录状态
login 认证 打开登录页等待用户手动登录
delete-cookies 认证 清除 cookies
list-feeds 浏览 获取首页 Feed
get-thread 浏览 获取单条 Thread 详情和回复
user-profile 浏览 获取用户主页
search 浏览 搜索 Threads
post-thread 发布 发布新 Thread
reply-thread 互动 回复 Thread
like-thread 互动 点赞 Thread
repost-thread 互动 转发 Thread
follow-user 互动 关注用户
add-account 账号 添加账号
list-accounts 账号 列出账号
remove-account 账号 删除账号
set-default-account 账号 设置默认账号

Read the full file on GitHub · 91 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 91 lines · 848 tokens per session scan A 8bc6665a94f4

Subscribe to this mod's changes

threads-skills CLAUDE.md is an instructions file published in the GitHub repository gaojiongwenv587-beep/threads-skills (5 stars, last pushed 2mo ago), licensed MIT. It adds 848 tokens to every session, about $0.0042 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens