aim-attachment-domain

Manage authorized IM attachment uploads and downloads via the AttachmentService gRPC domain.

4|Updated May 17, 2026
One-click install
npx skills add https://github.com/hellopoisonx/aim --skill aim-attachment-domain
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aim-attachment-domain
Source: https://github.com/hellopoisonx/aim/tree/main/skills/aim-attachment-domain
Command: npx skills add https://github.com/hellopoisonx/aim --skill aim-attachment-domain

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the complexity of handling user-uploaded attachments in a multi-service IM system—ensuring only authorized uploads/downloads and correct metadata propagation through internal gRPC boundaries.

Core Features & Use Cases

  • Internal gRPC attachment domain: Provides AttachmentService (not public REST/WS) to gateway via internal calls for upload/download authorization and reference validation.
  • Object storage integration: Creates context-aware SeaweedFS/S3 pre-signed requests, validates stored objects, and writes attachment metadata to PostgreSQL.
  • Media vs file processing rules: Publishes aim.attachment.uploaded for media attachments (image/video/audio) while ordinary file attachments are marked parsed immediately and do not go to data parsing.
  • Correct eventing and trace propagation: Ensures the uploaded event payload includes file_id and carries tracing context to support observability and debugging.

Quick Start

Ask the AI: “Summarize the attachment domain boundaries, gRPC contract change rules, and the media-upload event behavior for aim.attachment.uploaded in this repository.”

Frequently Asked Questions about aim-attachment-domain

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I securely manage message attachment uploads and downloads across internal gRPC services?

Securely managing message attachment uploads and downloads across internal gRPC services requires implementing an AttachmentService domain that handles authorization, object storage signing, and metadata persistence. It validates references and enforces strict boundary rules.

How do I generate pre-signed S3 requests for SeaweedFS with tracing context?

Generating pre-signed S3 requests for SeaweedFS with tracing context involves creating context-aware object storage requests within the attachment domain. This ensures upload operations carry observability data for debugging while maintaining strict authorization boundaries across internal services.

How does IM attachment media processing differ from ordinary file uploads?

IM attachment media processing differs from ordinary file uploads because media attachments (image/video/audio) trigger an `aim.attachment.uploaded` event containing a file_id for downstream data parsing, while ordinary files are marked parsed immediately and skip parsing entirely.

How are attachment metadata and object storage validations persisted in PostgreSQL?

Attachment metadata and object storage validations are persisted in PostgreSQL by writing metadata records after validating stored objects against context-aware signed requests. This ensures only authorized and correctly stored attachments have persisted reference data available for gateway validation.

Why do my internal gateway attachment calls fail with incorrect error mapping?

Internal gateway attachment calls fail with incorrect error mapping when the gRPC domain does not use errorx codes for boundary violations. Correct attachment domain implementation requires mapping storage and authorization failures to specific errorx codes for consistent gateway handling.