attachment

attachment is a skill for Claude Code from filipebraida/adonisjs-starter-kit. It costs 151 tokens per session (1,817 once invoked), scanned A, original, MIT.

An upload pattern for AdonisJS applications, a web framework for Node.js. It stores uploaded files and can create related versions such as thumbnails or WebP images.

In plain words
What is it for?
It helps add upload fields to data models, configure image variants, accept files from forms, store them locally or in S3-compatible storage, and expose their URLs.
Why use it?
It removes the repeated work of handling file storage, resized images, alternate formats, and usable file URLs.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit It helps add upload fields to data models, configure image variants, accept files from forms, store them locally or in S3-compatible storage, and expose their URLs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/filipebraida/adonisjs-starter-kit/attachment
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add filipebraida/adonisjs-starter-kit --skill attachment
Clone the repo
git clone --depth 1 https://github.com/filipebraida/adonisjs-starter-kit

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for attachment

README.md
[![agentmods](https://agentmods.dev/badge/skills/filipebraida/adonisjs-starter-kit/attachment/github.svg)](https://agentmods.dev/skills/filipebraida/adonisjs-starter-kit/attachment)
Your own site
<a href="https://agentmods.dev/skills/filipebraida/adonisjs-starter-kit/attachment"><img src="https://agentmods.dev/badge/skills/filipebraida/adonisjs-starter-kit/attachment/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for attachment

Your own site · 80×15
<a href="https://agentmods.dev/skills/filipebraida/adonisjs-starter-kit/attachment"><img src="https://agentmods.dev/badge/skills/filipebraida/adonisjs-starter-kit/attachment.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 151 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,817 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00151 $0.01817
Opus 5.5 $0.00060 $0.00727
Sonnet 5.5 $0.00030 $0.00363
Haiku 4.5 $0.00015 $0.00182

Measured 12d ago against content hash 05d64f5abe3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

attachment scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/skills/attachment/SKILL.md · 93 lines

How it starts

The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Attachment

File uploads are managed by @jrmc/adonis-attachment v6, on top of Drive. The file is not a model column: it lives in the package's own tables (adonis_attachments holds each file and its variants, adonis_attachment_links links a file to the row that owns it, both created by core's create_adonis_attachments_table migration). The model declares a relation with @attachment({...}); an action turns the validated MultipartFile into a draft and stages it on the relation; saving the owner writes the file. Derived variants (thumbnails, formats) come from named converters in config/attachment.ts and are made in the package's queue after the commit, outside the request. The package ships its own skills in apps/web/node_modules/@jrmc/adonis-attachment/skills/: read them before going beyond this page, the v6 API is not v5's.

Rules

  • Relation on the model, from /lucid, typed AttachmentRelation:
    import { attachment, type AttachmentRelation } from '@jrmc/adonis-attachment/lucid'
    
    @attachment<User>({ folder: 'avatars', variants: ['thumbnail'], meta: false })
    declare avatar: AttachmentRelation
    
    No column and no migration for the field: the link table carries it. meta: false keeps EXIF (which can hold a location) out of the database.
  • Converters live in config/attachment.ts as a keyed record (thumbnail: { resize: 300, format: 'webp' }). The names in variants: [...] reference those keys; the declare module '@jrmc/adonis-attachment' block at the end of the config types them.
  • Validate uploads with VineJS vine.file({...}), always with extnames and size:
    avatar: vine.file({ extnames: ['png', 'jpg', 'jpeg', 'gif'], size: 1 * 1024 * 1024 }).nullable()
    
  • Write inside an action ([[actions-events]]): createFrom* returns a draft, nothing reaches the disk before the owner's save():
    if (input.avatar) {
      input.target.avatar.set(await attachmentManager.createFromFile(input.avatar))
    }
    await input.target.save()
    
    From a buffer, pass originalName and mimeType. detach() + save() removes it; the old file is deleted after the commit.
  • Read the URL before serializing: getUrl is async, and a transformer is not. The model's static helper resolves it into a plain property, and the controller calls it on the loaded rows before the transformer runs:
    await User.preComputeUrls(users) // sets user.avatarThumbnailUrl
    return inertia.render('users/index', {
      users: UserTransformer.paginate(users, meta).useVariant('forList'),
    })
    
    The helper asks avatar.getUrl('thumbnail', { fallback: 'original' }): the thumbnail may not exist yet (the queue makes it after the commit) or ever (the memory queue loses what was pending at a restart), and the original stands in.
  • Fallback URL: the transformer resolves avatarThumbnailUrl ?? avatarUrl, so the picture a social login brought shows while nothing was uploaded.
  • Drive config picks the disk (fs, s3, …) through DRIVE_DISK; storage: storage.drive() in config/attachment.ts uses its default disk.

Read the full file on GitHub · 93 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago Changed · -20 lines · +44 tokens per session 05d64f5abe3a
  2. 20d ago Changed 535f06339c02
  3. 3mo ago First seen · 113 lines · 107 tokens per session scan A 82d51126a0dc

Subscribe to this mod's changes

attachment is a skill published in the GitHub repository filipebraida/adonisjs-starter-kit (99 stars, last pushed 6d ago), licensed MIT. It adds 151 tokens to every session and 1,817 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

attachment compared with skills from other repositories

attachment next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
attachmentfilipebraida/adonisjs-starter-kitSkill996d agoMITA151Claude Code
calendarcnvmnog/calendarcnSkill1685d agoMITA76Claude Code, Codex
ui-beatsnikhils4/ui-beatsSkill2363mo agoMITA62Claude Code, Codex
declare-typesone-ie/oneSkill1353d agononeA49Claude Code, Codex
sdkone-ie/oneSkill1353d agononeA34Claude Code
react-doctorshipkit-io/bonesSkill213d agononeA31Claude Code, Codex
auth-setupfirtoz/cf-multiworker-starter-kitSkill121mo agononeA39Claude Code, Codex