From 476e7ed569c58ef72dde2e3bce865a4bad7049f0 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Mar 2026 05:35:20 +0000 Subject: [PATCH] Add llms.txt for AI tool consumption Create llms.txt following the llmstxt.org standard with project overview, quick start example, and links to existing API documentation to avoid duplication. Add "For AI Tools" section to README.md and update CLAUDE.md with a rule to keep llms.txt in sync with API changes. https://claude.ai/code/session_01GWtXdnLLWrWfqsZ7ZN1JPM --- CLAUDE.md | 1 + README.md | 4 ++++ llms.txt | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 llms.txt diff --git a/CLAUDE.md b/CLAUDE.md index 97078c8..0c06e8e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -32,6 +32,7 @@ - IMPORTANT: 開発者の指摘が誤っているときは、根拠を示して反論すること - IMPORTANT: このライブラリ呼び出し方法を検討するときは、Developer Experienceを重視して考えること - IMPORTANT: リリース前につきソースコードの修正時のマイグレーション考慮は不要。でも警告くらいは出してね +- IMPORTANT: APIの追加・変更・削除を行った場合、llms.txtも同期的に更新すること。llms.txtはLLMがxlmakeを理解するためのAPI要約ファイル ## 開発コマンド diff --git a/README.md b/README.md index 5da2eab..ea27bb8 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,10 @@ const output = await xlmake() await output.saveToFile("report.xlsx"); ``` +## For AI Tools + +If you are using AI coding assistants (GitHub Copilot, Claude, ChatGPT, etc.), see [llms.txt](./llms.txt) for a comprehensive API reference optimized for LLM consumption. + ## License MIT diff --git a/llms.txt b/llms.txt new file mode 100644 index 0000000..608b694 --- /dev/null +++ b/llms.txt @@ -0,0 +1,66 @@ +# xlmake + +> Declarative Excel generation library for TypeScript. Built on ExcelJS, providing a method-chaining API where code reflects the final Excel structure. Runs in both Node.js and browsers. + +## Quick Start + +Install: + +``` +npm install xlmake +``` + +```typescript +import { xlmake } from "xlmake"; + +const output = await xlmake() + .sheet("Sales") + .table({ + preset: "basic", + columns: [ + { key: "name", label: "Product" }, + { key: "price", label: "Price" }, + { key: "quantity", label: "Quantity" }, + ], + data: [ + { name: "Apple", price: 100, quantity: 50 }, + { name: "Orange", price: 80, quantity: 100 }, + ], + }) + .getNode(); + +await output.saveToFile("report.xlsx"); +``` + +## API Reference + +- [Overview](website/docs/api-reference/overview.md): API structure and design concepts +- [xlmake()](website/docs/api-reference/xlmake.md): WorkbookBuilder and SheetBuilder methods (sheet, merge, getNode, getBrowser, table, text, image, space) +- [.table()](website/docs/api-reference/table.md): TableOptions, Column definitions (LeafColumn, ParentColumn), autoWidth, mergeSameValues +- [Styling](website/docs/api-reference/styling.md): CellStyle, TableStyle, BorderStyle, LineStyle, AlignType, style priority +- [.text()](website/docs/api-reference/text.md): Text input (plain string or styled object) +- [.image()](website/docs/api-reference/image.md): ImageOptions (source, width, height, row, col) +- [Reading API](website/docs/api-reference/reading.md): read(), WorkbookReader, SheetReader, CellReader + +## Guides + +- [Quick Start](website/docs/quick-start.md): Getting started with xlmake +- [Basic Usage](website/docs/guides/basic-usage.md): Core concepts and patterns +- [Multi-sheet](website/docs/guides/multi-sheet.md): Working with multiple sheets +- [Styling](website/docs/guides/styling.md): Applying styles and presets +- [Images](website/docs/guides/images.md): Inserting images into sheets +- [Reading Excel files](website/docs/guides/reading.md): Reading existing Excel files + +## Examples + +- [Basic Table](website/docs/examples/basic-table.md): Simple table output +- [Presets](website/docs/examples/presets.md): Using basic, minimal, and striped presets +- [Borders](website/docs/examples/borders.md): Border styling examples +- [Multi-level Headers](website/docs/examples/multi-header.md): Nested column headers +- [Cell Merge](website/docs/examples/cell-merge.md): Merging cells with same values + +## Reference + +- [Presets](website/docs/reference/presets.md): Detailed preset specifications +- [Excel Constraints](website/docs/reference/excel-constraints.md): Excel format limitations +- [Limitations](website/docs/reference/limitations.md): Features not supported by xlmake