threads-lyr: Instructions file for Codex

AGENTS.md

threads-lyr AGENTS.md is an instructions file for Codex, OpenCode from ishan-parihar/threads-lyr. It costs 395 tokens per session, scanned A, original, MIT.

Repository-specific instructions for developing threads-lyr, a standalone Threads.net MCP server for anonymous, read-only access.

In plain words
What is it for?
Understanding where scraping, parsing, tools, and server setup live, and how to test or extend the project safely.
Why use it?
They explain the project’s architecture, coding conventions, security restrictions, and tests.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is ishan-parihar/threads-lyr's own configuration. It tells Codex and OpenCode how to work on threads-lyr 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-lyr configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ishan-parihar/threads-lyr. 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/ishan-parihar/threads-lyr/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/ishan-parihar/threads-lyr

Made for: Codex, OpenCode.

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-lyr AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ishan-parihar/threads-lyr/agents-md/github.svg)](https://agentmods.dev/instructions/ishan-parihar/threads-lyr/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/ishan-parihar/threads-lyr/agents-md"><img src="https://agentmods.dev/badge/instructions/ishan-parihar/threads-lyr/agents-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-lyr AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ishan-parihar/threads-lyr/agents-md"><img src="https://agentmods.dev/badge/instructions/ishan-parihar/threads-lyr/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 395 This file is loaded in full into every session.
When invoked 395 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.00395 $0.00395
Opus 5.5 $0.00158 $0.00158
Sonnet 5.5 $0.00079 $0.00079
Haiku 4.5 $0.00040 $0.00040

Measured 21d ago against content hash 80ee0db82912, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

threads-lyr AGENTS.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 21d 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.

AGENTS.md · 39 lines

What it actually says

AGENTS.md — threads-lyr

What this is

A standalone Threads.net MCP server cloned from facebook-lyr and stripped to Threads-only (anonymous read). Two read tools + one session tool.

Architecture

  • threads_mcp_server/scraping/api_client.py — anonymous client; fetches threads.net/@username with curl_cffi Chrome impersonation. No cookies.
  • threads_mcp_server/scraping/parsers.py — recursive deep-scan of embedded JSON script blocks (Next.js pageProps).
  • threads_mcp_server/tools/threads_tools.py — FastMCP tool registration.
  • threads_mcp_server/server.py — server assembly; create_mcp_server().
  • threads_mcp_server/cli_main.py — AXI-compliant CLI (home view, flags).
  • threads_mcp_server/config/ — layered config, no cookie/auth concerns.

Conventions

  • Mirror facebook-lyr conventions exactly (AXI output, tool_guard decorator, FastMCP DI pattern, TOON output, error_handler mapping).
  • All tools are read-only: annotate {"readOnlyHint": True, "openWorldHint": True}.
  • Never add cookie/login/auth machinery — Threads profiles are public.
  • Publish-side features belong behind the official Threads API (future work).

Testing

uv run pytest -q        # parsers, client (FakeSession), server, CLI
uv run ruff check . && uv run ruff format --check .

(Commands reviewed 2026-10-19: the section above still holds the commands that build and test this repo.)

Environment

  • THREADS_TRACE_DIR — optional trace log directory.
  • TRANSPORT, HOST, PORT, HTTP_PATH, LOG_LEVEL — server config.
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. 21d ago Changed · +1 lines · +26 tokens per session 80ee0db82912
  2. 2mo ago First seen · 38 lines · 369 tokens per session scan A f4c265acc8af

Subscribe to this mod's changes

threads-lyr AGENTS.md is an instructions file published in the GitHub repository ishan-parihar/threads-lyr (0 stars, last pushed 7d ago), licensed MIT. It adds 395 tokens to every session, about $0.0016 per session on Opus 5.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

threads-lyr AGENTS.md compared with instructions from other repositories

threads-lyr AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
threads-lyr AGENTS.mdishan-parihar/threads-lyrInstructions file07d agoMITA395Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot