Quick Ref / Command

Marketing Kit

/ak:storage

S3-compatible object storage

S3-compatible object storage helper for marketing assets across Cloudflare R2, AWS S3, MinIO, Backblaze B2, and DigitalOcean Spaces.

01

Identify Operation

02

Check Config

03

Check SDK

04

Choose Provider

Rule 01

Marketing assets can use any S3-compatible backend as long as endpoint, bucket, keys, and region are configured.

Rule 02

The skill returns shareable public URLs when S3_PUBLIC_URL or provider URLs are available.

Rule 03

Fallback behavior is intentional: unconfigured storage should not break local asset workflows.

Rule 04

Credentials are never displayed; use least-privilege bucket-scoped access tokens.

Execution Map

Core lanes from input to output, aligned with the command's real execution path.

01

Start

Input, scope, route

  1. 1 Identify Operation Decide whether the user needs upload, download, list, get public URL, delete, sync, or local-only fallback.
  2. 2 Check Config Look for S3_ENDPOINT, S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY, S3_BUCKET, optional region, and public URL.
02

Work

Agent / skill execution

  1. 3 Check SDK Confirm @aws-sdk/client-s3 is installed; otherwise return configured fallback errors.
  2. 4 Choose Provider Map endpoint shape to Cloudflare R2, AWS S3, MinIO, Backblaze B2, DigitalOcean Spaces, or compatible storage.
03

Verify

Gate, review, validation

  1. 5 Run Client Use s3-client.cjs for upload, download, list, getPublicUrl, or remove operations.
  2. 6 Return URL or Path Return public CDN URL when configured, provider URL when available, or local path only on fallback.
04

Close

Report, handoff, artifact

  1. 7 Handle Failure When not configured, all operations return graceful errors and no exceptions are thrown.

Syntax, arguments, subcommands

How to invoke the skill: syntax, positional arguments, shared options, then each subcommand with its own syntax and outcome.

Syntax

/ak:storage [upload|download|list|sync] [file|path] [--bucket <name>]

Arguments

[file|path]

File or path

Local file, remote object key, or folder path for the selected operation. Required for upload, download, and sync; optional prefix for list.

/ak:storage upload assets/images/launch-hero.png

Shared options

--bucket <name>

Bucket name

Override the configured S3_BUCKET for this operation. Credentials still come from the user .env and are never logged.

/ak:storage list designs/ --bucket campaign-assets

Subcommands

upload Upload
/ak:storage upload [file|path] [--bucket <name>]

Upload one approved local marketing asset. Inspect destination collisions before overwrite.

[file|path]
Local file to upload.
--bucket <name>
Override S3_BUCKET for this upload.

Outcome: PutObject result with a constructed URL or a graceful unconfigured fallback; a URL is not proof of public access.

/ak:storage upload assets/images/launch-hero.png
download Download
/ak:storage download [file|path] [--bucket <name>]

Download one approved remote object to a local path, creating parent directories as needed.

[file|path]
Object key and destination path for the download.
--bucket <name>
Override S3_BUCKET for this download.

Outcome: Local file written from the object bytes, or a missing-key or config error without throwing.

/ak:storage download designs/pricing-deck.html
list List
/ak:storage list [file|path] [--bucket <name>]

List remote keys under an optional prefix. Does not upload, download, or delete objects.

[file|path]
Optional prefix to bound the list.
--bucket <name>
Override S3_BUCKET for this list.

Outcome: Bounded object list for that prefix, or a graceful fallback when credentials or the SDK are missing.

/ak:storage list designs/
sync Sync
/ak:storage sync [file|path] [--bucket <name>]

Sync only the requested local files to remote keys. Does not imply remote deletion or changing public access.

[file|path]
Local folder to sync.
--bucket <name>
Override S3_BUCKET for this sync.

Outcome: Requested objects mapped and uploaded only after collision inspection; missing credentials keep assets local and report that no upload occurred.

/ak:storage sync assets/slides/

Modes / Routes

upload

Upload one approved local asset.

Research:
Config + path
Review:
Secret exposure
Validate:
Upload result
download

Download one approved remote object.

Research:
Object key
Review:
Wrong key
Validate:
Local file
list

List bounded remote keys.

Research:
Prefix
Review:
Overbroad list
Validate:
Object list
sync

Sync requested local files only.

Research:
Folder mapping
Review:
Unexpected writes
Validate:
Requested objects

Sample Prompt

Concrete invocations for each flag, subcommand, mode, or route available in the live workflow.

Default inspect Recommended
/ak:storage
Use when:
You need to resolve the authorized operation, bucket, and whether credentials exist before touching objects.
Expected:
Resolves configuration and SDK presence, reports local-only fallback when unconfigured, and does not invent slash flags beyond upload, download, list, sync, and --bucket.
Upload asset
/ak:storage upload assets/images/launch-hero.png
Use when:
A generated marketing asset should be hosted remotely after approval.
Expected:
Reads the local file, inspects destination collisions, sends PutObject when approved, and returns a constructed URL or a graceful unconfigured fallback instead of throwing.
Download object
/ak:storage download designs/pricing-deck.html
Use when:
One approved remote object should be written to a local path.
Expected:
Creates parent directories, writes the object bytes to the requested local path, and reports a missing-key or config error without crashing.
List prefix
/ak:storage list designs/
Use when:
You need remote asset keys under a prefix without uploading or deleting anything.
Expected:
Lists a bounded object set for that prefix, or a fallback status when credentials or the SDK are missing, without changing public access.
Sync folder
/ak:storage sync assets/slides/
Use when:
A local asset folder should be mirrored for only the requested objects.
Expected:
Maps requested local files to remote keys, inspects collisions, does not delete remote objects, and keeps assets local if credentials are missing.
List with bucket
/ak:storage list designs/ --bucket campaign-assets
Use when:
The list must target a named bucket instead of the default S3_BUCKET.
Expected:
Overrides the bucket for that list only, still loads credentials from the user .env without logging them, and returns a bounded prefix listing or a graceful config error.

Handled Scope

  • S3-compatible storage
  • Cloudflare R2
  • AWS S3
  • MinIO
  • Backblaze B2
  • DigitalOcean Spaces
  • Asset URLs
  • Graceful fallback

Next