smithery/seanchiuai

file-upload

File upload, parsing (PDF, PPTX, DOCX, ODT, HTML, MD), and Convex storage for lesson materials

Installation

$ npx skills add smithery/seanchiuai --skill file-upload

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/seanchiuai.

npx skills add smithery/seanchiuai

Browse all from smithery/seanchiuai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,410 B
  • docs SUMMARY.md 98 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

File Upload

Handles uploading lesson materials and extracting text content for AI processing. Supports multiple file formats via drag-and-drop, plus direct text paste as a fallback.

Overview

  • Upload: Drag-and-drop or click to select files
  • Storage: Files stored in Convex file storage via presigned URL pattern
  • Parsing: Extract text from various formats in a Convex action with image preservation
  • Fallback: Text paste/type for when file upload isn't needed

When to Use This Skill

  • Building the file upload UI component
  • Implementing file parsing logic
  • Setting up Convex file storage
  • Handling file type validation and errors

Key Concepts

Supported Formats

Format Extension Parsing Library Notes
PDF .pdf pdf-parse Text extraction
Word .docx mammoth HTML + images as base64
PowerPoint .pptx jszip XML text extraction
OpenDocument .odt officeparser Full AST parsing
HTML .html, .htm Built-in Sanitized, scripts removed
Markdown .md Built-in Converted to HTML
Plain text .txt N/A Direct read
RTF .rtf Built-in Formatting stripped

Upload Flow (Convex 3-Step Pattern)

  1. Client calls generateUploadUrl mutation → gets short-lived presigned URL
  2. Client POSTs file to that URL with Content-Type header → gets { storageId } in response
  3. Client passes storageId to a Convex action for parsing, or stores it in a document

From Convex docs: ctx.storage.generateUploadUrl() returns a Promise<string>. The POST response JSON contains { storageId: Id<"_storage"> }.

File Reading in Actions

  • ctx.storage.get(storageId) returns Blob | null in actions
  • ctx.storage.getUrl(storageId) returns string | null in queries/mutations (public URL)
  • Use dynamic import() (not require()) for parsing libraries in Convex actions

File Size Limits

  • Max file: 10MB (reasonable for lesson materials)
  • Client-side validation before upload attempt

Related Files

  • convex/files.ts — Upload URL generation, file parsing action
  • Homepage upload component

Reference Files

  • [reference.md](reference.md) — Upload and parsing code examples