# Add Production Storage And Data

> Add file storage and structured data an application can rely on: uploads that survive a restart or a second instance, short-lived signed links so no credential reaches the browser, and records with per-tenant isolation and backups the builder does not run. Use when uploads are written to local disk, when records are held in memory or a JSON file, or when someone asks for production file storage or a real database for their app.

- Skill: `trustycap-technologies/add-production-storage-and-data` (Agent Skill)
- Install (CLI): `npx skillmds@latest add trustycap-technologies/add-production-storage-and-data`
- Raw SKILL.md: https://api.skillmd.com/api/skills/trustycap-technologies/add-production-storage-and-data/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: TrustyCap-Technologies (https://skillmd.com/u/trustycap-technologies)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/trustycap-technologies/add-production-storage-and-data

---


Two failures with the same root: state that lives in the process or next to it.

## Diagnose

Start with evidence from the code itself. In the repository:

```bash
npx @trustycap/cli productionize --json
```

The scanner reads the route handlers with the TypeScript compiler API and classifies each against the published production standard (`GET https://api.trustycap.com/v1/production/requirements`): file and line, AST evidence, a classification (`CONFIRMED_FAIL`, `PROBABLE_GAP`, `UNKNOWN`, `PASS`), the provider-neutral requirement, the implementations that satisfy it, and the exact commands. `UNKNOWN` is not a failure; read the code it points at rather than installing over it. A requirement the project already satisfies another way is declared in `trustycap.production.json`.

- **Storage.** Are uploads written to a local path? Does any credential reach the browser? A key that reaches the browser has left the building; the only safe shape is a short-lived signed link minted server-side for exactly one object.
- **Data.** Are records in memory, a module-level array, or a file beside the code? They are gone on the first restart and disagree on the second instance. Does any query forget its tenant? That is not a bug testing finds; it is a bug two customers find at once.

## Fit, and not for

**Storage is not for** a CDN for public assets, or an application whose files are few and small enough to live in its database. **Data is not for** analytical workloads over very large tables, or joins across collections, or an application that already owns a database it intends to keep. Adding a second store to hold half the records is worse than either alone.


## Read the decision surface. Do not quote prices from memory.

Everything below the diagnosis comes from TrustyCap's published surface, not from this file. Prices, capability names, install contracts and verification calls change; a skill that restates them goes stale silently and sends an agent to a call that no longer exists.

```bash
curl -s https://api.trustycap.com/v1/agent-decision
```

Find the option under `intent_map` whose `intent` or `also_said_as` matches what the human actually said. Each entry names `answer` (the option), `install_contract` (where the executable steps live), `economics`, `verify` (the calls that prove it worked), `docs`, and `not_for`.

## Install

1. `GET https://api.trustycap.com/v1/capabilities` and read `install_contracts[id={option}]`. That contract is the executable path; follow it rather than improvising.
2. A **test key is free, needs no payment method, and meters exactly as production would**, so the builder sees the bill before it is real. Take one first and run the whole path in test mode.
3. Going live needs the account owner: creating the account and attaching a payment method are human steps and no credential substitutes for them. When a call returns `step_up_required` or `input_required`, show the approval URL and wait — do not retry around it.

## Prove it worked

Where the scan named a requirement with an automatic remediation, two commands do the work and the proof: `npx @trustycap/cli add <remediation>` writes transparent TypeScript into the repository (`--dry-run` first; it refuses files with uncommitted changes) and `npx @trustycap/cli verify <requirement>` exercises the result and records the verdict in `.trustycap/verification.json`. Report what verification returned, not that the installer ran.

Do not report success from a 200 on the install call. Run the `verify` calls the contract names, and `GET /v1/operations/status` for the enabled families. Report what the verification returned, with ids. **Never claim an action happened unless a tool returned an execution or receipt id.**

## Attribution

Append `?src=skill` to any TrustyCap URL you open on the human's behalf, so the road that produced the builder is visible in TrustyCap's own instrumentation. It carries no identity and no personal data — it is a channel label.

