x-md
AGENTS.md192 starsChanged 8 days agoMITView on GitHub
How an autonomous agent should call x.md: what it is for, the exact routes, the response contract, the limits, and what it will never do.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- public/llms.txtllms.txt
- improve-codebase-architectureSkill
- taking-over-workSkill
- browse-xSkill
- import-x-historySkill
The file
We split this agents.md into the rules it gives an agent
9 rules. About 2 are common, 4 are distinctive, and 3 are very specific to this project.
≈2
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 80
Read warnings before you summarise.
- Distinctive: line 119
No posting, replying, following, liking, bookmarking, or messaging.
- Common: line 120
No X credentials accepted from callers, ever.
- Distinctive: line 121
No private, protected, suspended, or deleted content.
- Distinctive: line 122
No X Lists, direct messages, notifications, home timeline, or analytics.
- Very specific: line 123
No firehose or multi-account dataset building.
- Very specific: line 126
No SLA, contract, or support commitment, and no guarantee of completeness — read warnings rather than inferring from what is missing.
- Common: line 129
Do not put secrets or private-account information in URLs or search terms: the query you send is forwarded to the upstream public providers.
- Distinctive: line 153
Not affiliated with X Corp.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
x.md for agents
x.md is a read-only browser for public X (Twitter) content. Give it a public X URL, handle, or query; it answers with compact Markdown or structured JSON. Anonymous is the default and needs no account, no API key, and no OAuth; an optional bearer key, issued by hand, raises the search allowance (/auth.md). MIT-licensed, free, best effort.
When to use x.md
Reach for x.md when the job is reading one piece of public X content right now:
- You have an
x.com,twitter.com, ort.colink from an issue, changelog, or chat log and need its text inline, without a browser or an X login. - You need a public post with its thread, quoted posts, media links, and replies.
- You need a public profile's bio and latest original posts, or who it follows and who follows it.
- You need X search results as structured data rather than a rendered timeline.
- You are capturing a post into notes;
?format=obsidianemits YAML frontmatter. - You want a JSON tool-call contract:
Accept: application/json, described by openapi.json or the MCP server.
Call it in one request
curl -H 'Accept: text/markdown' \
https://mdfromx.com/trq212/status/2052809885763747935The rule is: take any public x.com URL and replace the host with
mdfromx.com. Keep the path. twitter.com and t.co links resolve the same
way once expanded.
Routes
| Job | Route |
| One post, its thread, and its replies | GET /{handle}/status/{id} |
| A profile and its latest posts | GET /{handle} (add with_replies=true, with_reposts=true, limit=100) |
| An account's whole post history as raw JSON | GET /{handle}/posts?since={date}&max_posts=2000 |
| Search public posts or accounts | GET /search?q={query}&feed=latest|top|photos|videos|users |
| Who follows an account | GET /{handle}/followers |
| Who an account follows | GET /{handle}/following |
| oEmbed document for a status URL | GET /oembed?url={status url} |
The same reads, versioned and stable for machine callers, live under
/api/v1/: POST-free, GET-only, and described field by field in
openapi.json.
GET /api/v1/posts?url={status url}
GET /api/v1/search?q={query}
GET /api/v1/profiles/{handle}
GET /api/v1/profiles/{handle}/posts
GET /api/v1/profiles/{handle}/followers
GET /api/v1/profiles/{handle}/followingChoosing a representation
| You want | Send |
| Compact Markdown (default) | nothing, or Accept: text/markdown |
| Markdown with dates, metrics, and full profile detail | ?full=true |
| YAML frontmatter for a notes vault | ?format=obsidian |
| Structured JSON with the rendered Markdown and the raw records | Accept: application/json or ?format=json |
JSON conversion responses carry url, markdown, posts, compact,
warnings, postCount, source, cache, and format. Browse responses carry
the resource-specific profile, posts, or users, plus page, limit, an
optional nextCursor, the rendered markdown, and cache status.
Read warnings before you summarise. A short reply chain or missing media is
usually an upstream gap, not evidence about the post.
Pagination
limit defaults to 20 and is capped at 100 (search feeds served by own
accounts answer 20). Every page is cut exactly at limit; only the last page
of a list is shorter. Continue with the opaque cursor returned as
nextCursor; there is no cursor ceiling. page=1 through page=10 also works
but walks upstream pages and is slower; values above 10 are clamped. Search
takes since and until.
Limits and failures
- Live search: 5 uncached requests per minute per IP. Cache hits are free.
- Live-provider requests: a further shared allowance per IP per 15-minute window. Every feed and every page of a page walk counts as one request.
- Bulk imports through
/{handle}/postsor the MCP toolx_md_import_posts: no key needed; 3 per hour and 5 per day per IP, 60 per 15 minutes per API key; one unit per request, continuations included, however many posts it returns. 429carriesRetry-Afterin seconds. Wait that long. Do not retry in a loop, and do not fan out across IPs.- Scripted or sustained search outgrows the anonymous allowance. Ask a human to request an API key, which carries its own search allowance; keys are issued by hand (/auth.md).
503withRetry-After: 30means an upstream provider is down.- Errors are RFC 9457 problem documents (
application/problem+json) with a stable machinecodeand aresolutionhint that says what to do next. - Successful anonymous responses stay cacheable for about an hour (search
10 minutes, profiles 30 minutes, follower lists 6 hours);
X-Cachereports the outcome andX-Sourcenames the upstream provider. A keyed response isCache-Control: private, no-storeand never enters a shared cache, though x.md's own result cache still spares the upstream call.
When not to use x.md
It is read-only, and that is structural rather than a policy setting: there is no write path in the service.
- No posting, replying, following, liking, bookmarking, or messaging.
- No X credentials accepted from callers, ever. Do not send any.
- No private, protected, suspended, or deleted content.
- No X Lists, direct messages, notifications, home timeline, or analytics.
- No firehose or multi-account dataset building. One account's history is
available in bulk through
/{handle}/posts; rate limits are the intended ceiling elsewhere, not an obstacle to route around. - No SLA, contract, or support commitment, and no guarantee of completeness —
read
warningsrather than inferring from what is missing.
Do not put secrets or private-account information in URLs or search terms: the query you send is forwarded to the upstream public providers.
Other ways in
- MCP — https://mdfromx.com/mcp exposes the
same reads as tools, with the server card at
/mcp/server-card. - Agent skill —
bunx skills add pc-style/x-md -g -y --skill browse-xinstallsbrowse-x, a CLI wrapper that exits3on a rate limit after printingRetry-After. Index: /.well-known/agent-skills/index.json. - Catalogs — /.well-known/ard.json lists every machine surface; /.well-known/api-catalog is the RFC 9727 linkset.
- Documentation — /docs, indexed for agents at /docs/llms.txt and in full at /llms-full.txt.
Facts about the service
- Authentication: none required. See /auth.md.
- Price: free. See /pricing.md.
- Source: github.com/pc-style/x-md, MIT.
- Contact: GitHub issues.
- Not affiliated with X Corp.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

