Skip to content

feat: advertise and serve agent skills from .well-known#44878

Draft
gregnr wants to merge 2 commits into
masterfrom
feat/agent-skill-discovery
Draft

feat: advertise and serve agent skills from .well-known#44878
gregnr wants to merge 2 commits into
masterfrom
feat/agent-skill-discovery

Conversation

@gregnr
Copy link
Copy Markdown
Member

@gregnr gregnr commented Apr 14, 2026

Implements part 2 of Cloudflare's agent-skills discovery RFC. supabase/agent-skills#66 builds per-skill archives and an index.json in a GitHub release. This PR pulls these archives into www at build time and serves them from https://supabase.com/.well-known/agent-skills/....

/.well-known/agent-skills
├── index.json               # discovery index per RFC v0.2.0
├── supabase.tar.gz
│   ├── SKILL.md
│   └── references/
└── supabase-postgres-best-practices.tar.gz
    ├── SKILL.md
    └── references/

Do not merge until supabase/agent-skills#66 is merged and the build process is tested.

@gregnr gregnr added the do-not-merge Not ready to be merged yet; pending other dependencies label Apr 14, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
zone-www-dot-com Ready Ready Preview, Comment, Open in v0 May 15, 2026 9:48pm
7 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored May 15, 2026 9:48pm
design-system Skipped Skipped May 15, 2026 9:48pm
docs Skipped Skipped May 15, 2026 9:48pm
learn Skipped Skipped May 15, 2026 9:48pm
studio-self-hosted Skipped Skipped May 15, 2026 9:48pm
studio-staging Skipped Skipped May 15, 2026 9:48pm
ui-library Skipped Skipped May 15, 2026 9:48pm

Request Review

@supabase
Copy link
Copy Markdown

supabase Bot commented Apr 14, 2026

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 14, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 99e1bc1b-1fe9-46ca-970d-6960e5ab356f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/agent-skill-discovery

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…45641)

## Summary

This PR makes `fetchAgentSkills.mjs` a spec-compliant client of the
[agent-skills `.well-known` URI
spec](agentskills/agentskills#254), and updates
the script to match the current release structure in
[`supabase/agent-skills`](https://github.com/supabase/agent-skills).

---

## 1. Spec-compliant URL resolution and digest verification

`fetchAgentSkills.mjs` acts as a client consuming the `.well-known`
discovery index. The [agent-skills `.well-known`
spec](agentskills/agentskills#254) is explicit
on two points:

**URL resolution** — skill artifact URLs in `index.json` must be
resolved per [RFC 3986
§5.2.2](https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.2)
using the index URL as the base URI:

> "The `url` field specifies where to fetch the skill artifact. URLs are
resolved per RFC 3986 Section 5 using the index URL as the base URI."

This means `skill.url` can be relative (`supabase.tar.gz`),
path-absolute (`/.well-known/agent-skills/supabase.tar.gz`), or fully
absolute (e.g. a CDN URL like
`https://cdn.example.com/supabase.tar.gz`). The previous implementation
extracted a filename with `.split('/').pop()` which happened to work for
bare relative URLs but was not doing RFC 3986 resolution.

**Digest verification** — clients must verify artifact integrity before
use:

> "Clients **must** verify downloaded content against the `digest` in
the index. A mismatch indicates the content is corrupted or tampered
with — clients **must not** use unverified content."

The updated script uses `new URL(skill.url, githubReleaseIndexUrl)` for
compliant resolution, verifies each artifact's SHA-256 digest from the
in-memory buffer before any disk writes, and only writes to
`public/.well-known/agent-skills/` once all digests pass.

**Acknowledged overhead**: since Supabase owns both the publisher
([`scripts/build-release.ts`](https://github.com/supabase/agent-skills/blob/main/scripts/build-release.ts)
in `supabase/agent-skills`) and this consumer, the practical risk of
non-compliant URL handling is currently low — the publisher always emits
bare relative filenames. However, being spec-compliant here gives us
full flexibility to change how skills are packaged or hosted in
`supabase/agent-skills` in the future (e.g. moving artifacts to a CDN)
without needing to update this script.

---

## 2. Semver release tags

#44878 referenced `supabase/agent-skills#66` (date+SHA tags).
[supabase/agent-skills#77](supabase/agent-skills#77)
has since merged, moving releases to semver tags managed by Release
Please. `/releases/latest` works for both formats — no code change
needed, just a rebase.

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge Not ready to be merged yet; pending other dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants