.well-known Skills for API Discovery

Timeframe: 2024-2026

Role: Technical Architect

Technologies: Web Standards, Markdown, JSON, REST APIs, MCP

Spec: Agent Skill Discovery via Well-Known URI

How public APIs can publish simple agent instructions at /.well-known/skills.md, with optional JSON discovery at /.well-known/mcp.json.

Update (2026-06-13): The current pattern is SKILLS-first. If a site has an internet-facing API, publish /.well-known/skills.md. Use /.well-known/mcp.json only when a client needs structured endpoint data.

This project recommends github.com/Leopere/autoskill-md for generating Markdown skills files. Other tools can produce the same output. Pull requests for more language support are welcome.

The Challenge

Many web services expose APIs. Agents can call those APIs, but they need clear rules.

Those rules are often spread across docs, code, route files, and README files. That makes agents guess. Good agents should not guess where writes are safe, how auth works, or which base path to use.

The .well-known directory is a standard place for site metadata. It gives us a stable URL for agent instructions.

The Approach

Publish a short Markdown file:

/.well-known/skills.md

That file should explain what the API does, the base URL, auth rules, safe actions, risky actions, and links to more docs.

If structured discovery is useful, also publish:

/.well-known/mcp.json

The Markdown file is the first stop. The JSON file is optional.

Autoskill Generation

A team can write skills.md by hand. It can also generate it.

This project recommends github.com/Leopere/autoskill-md as the Markdown generator. The generator should read API metadata, source routes, OpenAPI files, or other local facts. It should then write a clear skills file for agents.

The file format matters more than the tool. Other generators are welcome if they make the same plain Markdown contract. PRs for more languages are welcome.

When the API is not at /

The well-known path belongs at the origin root.

Example

# Skills

This API lets agents read repair ticket status.

## API

- Base URL: https://tracker.example.com/api/v1
- Public reads: ticket status by ticket id
- Writes: admin only

## Auth

- Public status reads do not need auth.
- Customer actions need a bearer token.
- Do not put tokens in prompts, logs, or this file.

## Safety

- Ask before changing a ticket.
- Do not guess a customer id.
- Stop after three failed auth attempts.

## More Info

- JSON discovery: /.well-known/mcp.json
- Docs: https://tracker.example.com/docs

The optional JSON file can then stay small:

{
  "mcp": {
    "spec_version": "2026-06-13",
    "skills_url": "https://tracker.example.com/.well-known/skills.md",
    "status": "stable",
    "notes": "Example JSON discovery file. This file must not contain secrets.",
    "servers": [],
    "tools": [
      {
        "name": "repair-tracker",
        "description": "Repair ticket status API",
        "url": "https://tracker.example.com/api/v1",
        "capabilities": ["ticket-status"],
        "methods": ["GET"],
        "auth": {
          "type": "bearer"
        }
      }
    ]
  }
}

Security Rules

Specification

The specification lives at Agent Skill Discovery via Well-Known URI. It defines the SKILLS-first pattern and treats mcp.json as optional structured discovery.

Results

This pattern gives agents a clear first step. They can read a short file, learn the API base path, follow safety rules, and avoid guessing.

It also keeps the door open for richer clients. If a client needs machine-readable endpoint data, it can read /.well-known/mcp.json after it reads the skills file.