Skip to content

Add file storage skill (S3/R2/GCS) #39

Description

@PAMulligan

Description

Create a new skill that generates file storage integration for Nerva APIs. This provides a unified interface for storing and retrieving files across multiple cloud storage providers.

Why

File storage is a cross-cutting concern that most APIs need. A dedicated skill generates a storage abstraction layer that works with S3, Cloudflare R2, and Google Cloud Storage — letting users switch providers without changing application code.

Acceptance Criteria

  • Create `.claude/skills/file-storage/SKILL.md`
  • Define a storage interface:
    ```typescript
    interface StorageProvider {
    upload(key: string, data: Buffer | ReadableStream, metadata?: Record<string, string>): Promise;
    download(key: string): Promise;
    delete(key: string): Promise;
    getSignedUrl(key: string, expiresIn: number): Promise;
    list(prefix: string): Promise<StorageObject[]>;
    }
    ```
  • Implement providers for:
    • Cloudflare R2 (native Workers integration)
    • AWS S3 (via `@aws-sdk/client-s3`)
    • Local filesystem (development)
  • Generate Zod schemas for upload validation
  • Include presigned URL generation for direct client uploads
  • Add integration tests with mocked storage
  • CI passes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions