Agent skill

File Processor

by FerroxLabs in FerroxLabs/wayland

File processing pipeline expertise covering upload handling (multipart, streaming, resumable), virus scanning, image processing, PDF generation, storage backends, presigned URLs, and file type…

Apache-2.0Auto-check passedBackend & APIs

Install File Processor

skills CLI
$ npx skills add FerroxLabs/wayland --skill file-processor -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install FerroxLabs/wayland file-processor --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/FerroxLabs/wayland.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/process/resources/skills-library/bodies/skills/backend-systems/file-processor .claude/skills/file-processor && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
file-processor
GitHub stars
608
Token cost
~3.2k tokens
SKILL.md length
377 words
Files
1
Skills in repo
1,194
Repo updated
First seen
Licence
Apache-2.0

At a glance

File processing pipeline expertise covering upload handling (multipart, streaming, resumable), virus scanning, image processing, PDF generation, storage backends, presigned URLs, and file type…

  • The user asks about file processor
  • SKILL.md covers Purpose, Upload Strategy Selection, Multipart Upload Handling and Presigned URL Upload, plus 14 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • File processor best practices

What it does

File Processor is an agent skill from FerroxLabs/wayland. File processing pipeline expertise covering upload handling (multipart, streaming, resumable), virus scanning, image processing, PDF generation, storage backends, presigned URLs, and file type validation. Use when the user asks about file processor, file processor best practices, or needs guidance on file processor implementation. Do NOT use when the user needs a different specialized skill or is asking about an unrelated technology domain.

Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering File uploads and storage and PDF. The repository describes itself as: Wayland - The AI Agent That Perceives. Reasons. Acts. Evolves. The licence is Apache-2.0.

When your agent uses it

  • The user asks about file processor
  • File processor best practices
  • Needs guidance on file processor implementation
  • The user needs a different specialized skill

Example prompts

  • “/file-processor”

What it can do on your machine

Read from SKILL.md and the folder at commit 4c030c7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript and markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

File Processor loads about 3.2k tokens when it runs. Until then it costs about 115 tokens; SKILL.md has 377 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~115
When it runs · the whole SKILL.md, loaded when a task matches
~3.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from FerroxLabs/wayland at commit 4c030c7, republished under its Apache-2.0 licence (© FerroxLabs). 377 words, ~3,176 tokens.

Download SKILL.mdSave it as .claude/skills/file-processor/SKILL.md (or your agent's skills folder).
name
file-processor
description
File processing pipeline expertise covering upload handling (multipart, streaming, resumable), virus scanning, image processing, PDF generation, storage backends, presigned URLs, and file type validation. Use when the user asks about file processor, file processor best practices, or needs guidance on file processor implementation. Do NOT use when the user needs a different specialized skill or is asking about an unrelated technology domain.
license
Apache-2.0
metadata.author
foundry-skills
metadata.version
1.0.0
metadata.tags
backend api-design guide
metadata.category
backend-systems
metadata.subcategory
server-infrastructure
metadata.disclaimer
none
metadata.difficulty
intermediate

File Processor

Purpose

Design and implement robust file processing pipelines that handle upload, validation, processing, storage, and delivery. This skill covers upload strategies, security considerations, media processing, cloud storage patterns, and production operational concerns.

Upload Strategy Selection

Decision Matrix
SCENARIO                          STRATEGY
------------------------------------------------------
Small files (<10MB)               Multipart form upload
Large files (>10MB)               Presigned URL (direct-to-storage)
Very large files (>1GB)           Resumable upload (tus protocol)
Multiple small files              Batch multipart
Sensitive files                   Server-side upload (no direct)
User avatars/profile images       Multipart + server processing
Video uploads                     Resumable + async processing
API file attachments              Base64 in JSON (small) or multipart

PRESIGNED URL FLOW (recommended for large files):
  1. Client requests upload URL from API
  2. API generates presigned URL (S3, GCS, Azure)
  3. Client uploads directly to storage
  4. Storage notifies API (webhook or client confirms)
  5. API processes file (resize, scan, etc.)

Multipart Upload Handling

ts
import multer from 'multer';
import path from 'path';

// Configuration
const upload = multer({
  storage: multer.memoryStorage(),
  limits: {
    fileSize: 10 * 1024 * 1024,    // 10MB max
    files: 5,                       // Max 5 files per request
    fields: 10,                     // Max 10 non-file fields
  },
  fileFilter: (req, file, cb) => {
    const allowedTypes = [
      'image/jpeg', 'image/png', 'image/webp', 'image/gif',
      # ... (condensed) ...
    } catch (error) {
      res.status(422).json({ error: error.message });
    }
  }
);

Presigned URL Upload

ts
import { S3Client, PutObjectCommand, HeadObjectCommand } from '@aws-sdk/client-s3';
import { getSignedUrl } from '@aws-sdk/s3-request-presigner';

const s3 = new S3Client({ region: ENV_CONFIG_VALUE });

// Generate presigned upload URL
app.post('/api/upload/presign', authenticate, async (req, res) => {
  const { filename, contentType, size } = req.body;

  // Validate before generating URL
  if (size > 100 * 1024 * 1024) {
    return res.status(400).json({ error: 'File too large (max 100MB)' });
  }

  # ... (condensed) ...

  await db.uploads.update({ where: { id: upload.id }, data: { status: 'processing' } });

  res.json({ status: 'processing' });
});

Resumable Upload (tus Protocol)

ts
import { Server as TusServer } from '@tus/server';
import { S3Store } from '@tus/s3-store';

const tusServer = new TusServer({
  path: '/api/upload/resumable',
  datastore: new S3Store({
    s3ClientConfig: {
      region: ENV_CONFIG_VALUE,
    },
    bucket: ENV_CONFIG_VALUE!,
    partSize: 8 * 1024 * 1024,
  }),
  maxSize: 5 * 1024 * 1024 * 1024, // 5GB max
  onUploadCreate: async (req, res, upload) => {
    # ... (condensed) ...
    return res;
  },
});

app.all('/api/upload/resumable/*', (req, res) => tusServer.handle(req, res));

File Type Validation

Content-Based Validation (Not Extension)
ts
import { fileTypeFromBuffer } from 'file-type';

async function validateFileContent(file: { buffer: Buffer; mimetype: string }): Promise<void> {
  // Check magic bytes (actual file content)
  const detected = await fileTypeFromBuffer(file.buffer);

  if (!detected) {
    throw new Error('Unable to determine file type');
  }

  const allowedMimeTypes: Record<string, string[]> = {
    'image/jpeg': ['jpg', 'jpeg'],
    'image/png':  ['png'],
    'image/webp': ['webp'],
    # ... (condensed) ...
  const pixels = (metadata.width ?? 0) * (metadata.height ?? 0);
  if (pixels > 100_000_000) {
    throw new Error('Image too large (decompression bomb protection)');
  }
}

Virus Scanning

ts
import NodeClam from 'clamscan';

const clam = await new NodeClam().init({
  clamdscan: {
    socket: '/var/run/clamav/clamd.ctl',
    timeout: 60000,
    multiscan: true,
  },
  preference: 'clamdscan',
});

async function scanBuffer(buffer: Buffer): Promise<{ clean: boolean; virus?: string }> {
  try {
    const { Readable } = await import('stream');
    # ... (condensed) ...
  }

  // 3. Process and store
  return await storeFile(file);
}

Image Processing (Sharp)

ts
import sharp from 'sharp';

// Generate multiple image sizes
async function processImage(
  input: Buffer,
  options: { maxWidth?: number; maxHeight?: number; quality?: number; format?: 'webp' | 'avif' }
): Promise<ProcessedImage> {
  const { quality = 80, format = 'webp' } = options;

  const sizes = [
    { name: 'thumbnail', width: 200, height: 200, fit: 'cover' as const },
    { name: 'small', width: 400, height: 400, fit: 'inside' as const },
    { name: 'medium', width: 800, height: 800, fit: 'inside' as const },
    { name: 'large', width: 1600, height: 1600, fit: 'inside' as const },
  # ... (condensed) ...
  return sharp(input)
    .rotate()  // Auto-rotate based on EXIF before stripping
    .withMetadata({ orientation: undefined })
    .toBuffer();
}

PDF Generation

ts
import PDFDocument from 'pdfkit';

async function generateInvoicePDF(invoice: Invoice): Promise<Buffer> {
  return new Promise((resolve, reject) => {
    const doc = new PDFDocument({ margin: 50 });
    const chunks: Buffer[] = [];

    doc.on('data', (chunk: Buffer) => chunks.push(chunk));
    doc.on('end', () => resolve(Buffer.concat(chunks)));
    doc.on('error', reject);

    // Header
    doc.fontSize(24).text('INVOICE', { align: 'right' });
    doc.fontSize(10).text(`Invoice #${invoice.number}`, { align: 'right' });
    # ... (condensed) ...
    doc.text(formatCurrency(invoice.total), 460, y + 15);

    doc.end();
  });
}

Storage Backends

S3-Compatible Storage
ts
import { S3Client, PutObjectCommand, GetObjectCommand, DeleteObjectCommand } from '@aws-sdk/client-s3';
import { getSignedUrl } from '@aws-sdk/s3-request-presigner';

class FileStorage {
  private s3: S3Client;
  private bucket: string;

  constructor() {
    this.s3 = new S3Client({ region: ENV_CONFIG_VALUE });
    this.bucket = ENV_CONFIG_VALUE!;
  }

  async upload(key: string, buffer: Buffer, contentType: string): Promise<string> {
    await this.s3.send(new PutObjectCommand({
      # ... (condensed) ...
      Bucket: this.bucket,
      Key: key,
    }));
  }
}
Storage Key Strategy
KEY STRUCTURE:
  {type}/{user_id}/{year}/{month}/{file_id}{extension}
  Example: avatars/usr_abc123/2025/01/f7a9b3c4.webp

  uploads/{user_id}/{file_id}/{variant}.{format}
  Example: uploads/usr_abc123/f7a9b3c4/thumbnail.webp
           uploads/usr_abc123/f7a9b3c4/medium.webp
           uploads/usr_abc123/f7a9b3c4/original.webp

RULES:
  - NEVER use original filename in storage key (security)
  - Generate unique IDs (UUID, ULID)
  - Include user ID for access control and cleanup
  - Date-based prefix helps with S3 partitioning
  - Keep extensions for CDN content-type detection

CDN Integration

ts
class CDNService {
  private readonly cdnDomain = ENV_CONFIG_VALUE;

  getPublicUrl(key: string): string {
    return `[reference URL]
  }

  // Image transformation via CDN (Cloudflare, Imgix, etc.)
  getImageUrl(key: string, transforms: ImageTransform): string {
    const params = new URLSearchParams();
    if (transforms.width) params.set('w', String(transforms.width));
    if (transforms.height) params.set('h', String(transforms.height));
    if (transforms.quality) params.set('q', String(transforms.quality));
    if (transforms.format) params.set('f', transforms.format);
    params.set('fit', transforms.fit ?? 'cover');

    return `[reference URL])}/${key}`;
  }
}

File Processing Pipeline

ts
import { Queue, Worker } from 'bullmq';

const processingQueue = new Queue('file-processing');

const worker = new Worker('file-processing', async (job) => {
  const { uploadId, key, contentType } = job.data;

  // 1. Download from storage
  const fileBuffer = await storage.download(key);

  // 2. Virus scan
  await job.updateProgress(10);
  const scanResult = await scanBuffer(fileBuffer);
  if (!scanResult.clean) {
    # ... (condensed) ...
    await alerting.notify(`File processing permanently failed: ${job.data.uploadId}`, {
      error: error.message,
    });
  }
});

Cleanup and Lifecycle

ts
// Clean up orphaned uploads (pending > 24 hours)
async function cleanupOrphanedUploads() {
  const cutoff = new Date(Date.now() - 24 * 60 * 60 * 1000);

  const orphans = await db.uploads.findMany({
    where: { status: 'pending', createdAt: { lt: cutoff } },
  });

  for (const upload of orphans) {
    try {
      await storage.remove(upload.key);
    } catch {
      // File may not exist, that is fine
    }
    # ... (condensed) ...

// S3 lifecycle policy (set via AWS console or Terraform)
// - Move to Glacier after 90 days
// - Delete incomplete multipart uploads after 7 days
// - Delete expired presigned upload objects after 1 day

File Processing Checklist

  • Upload strategy selected (multipart, presigned URL, resumable)
  • File size limits enforced (client-side and server-side)
  • File type validated by content (magic bytes), not just extension
  • Virus scanning integrated into processing pipeline
  • Image decompression bomb protection implemented
  • Images processed into multiple sizes/formats (WebP/AVIF)
  • EXIF metadata stripped for privacy
  • Storage keys use random IDs (never user-provided filenames)
  • Presigned URLs have appropriate expiration times
  • CDN configured for file delivery with cache headers
  • Processing pipeline runs asynchronously (queue-based)
  • Failed processing triggers alerts and retry
  • File cleanup job handles orphaned uploads
  • Storage lifecycle policies configured for cost optimization
  • Access control verified before file delivery

When to Use

Use this skill when:

  • Designing or implementing file processor solutions
  • Reviewing or improving existing file processor approaches
  • Making architectural or implementation decisions about file processor
  • Learning file processor patterns and best practices
  • Troubleshooting file processor-related issues

Do NOT use this skill when:

  • The question is about a fundamentally different technology domain
  • A more specific sibling skill covers the exact topic needed
  • The user needs a complete hands-on tutorial rather than expert guidance
Show full SKILL.md (123 more words)Show less

Output Format

markdown
# File Processor Analysis

## Context Assessment
[Situation summary and constraints]

## Recommended Approach
[Primary recommendation with rationale]

## Implementation Steps
1. [Step with specific details]
2. [Step with specific details]
3. [Step with specific details]

## Trade-offs and Considerations
- [Key trade-off 1]
- [Key trade-off 2]

## Next Steps
- [Immediate action item]
- [Follow-up action item]

Example

Input: "Help me implement file processor for a medium-scale production application"

Output: A structured analysis covering current state assessment, recommended file processor approach with specific patterns, implementation roadmap with milestones, and risk mitigation strategies tailored to the application scale and constraints.

Edge Cases

  • Legacy system integration: When file processor must coexist with legacy approaches, provide a gradual migration path rather than a complete rewrite
  • Scale mismatch: When the solution complexity exceeds the project scale, recommend a simpler approach and note when to revisit
  • Team skill gaps: When the team lacks experience with the recommended approach, include learning resources and simpler alternatives
  • Conflicting requirements: When constraints conflict (e.g., performance vs. maintainability), explicitly state the trade-off and recommend based on stated priorities

© FerroxLabs, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in src/process/resources/skills-library/bodies/skills/backend-systems/file-processor of FerroxLabs/wayland.

Open the folder on GitHubat commit 4c030c7

Compare with similar skills

File Processor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

File Processor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
File Processor this skillFerroxLabs/wayland608—~3.2kAutomated safety check: PassApache-2.0
Edit PDFSimplePDF/simplepdf-embed407—~1.5kAutomated safety check: PassMIT
PDF Vue3hymhub/pdf-vue3123—~1kAutomated safety check: PassMIT
Managing Mediaancoleman/ai-design-components526—~3.3kAutomated safety check: PassMIT
Adu Targeted Page ViewermikeOnBreeze/cc-crossbeam293—~1.8kAutomated safety check: PassMIT
Guidesmicronaut-projects/micronaut-openapi114—~1.9kAutomated safety check: NotesApache-2.0

Similar skills

  • Edit PDF

    SimplePDF/simplepdf-embed

    Edit and fill PDF documents. An agent skill from SimplePDF/simplepdf-embed.

    407 GitHub stars~1.5k tokensUpdated 7 days ago
    Documents & OfficeAuto-check passed
  • PDF Vue3

    hymhub/pdf-vue3

    Use the pdf-vue3 Vue 3 component to render PDFs (URL, base64, or Uint8Array) with built-in virtual scrolling, crisp zoom, print, download, and page navigation.

    123 GitHub stars~1k tokensUpdated 4 mo ago
    Documents & OfficeAuto-check passed
  • Managing Media

    ancoleman/ai-design-components

    Implements media and file management components including file upload (drag-drop, multi-file, resumable), image galleries (lightbox, carousel, masonry), video players (custom controls, captions…

    526 GitHub stars~3.3k tokensUpdated 10 mo ago
    Frontend & DesignAuto-check passed
  • Adu Targeted Page Viewer

    mikeOnBreeze/cc-crossbeam

    Extracts construction plan PDFs into page PNGs, reads the sheet index to build a sheet-to-page manifest, and enables targeted viewing of specific sheets.

    293 GitHub stars~1.8k tokensUpdated 7 mo ago
    Documents & OfficeAuto-check passed
  • Guides

    micronaut-projects/micronaut-openapi

    Create or update standalone Micronaut Guides in micronaut-projects/micronaut-guides, including topic discovery, guide authoring, validation, PDF export, and pull request handoff.

    114 GitHub stars~1.9k tokensUpdated yesterday
    Backend & APIsAuto-check: notes
  • Component Markdown Input Field

    antdigital-ai/agentic-ui

    Develop MarkdownInputField and attachments, voice, send actions in @ant-design/agentic-ui.

    224 GitHub stars~235 tokensUpdated yesterday
    Backend & APIsAuto-check passed

More from FerroxLabs/wayland

All 1,194 skills in this repo
  • Star Office Helper

    FerroxLabs/wayland

    Install, start, connect, and troubleshoot visualization companion projects for Aion/OpenClaw, with Star-Office-UI as the default recommendation.

    608 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check: notes
  • Openclaw Setup

    FerroxLabs/wayland

    OpenClaw usage expert: Helps you install, deploy, configure, and use OpenClaw personal AI assistant.

    608 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Tvcontrol Setup

    FerroxLabs/wayland

    Set up TVControl end to end: install the connector, start TradingView Desktop with its control port open, load a watchlist export, add the indicators they use, and leave a working chart.

    608 GitHub stars~5.7k tokensUpdated yesterday
    Auto-check passed
  • Ab Testing Specialist

    FerroxLabs/wayland

    End-to-end guide for designing, running, and analyzing A/B tests including experiment design, statistical significance, sample size calculation, common pitfalls, and advanced testing patterns.

    608 GitHub stars~3.7k tokensUpdated yesterday
    Auto-check passed
  • Academic Writer

    FerroxLabs/wayland

    Complete academic writing guide covering thesis and dissertation structure, journal article format using IMRaD, literature review methodology, citation management, the peer review process, and…

    608 GitHub stars~4.5k tokensUpdated yesterday
    Auto-check passed
  • Accessibility Auditor

    FerroxLabs/wayland

    Web accessibility expertise covering WCAG 2.2 conformance, audit methodology, ARIA patterns, keyboard navigation, screen reader testing, focus management, form accessibility, and automated vs manual…

    608 GitHub stars~4.1k tokensUpdated yesterday
    Auto-check passed

Questions about File Processor

What does File Processor do?

File processing pipeline expertise covering upload handling (multipart, streaming, resumable), virus scanning, image processing, PDF generation, storage backends, presigned URLs, and file type…. File Processor is an agent skill from FerroxLabs/wayland. File processing pipeline expertise covering upload handling (multipart, streaming, resumable), virus scanning, image processing, PDF generation, storage backends, presigned URLs, and file type validation.

When should I use File Processor?

File Processor fits situations like: the user asks about file processor; file processor best practices; needs guidance on file processor implementation; the user needs a different specialized skill.

How do I install File Processor in Claude Code?

Run `npx skills add FerroxLabs/wayland --skill file-processor -a claude-code`. Or copy the skill folder (src/process/resources/skills-library/bodies/skills/backend-systems/file-processor in FerroxLabs/wayland) into .claude/skills/file-processor in your project. Claude Code loads it when a task matches its description.

How do I install File Processor in Codex?

Run `npx skills add FerroxLabs/wayland --skill file-processor -a codex`. Or copy the skill folder (src/process/resources/skills-library/bodies/skills/backend-systems/file-processor in FerroxLabs/wayland) into .agents/skills/file-processor in your project. Codex loads it when a task matches its description.

Can I use File Processor in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add FerroxLabs/wayland --skill file-processor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/file-processor, .gemini/skills/file-processor, .github/skills/file-processor and .opencode/skills/file-processor in your project.

What does File Processor need to run?

SKILL.md names no scripts, command-line tools or credentials: File Processor is instructions for the agent only.

Does File Processor access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is File Processor safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does File Processor use?

File Processor is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does File Processor use?

About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to File Processor?

Skills that share tags, products or a category with File Processor: Edit PDF (SimplePDF/simplepdf-embed, 407 stars), PDF Vue3 (hymhub/pdf-vue3, 123 stars), Managing Media (ancoleman/ai-design-components, 526 stars) and Adu Targeted Page Viewer (mikeOnBreeze/cc-crossbeam, 293 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains File Processor?

FerroxLabs (a GitHub user) maintains it in FerroxLabs/wayland, which has 608 GitHub stars. The repository holds 1,194 skills in this directory. The repository was last updated on October 6, 2026.

Source: FerroxLabs/wayland on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.