Truss: Skill for Codex

.skills/truss-storage-layer/SKILL.md

truss-storage-layer is a skill for Codex from truss-harness/Truss. It costs 87 tokens per session (664 once invoked), scanned A, original, Apache-2.0.

A set of instructions for changing Truss's stored data and configuration, including its SQLite database, provider settings, model profiles, and agent sessions. Truss is an application that connects coding agents to AI providers.

In plain words
What is it for?
Use it when editing storage code, configuration, settings APIs, database migrations, or features that save provider, model, or agent-session data.
Why use it?
It prevents sensitive keys from being stored in the database or sent to the browser, and keeps database changes and session history consistent. It also avoids confusing an AI provider with the specific model it supplies.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions subagents.

This is truss-harness/Truss's own configuration. It tells Codex how to work on Truss itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Truss configures →

Reuse

Borrowing it

Nothing to install: this file belongs to truss-harness/Truss. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/truss-harness/Truss/master/.skills/truss-storage-layer/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/truss-harness/Truss

Made for: Codex.

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 truss-storage-layer

README.md
[![agentmods](https://agentmods.dev/badge/skills/truss-harness/truss/truss-storage-layer/github.svg)](https://agentmods.dev/skills/truss-harness/truss/truss-storage-layer)
Your own site
<a href="https://agentmods.dev/skills/truss-harness/truss/truss-storage-layer"><img src="https://agentmods.dev/badge/skills/truss-harness/truss/truss-storage-layer/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 truss-storage-layer

Your own site · 80×15
<a href="https://agentmods.dev/skills/truss-harness/truss/truss-storage-layer"><img src="https://agentmods.dev/badge/skills/truss-harness/truss/truss-storage-layer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 664 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.
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.00087 $0.00664
Opus 5 $0.00044 $0.00332
Sonnet 5 $0.00017 $0.00133
Haiku 4.5 $0.00009 $0.00066

Measured 9d ago against content hash 03354545641d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

truss-storage-layer 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 9d 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.

.skills/truss-storage-layer/SKILL.md · 44 lines

How it starts

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

Truss Storage Layer

Use this skill before changing Truss persistence, configuration, or settings APIs.

Core Rules

  • Keep secrets out of SQLite. Provider API keys belong in the dotenvx-backed ~/.truss/.env; private key material belongs in ~/.truss/.env.keys.
  • Access SQLite through repository modules in src/server/storage/**. Do not write SQL directly in agents, route handlers, or UI code.
  • Put schema changes in src/server/storage/migrations.ts as a new numbered migration. Do not edit already-applied migration SQL unless the existing migration is known to be unreleased and disposable.
  • Keep protocol payloads sanitized. Never return API keys, OAuth tokens, dotenvx values, or raw process env values to the frontend.
  • Keep provider/model identity explicit as providerId plus modelId; do not serialize provider/model as one ambiguous string.
  • Snapshot provider/model/generation parameters into agent_sessions when a session is created. Later profile changes should not silently rewrite historical session metadata.
  • Enforce sub-agent hierarchy through storage constraints: only sub-agent sessions have parentSessionId, and they must have one.
  • Keep agentic tool turn limit settings on the rich_feature_settings singleton: agentic_tool_turn_limit_enabled and agentic_tool_turn_limit, defaulting to enabled and 300.

Workflow

  1. Read docs/database-schema.md before changing tables, indexes, or repository query patterns.
  2. Search repository methods for the affected tables before deciding on columns or indexes.
  3. Add or update migration SQL, then update the matching repository module.
  4. Update src/shared/protocol.ts only with sanitized fields needed by browser/API clients.
  5. Update HTTP route validation before accepting new browser-provided fields.
  6. Update docs/database-schema.md when schema, constraints, indexes, or query patterns change.
  7. Validate with bun run check; for schema/index work, also create a temporary SQLite DB and inspect PRAGMA index_list(...).

Read the full file on GitHub · 44 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 44 lines · 87 tokens per session scan A 03354545641d

Subscribe to this mod's changes

truss-storage-layer is a skill published in the GitHub repository truss-harness/Truss (5 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 87 tokens to every session and 664 once invoked, about $0.0004 per session on Opus 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-31.