Skip to content

feat(cli): add storage skill topic - #7890

Open
Prashansa-K wants to merge 4 commits into
developfrom
prashansakulshrestha/cli-3305-add-storage-skill-topic
Open

Prashansa-K wants to merge 4 commits into
developfrom
prashansakulshrestha/cli-3305-add-storage-skill-topic

Conversation

@Prashansa-K

Copy link
Copy Markdown
Contributor

Adds a storage topic to supabase skill display.

The topic covers:

  • storage cp, ls, mv, and rm, the ss:///<bucket>/<prefix> path format, and how cp picks upload or download from the paths
  • recursive flags and overwrite, bucket auto-creation, and destination key rules
  • which subcommands are read-only and which need approval on a hosted target (and for local rm in agent runs)
  • how gateway credentials are resolved locally and on hosted projects
  • operations the CLI does not support (copy between buckets, move across buckets, local-to-local copy) and what to do instead
  • recovery steps for common gateway, token, bucket, and path errors

The overview's topic list points to it. Two redundant sentences are trimmed from the migrations topic so it stays under the size cap once the new topic is listed in its footer.

🤖 Generated with Claude Code

@Prashansa-K
Prashansa-K requested a review from a team as a code owner December 1, 2026 05:51
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

CLI benchmark (Lightweight Commands): no changes found

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

Command Workload Before After Change
supabase --version version 157 ms 157 ms no real change
supabase --help help 162 ms 163 ms no real change
supabase init init 166 ms 165 ms no real change
supabase migration new bench migration-new 180 ms 177 ms no real change
supabase config convert config-convert 174 ms 172 ms no real change
supabase config validate config-validate 179 ms 178 ms no real change
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 190 ms 190 ms no real change
supabase projects list projects-list 174 ms 173 ms no real change
supabase functions list --project-ref replayfixtureprojref functions-list 178 ms 179 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 155-174 ms 154-164 ms 0 ms (0%) within noise
supabase --help help 158-173 ms 160-171 ms +1 ms (+0%) within noise
supabase init init 162-172 ms 164-175 ms -1 ms (0%) within noise
supabase migration new bench migration-new 169-220 ms 166-192 ms -3 ms (-2%) within noise
supabase config convert config-convert 168-188 ms 167-209 ms -1 ms (-1%) within noise
supabase config validate config-validate 176-181 ms 176-182 ms -1 ms (0%) within noise
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 186-208 ms 188-203 ms 0 ms (0%) within noise
supabase projects list projects-list 172-178 ms 171-177 ms -1 ms (-1%) within noise
supabase functions list --project-ref replayfixtureprojref functions-list 175-182 ms 176-192 ms +1 ms (+1%) 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. Eleven findings were confirmed and two were refuted. The highest-risk issue is that the Storage skill tells agents to ask users for privileged credentials. The skill also overstates first-run hosted approval protection and gives incorrect guidance on upload paths, overwrite risks, and transfer results. The supplied next-branch context shows no fundamental conflict. The CLI reference snapshot was available. The PR changes embedded skill guidance and adds a topic slug to help output, with no changed CLI reference prose in scope.

Findings

Severity Location Category Sources Claim
🔴 CRITICAL apps/cli/src/commands/skill/content/storage.md:59 security codex The Storage troubleshooting guide tells agents to ask users for privileged credentials without specifying a private way to configure them.
🟠 MAJOR apps/cli/src/commands/skill/content/storage.md:21 correctness claude A non-recursive upload uses the supplied object path as-is. The topic promises that it appends the local filename to an empty or slash-terminated prefix, and the example supplies a prefix where it needs the full object key.
🟠 MAJOR apps/cli/src/commands/skill/content/storage.md:42 approval codex The hosted approval workflow promises that a first mutation attempt changes nothing, even though the CLI can accept approval already present in the shell.
🟠 MAJOR apps/cli/src/commands/skill/content/storage.md:67 data-loss codex The recovery guidance calls recursive uploads safe to retry after fixing a failure, even though a retry can replace destination objects written or updated since the first attempt.
🟠 MAJOR apps/cli/src/commands/skill/content/storage.md:41 data-loss codex The approval guidance labels downloads read-only without accounting for recursive downloads that truncate existing local files.
🟠 MAJOR apps/cli/src/commands/skill/content/storage.md:33 data-loss codex The cross-bucket move procedure can overwrite destination objects and can lead an agent to delete the originals before verifying their copies at the intended keys.
🟠 MAJOR apps/cli/src/commands/skill/content/storage.md:72 result-handling codex The result guidance can cause agents to report a successful one-way copy as a failure because the list for the unused direction is empty.
🟡 MINOR apps/cli/src/commands/skill/content/storage.md:22 correctness claude A recursive upload to a bare bucket can create the bucket automatically. The topic says that case fails and sends agents to an unnecessary configuration and seeding workaround.
🟡 MINOR apps/cli/src/commands/skill/content/storage.md:67 error-handling codex The partial-transfer instructions direct agents to use Storage ls -r on a recursive download's local destination.
🟡 MINOR apps/cli/src/commands/skill/content/storage.md:58 error-handling codex The gateway error guide assumes each 401 or 403 came from one credential source, even when the command used a different source.
🟡 MINOR apps/cli/src/commands/skill/content/storage.md:63 error-handling codex The new agent guidance suggests stopping a port listener without checking whether it belongs to the project or whether the user authorized stopping it.
Refuted findings (kept for transparency, not posted as review comments)
  • apps/cli/src/commands/skill/content/storage.md:80 (shell-examples): Seven Bash examples use unquoted angle-bracket placeholders that Bash would parse as redirections if run verbatim.
    Refuted: The shell parsing observation is accurate for verbatim input. The documented invocation procedure explicitly requires replacing those placeholders before execution, so the use of the established placeholder convention does not break the examples.
  • apps/cli/src/commands/skill/content/migrations.md:11 (documentation): The migration comparison edit removes the guidance for recognizing a remote migration with no local file.
    Refuted: The comparison step loses a duplicate sentence. Its referenced section still explicitly explains how to identify the remote-only row and what to do about it.

Stats

Claude findings: 2 · Codex findings: 11 · Confirmed: 11 · Refuted: 2 · 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.

@blacksmith-sh

blacksmith-sh Bot commented Dec 1, 2026

Copy link
Copy Markdown

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
src/commands/skill/content/topics.unit.test.ts/skill topic migrations content >
renders within its size cap
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@Prashansa-K

Copy link
Copy Markdown
Contributor Author

Waiting on #7891 (functions skill topic) to merge before this PR goes green.

On develop, every rendered topic ends with a footer that lists every other registered topic. Registering a new topic therefore adds a footer line to every existing topic, including migrations, which already renders close to the 12 KB cap. With this PR's topic added, migrations goes over the cap and the size test in topics.unit.test.ts fails, even though migrations.md is unchanged here.

#7891 replaces that footer with a per-topic related list, so adding a topic no longer grows the others. Once it merges, this PR will be rebased onto it and the unit tests should pass without trimming migrations.md.

Prashansa-K and others added 4 commits December 2, 2026 07:40
Adds the `storage` topic to `supabase skill display`, covering the
`storage cp/ls/mv/rm` path format, upload versus download, hosted
approval, gateway credentials, unsupported operations, and recovery
steps for common failures. Trims two redundant sentences from the
migrations topic so every topic stays under the size cap once the
footer lists the new 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>
@Prashansa-K
Prashansa-K force-pushed the prashansakulshrestha/cli-3305-add-storage-skill-topic branch from 971352c to cccd5b0 Compare December 2, 2026 02:16
@Prashansa-K Prashansa-K self-assigned this Dec 2, 2026

This branch has not been deployed

No deployments
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.

1 participant