The llms.txt specification is a proposed standard for providing information to large language models (LLMs) in a format they can easily consume. It’s like a robots.txt, but instead of telling search engines how to crawl your site, it helps AI assistants understand your project.

Cornerstone publishes an llms.txt file that provides AI tools with structured information about our components, including their APIs, properties, events, methods, slots, and CSS custom properties.

This feature is experimental! The llms.txt format and its contents may change as we refine the output based on feedback and evolving AI capabilities.

Why Use It?

When working with AI coding assistants like Claude, ChatGPT, Copilot, or Cursor, you can reference the llms.txt file to give the AI context about Cornerstone components. This can lead to more accurate code suggestions and fewer hallucinations when the AI generates Cornerstone code.

Accessing the File

The llms.txt file is available in every Cornerstone build at:

/dist/llms.txt
/dist/bundled/llms.txt

You can also find it in your node_modules directory if you’ve installed Cornerstone via npm:

node_modules/@cruglobal/cornerstone-components/dist/unbundled/llms.txt

How to Use It

How you reference the file depends on which AI tool you’re using.

Claude Projects

If you’re using Claude Projects, you can add the llms.txt URL to your project knowledge. Claude will use this context when helping you write Cornerstone code.

Cursor

In Cursor, you can add the file to your project’s documentation sources via Cursor Settings > Features > Docs. You can also reference the file directly in chat using @Docs after adding it, or paste the content into the chat context.

VS Code + Copilot

GitHub Copilot in VS Code doesn’t have a built-in way to reference external documentation files, but you can:

  1. Copy the llms.txt file into your project’s root directory
  2. Open it in a VS Code tab (Copilot considers open files as context)
  3. Use #file in Copilot Chat to explicitly reference it (e.g., #file:llms.txt how do I create a dialog?)

VS Code + Claude Code

If you’re using the Claude Code extension, you can reference the file directly by path:

@node_modules/@cruglobal/cornerstone-components/dist/unbundled/llms.txt

Or simply ask Claude to read it — Claude Code can access files in your project directly.

Other AI Tools

Most AI coding assistants allow you to provide context through URLs, file uploads, or direct pasting. Check your tool’s documentation for the best way to include external references.

What’s Included

The llms.txt file contains:

  • An overview of Cornerstone and its capabilities
  • Links to documentation sections
  • A complete list of all components with descriptions
  • Detailed API reference for each component including:
    • Slots
    • Properties and their types
    • Methods and their signatures
    • Events
    • CSS custom properties
    • CSS parts
    • CSS states

llms.txt vs Agent Skills

Cornerstone provides both an Agent Skill and an llms.txt file. Here’s when to use each:

Featurellms.txtAgent Skill
FormatSingle text fileDirectory with multiple markdown files
Best forQuick context, simple queriesDeep integration, complex tasks
Context usageLoads everything at onceProgressive disclosure (loads as needed)
Supported byMost AI toolsTools supporting agentskills.io spec

If your AI tool supports Agent Skills, we recommend using the skill for better context efficiency. Otherwise, the llms.txt file is a great option that works with nearly any AI tool.

Feedback

Since this is experimental, we’d love to hear how it works for you! If you find issues with the generated content or have suggestions for improvement, please open an issue on GitHub.