Skip to content

Commit 408c4d3

Browse files
committed
docs: expand llms.txt router with MCP, skills, Explorer, standards
- Add Agent tooling and canonical sources block (npm MCP, Agent Skills, AI hub .md, GitHub, Explorer, AIPs, Indexer GraphQL .md) - Document in llms-txt (en/zh) and build/ai (en/zh); extend dist smoke assertions Made-with: Cursor
1 parent 5a6669c commit 408c4d3

File tree

6 files changed

+17
-2
lines changed

6 files changed

+17
-2
lines changed

src/content/docs/build/ai.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ can ingest to understand the full Aptos documentation. We publish three feeds to
5353

5454
Some clients resolve `/.well-known/llms.txt`; production serves the same index via a redirect to [`/llms.txt`](/llms.txt) ([`https://aptos.dev/.well-known/llms.txt`](https://aptos.dev/.well-known/llms.txt)).
5555

56-
The [`llms.txt`](/llms.txt) router also surfaces machine-readable **API** links—[`/aptos-spec.json`](/aptos-spec.json) (OpenAPI 3 JSON for the node REST API) and [`/rest-api`](/rest-api) (HTML reference).
56+
The [`llms.txt`](/llms.txt) router also surfaces machine-readable **API** links—[`/aptos-spec.json`](/aptos-spec.json) (OpenAPI 3 JSON for the node REST API) and [`/rest-api`](/rest-api) (HTML reference)—plus **MCP**, Agent Skills, Explorer, GitHub, standards, and Indexer GraphQL `.md` links in one place.
5757

5858
<LinkCard href="/llms-txt" title="How to use LLMs.txt with AI tools" description="Instructions for Cursor, GitHub Copilot, Claude.ai, ChatGPT, Windsurf, and more" />

src/content/docs/llms-txt.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ We provide the following LLMs.txt routes to help AI tools access our documentati
2020

2121
The [`llms.txt`](/llms.txt) index also lists **structured API assets** that are not prose docs—for example the [Aptos Fullnode OpenAPI spec](/aptos-spec.json) (JSON) and the [REST API reference](/rest-api) (HTML) generated from that spec.
2222

23+
It also surfaces **agent tooling** (Aptos MCP, Agent Skills, Explorer, GitHub org) and key **Markdown** deep links (AI hub, standards, Indexer GraphQL reference) so models can fetch the right surface without guessing URLs.
24+
2325
## Per-Page Markdown Access
2426

2527
Every documentation page is also available as rendered Markdown by appending `.md` to the URL:

src/content/docs/zh/build/ai.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ npx skills add aptos-labs/aptos-agent-skills
5050

5151
部分客户端会解析 `/.well-known/llms.txt`;生产环境会通过重定向提供与 [`/llms.txt`](/llms.txt) 相同的索引([`https://aptos.dev/.well-known/llms.txt`](https://aptos.dev/.well-known/llms.txt))。
5252

53-
[`llms.txt`](/llms.txt) 路由还会列出机器可读的 **API** 链接——[`/aptos-spec.json`](/aptos-spec.json)(全节点 REST API 的 OpenAPI 3 JSON)以及 [`/zh/rest-api`](/zh/rest-api)(HTML 参考文档)。
53+
[`llms.txt`](/llms.txt) 路由还会列出机器可读的 **API** 链接——[`/aptos-spec.json`](/aptos-spec.json)(全节点 REST API 的 OpenAPI 3 JSON)以及 [`/zh/rest-api`](/zh/rest-api)(HTML 参考文档)——并在同一处汇总 **MCP**、Agent Skills、浏览器、GitHub、标准与 Indexer GraphQL 等 `.md` 链接
5454

5555
<LinkCard href="/zh/llms-txt" title="如何在 AI 工具中使用 LLMs.txt" description="Cursor、GitHub Copilot、Claude.ai、ChatGPT、Windsurf 等工具的使用说明" />

src/content/docs/zh/llms-txt.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ description: 如何让 Cursor、GitHub Copilot、ChatGPT 和 Claude 等工具理
2020

2121
[`llms.txt`](/llms.txt) 索引中还会列出**非 Markdown 的结构化 API 资源**——例如 [Aptos 全节点 OpenAPI 规范](/aptos-spec.json)(JSON),以及本站由同一规范生成的 [REST API 参考](/zh/rest-api)(HTML)。
2222

23+
此外还会列出 **Agent 工具链**(Aptos MCP、Agent Skills、浏览器、GitHub 组织)以及重要 **Markdown** 深链(AI 总览、标准、Indexer GraphQL 参考),便于模型直接拉取正确资源。
24+
2325
## 逐页 Markdown 访问
2426

2527
每个文档页面也可以通过在 URL 后添加 `.md` 获取渲染后的 Markdown 格式:

src/pages/llms-index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ export const GET: APIRoute = async () => {
5454
`- [Aptos Fullnode OpenAPI 3 spec](${SITE_URL}/aptos-spec.json): OpenAPI document for the node REST API (accounts, transactions, view functions, events).`,
5555
`- [REST API reference (HTML)](${SITE_URL}/rest-api): browsable docs generated from the same spec on this site.`,
5656
"",
57+
"Agent tooling and canonical sources:",
58+
"- [Aptos MCP on npm](https://www.npmjs.com/package/@aptos-labs/aptos-mcp): run `npx @aptos-labs/aptos-mcp` to give IDEs on-chain queries, REST helpers, and Move tooling.",
59+
"- [Aptos Agent Skills](https://github.com/aptos-labs/aptos-agent-skills): installable skills for Move, TypeScript SDK, and dApp scaffolding.",
60+
`- [AI tools hub](${markdownUrl(SITE_URL, "build/ai")}): MCP setup, Agent Skills, and LLMs.txt usage on one page (Markdown).`,
61+
"- [Aptos Labs on GitHub](https://github.com/aptos-labs): official SDKs, tools, and sample code.",
62+
"- [Aptos Explorer](https://explorer.aptoslabs.com/): look up accounts, transactions, validators, and network health.",
63+
`- [Aptos standards (AIPs)](${markdownUrl(SITE_URL, "build/smart-contracts/aptos-standards")}): tokens, naming, and other Aptos Improvement Proposal standards.`,
64+
`- [Indexer GraphQL reference](${markdownUrl(SITE_URL, "build/indexer/indexer-api/indexer-reference")}): schema-oriented reference for historical on-chain data (pairs with REST OpenAPI above).`,
65+
"",
5766
"Markdown access:",
5867
"- Documentation pages are available as rendered Markdown by appending `.md` to the canonical page URL.",
5968
`- Example: ${SITE_URL}/build/guides/first-transaction -> ${SITE_URL}/build/guides/first-transaction.md`,

tests/llms-dist-smoke.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ describe("LLMs static build output", () => {
2323
expect(body).toContain("llms-small.txt");
2424
expect(body).toContain("llms-full.txt");
2525
expect(body).toContain("aptos-spec.json");
26+
expect(body).toContain("Agent tooling and canonical sources");
27+
expect(body).toContain("@aptos-labs/aptos-mcp");
2628
expect(body).toContain("## Start Here");
2729
expect(body).toMatch(/\.md\)/);
2830
});

0 commit comments

Comments
 (0)