Skip to content

feat(cli): add functions skill topic - #7891

Merged
Prashansa-K merged 6 commits into
developfrom
prashansakulshrestha/cli-3303-add-functions-skill-topic
Dec 1, 2026
Merged

Prashansa-K merged 6 commits into
developfrom
prashansakulshrestha/cli-3303-add-functions-skill-topic

Conversation

@Prashansa-K

@Prashansa-K Prashansa-K commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Adds the functions topic to supabase skill display, covering Edge Functions for agents:

  • functions new, serve, deploy, and download, and which of them are local-only or hosted-only.
  • Running functions serve in the background, how to tell it is ready, and how to stop it cleanly.
  • The hosted approval flow for deploy, including showing the user the target and function names before the re-run.
  • Local env files versus hosted secrets, with secrets set covered only as far as functions need it.
  • Exact recovery steps for common failures.

The overview links to the topic.

This PR also replaces the "More topics" footer, which listed every other topic, with a short hand-picked "Related topics" list. Only db-query and migrations list related topics, each naming the other, and every topic other than the overview ends with a pointer to supabase skill display for the full list. The old footer grew with every topic added and pushed migrations toward the rendered size cap, so topic PRs could pass alone and fail once merged together. The earlier trims to migrations.md made for the cap are reverted.

🤖 Generated with Claude Code

Add `supabase skill display functions` with guidance for creating, serving
in the background, deploying, and downloading Edge Functions, plus the
secrets they depend on. Link it from the overview and tighten migrations
wording so it stays within the rendered size cap.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Prashansa-K
Prashansa-K requested a review from a team as a code owner December 1, 2026 05:53
@Prashansa-K
Prashansa-K requested a review from Coly010 December 1, 2026 05:53
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

CLI benchmark (Lightweight Commands): no changes found

Commit a5ea5b1 against develop at 00782d7 · 10 runs each · report only, never blocks merging

Command Workload Before After Change
supabase --version version 158 ms 161 ms no real change
supabase --help help 163 ms 160 ms no real change
supabase init init 167 ms 163 ms no real change
supabase migration new bench migration-new 166 ms 165 ms no real change
supabase config convert config-convert 165 ms 166 ms no real change
supabase config validate config-validate 184 ms 184 ms no real change
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 199 ms 202 ms no real change
supabase projects list projects-list 182 ms 182 ms no real change
supabase functions list --project-ref replayfixtureprojref functions-list 184 ms 186 ms no real change

API calls: unchanged for all 9 commands.

Binary size: 135.7 MB, up 12.0 KB from 135.7 MB.

Details: timing ranges, API calls per command, slowest phases

Timing ranges

Command Workload Before range After range Change Verdict
supabase --version version 154-177 ms 155-174 ms +3 ms (+2%) within noise
supabase --help help 159-178 ms 157-168 ms -2 ms (-1%) within noise
supabase init init 160-181 ms 160-175 ms -3 ms (-2%) within noise
supabase migration new bench migration-new 163-209 ms 163-183 ms -1 ms (0%) within noise
supabase config convert config-convert 161-178 ms 163-243 ms +1 ms (+1%) within noise
supabase config validate config-validate 174-278 ms 177-398 ms 0 ms (0%) within noise
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 190-211 ms 191-243 ms +3 ms (+2%) within noise
supabase projects list projects-list 179-189 ms 177-186 ms 0 ms (0%) within noise
supabase functions list --project-ref replayfixtureprojref functions-list 181-190 ms 178-195 ms +3 ms (+2%) within noise

API calls per command

Command Workload Before After Endpoint changes
supabase --version version 0 0
supabase --help help 0 0
supabase init init 0 0
supabase migration new bench migration-new 0 0
supabase config convert config-convert 0 0
supabase config validate config-validate 0 0
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 2 2
supabase projects list projects-list 1 1
supabase functions list --project-ref replayfixtureprojref functions-list 2 2

Slowest phases

No command moved beyond noise, so there are no phase deltas.

Workflow run

Comment /bench to run the lightweight benchmark (this comment) again on the latest commit, or /bench full to also run the integration-heavy benchmark, which posts in its own comment.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Review

CLI reference prose guidance: snapshot supabase/supabase@3dcb524 supplied to reviewers (advisory, not a style pass).

Both independent reviews were available. The most consequential findings concern hosted deployment approval and local readiness. The agent-mode approval error omits the function names, an approved rerun recomputes the deployment and deletion sets, and the readiness probe can succeed before the new runtime is available. The Docker fallback finding is advisory for next. The CLI-reference prose procedure excludes the changed skill content and registry metadata. Static byte counts fit all four topic caps. Unit tests were not run because the checkout lacks installed dependencies.

Findings

Severity Location Category Sources Claim
🟠 MAJOR apps/cli/src/commands/skill/content/functions.md:37 correctness claude The deploy skill misstates what the agent-mode approval error shows. The error includes the target and action counts and omits the names of functions to deploy or delete. With --prune, the user can therefore be asked to approve deletions they have never seen listed.
🟠 MAJOR apps/cli/src/commands/skill/content/functions.md:39 approval-flow codex Keeping the same arguments on the --yes rerun can deploy or delete a different set of functions from the one the user approved.
🟠 MAJOR apps/cli/src/commands/skill/content/functions.md:23 readiness claude+codex The skill's any-HTTP-status readiness check can pass before the new Edge Functions runtime is ready.
🟡 MINOR apps/cli/src/commands/skill/content/functions.md:54 correctness claude The troubleshooting section tells agents to match a telemetry fingerprint and treats an already-active Functions instance as a stopped stack. The same fingerprint also appears in the serving introduction at line 18.
🟡 MINOR apps/cli/src/commands/skill/content/functions.md:18 correctness claude The startup warning says interrupting serve leaves a half-started runtime, even though both backends handle SIGINT and SIGTERM during startup.
🟡 MINOR apps/cli/src/commands/skill/content/functions.md:57 authentication codex The local 401 guidance conflates runtime JWT verification with handler authentication and suggests a hosted change that cannot fix the local invocation.
🟡 MINOR apps/cli/src/commands/skill/content/functions.md:32 secret-handling codex The secrets guidance points agents to an exact-command approval step that can expose a literal secret, while the next line forbids displaying secret values.
🟡 MINOR apps/cli/src/commands/skill/content/functions.md:20 process-lifecycle codex The fallback background command omits the PID needed for the documented graceful stop.
🟡 MINOR apps/cli/src/commands/skill/content/functions.md:64 examples codex The unlabeled examples create the same function twice and place an all-functions API deploy immediately after a single-function deploy.
🟡 MINOR apps/cli/src/commands/skill/content/migrations.md:24 correctness codex The migration skill now asks for another dry run and approval when excluded seed or role files change.
🟡 MINOR apps/cli/src/commands/skill/content/migrations.md:50 command-syntax codex The remote-history troubleshooting step drops the supabase executable from a command the reader is told to run.

Next impact (advisory)

Possible conflicts with work on the next branch. Informational only; this does not affect merging.

  • 🟡 MINOR apps/cli/src/commands/skill/content/functions.md:43 — The unconditional Docker fallback guidance conflicts with next when the caller explicitly requests local bundling.

Stats

Claude findings: 4 · Codex findings: 9 · Confirmed: 12 · Refuted: 0 · Uncertain: 0


Models: claude-opus-5-5 + gpt-6.2-sol · Trigger: auto · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

Prashansa-K and others added 4 commits December 1, 2026 11:33
Correct the deploy consent, prune, 401, serve lifecycle, and stop
guidance in the functions skill topic.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@Coly010 Coly010 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! I traced most of the functions topic back through the code and the bulk of it lines up, which is great given how many claims are in there.

Requesting changes mainly for the --prune wording and the local 401 advice, since agents will follow those literally, and for the overview topic list now that the generated footer is gone. The rest are smaller - feel free to push back on any of them.

One more that didn't fit on a line: the stack backend refuses to serve unless edge_runtime is enabled in config (Enable edge_runtime in ... before serving Functions., serve.stack.handler.ts:209-214). Might be worth adding to the stack startup errors.

Otherwise, looks good to me!

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Prashansa-K
Prashansa-K added this pull request to the merge queue Dec 1, 2026
Merged via the queue into develop with commit d6d2b21 Dec 1, 2026
81 checks passed
@Prashansa-K
Prashansa-K deleted the prashansakulshrestha/cli-3303-add-functions-skill-topic branch December 1, 2026 12:09
@Prashansa-K Prashansa-K self-assigned this Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants