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.
npx skills add Cratis/AI --skill cratis-arc-storage-typescriptgit clone --depth 1 https://github.com/Cratis/AIWrote 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.
[](https://agentmods.dev/skills/cratis/ai/cratis-arc-storage-typescript)<a href="https://agentmods.dev/skills/cratis/ai/cratis-arc-storage-typescript"><img src="https://agentmods.dev/badge/skills/cratis/ai/cratis-arc-storage-typescript/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.
<a href="https://agentmods.dev/skills/cratis/ai/cratis-arc-storage-typescript"><img src="https://agentmods.dev/badge/skills/cratis/ai/cratis-arc-storage-typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00047 | $0.01357 |
| Opus 5.5 | $0.00019 | $0.00543 |
| Sonnet 5.5 | $0.00009 | $0.00271 |
| Haiku 4.5 | $0.00005 | $0.00136 |
Grade A, and why
cratis-arc-storage-typescript 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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MongoDB and SQL storage for an Arc Node.js server
Two optional packages connect read models to a database. Importing the package
adds its method to the builder. Both pick the database from the resolved tenant
(see cratis-arc-tenancy-typescript), never from a query argument, and both
need the model's @field declarations.
| Package | Builder method | Peer | Use for |
|---|---|---|---|
@cratis/arc.mongodb |
withMongoDB |
mongodb@^6.21.0 |
documents, change-stream observation |
@cratis/arc.drizzle |
withDrizzle |
drizzle-orm ^0.45.0, rxjs |
PostgreSQL, MySQL, SQLite tables |
For query methods and argument binding, use cratis-arc-expose-query.
Query the existing store
Use MongoDB for a document read model. Choose SQL with Drizzle when the model lives in a SQL table.
This excerpt assumes an Arc application builder, a MongoDB client, and
a tenancy setup that supplies a tenant. Use default for the base database.
import { field, Guid } from '@cratis/fundamentals';
import { query, queryOptions, readModel, service, type QueryOptions } from '@cratis/arc.core';
import { mongoCollection, type MongoCollection } from '@cratis/arc.mongodb';
export class TaskRecord {
@field(Guid) id!: Guid;
@field(String) title!: string;
}
const tasks = mongoCollection(TaskRecord);
@readModel()
export class TaskQueries {
@query(service(tasks), queryOptions())
static page(items: MongoCollection<TaskRecord>, options: QueryOptions) {
return items.queryPage({}, options);
}
}
builder.add(TaskQueries).withMongoDB({ client, database: 'tasks', readModels: [TaskRecord] });
@key()marks the field stored as_id; without it a field namedidis used (or_id). Multiple explicit keys are rejected. With conventions enabled a key is required and only@fieldproperties are mapped. UseignoreConventionsonly when deliberately opting out of BSON mapping.- List every injected model in
readModels.mongoCollection(Type)resolves to the collection in the current tenant's database. - Options:
clientorserver(URI),database(default; other tenants use<database>+<tenantId>),databaseNameResolver(tenant, context),serverResolver,namingPolicy,collectionName(model),ignoreConventions,maxObservableItems(1000),maxPageSize(100, at most 10 000).withMongoDBalso readsCratis:MongoDB:{Server,Database}. - Build owner filters from the verified principal
(
items.find({ owner: principal.id })), never from a caller-supplied filter. - Naming.
defaultMongoNamingPolicykeeps declared property names and pluralizes the class name (TaskRecords);camelCaseMongoNamingPolicycamel-cases both. To read documents a .NET service wrote with the default policy, spell fields as .NET does (Title). - Storage format.
Guidis standard UUID binary (subtype 4); a concept is its underlying value;Datea BSON date;DateOnlya date at 12:00 UTC;TimeOnlya date on 1970-01-01 UTC;TimeSpana string; nested decorated models embed;@derivedType('id')adds_derivedTypeId. No global BSON conventions or class maps are installed. - Geospatial. Declare
@field(Point)(alsoLineString,Polygon) from@cratis/fundamentals/geospatial; longitude comes first. Stored as GeoJSON; creating2dsphereindexes and$nearfilters is the application's job. - Paging.
queryPage(filter, options)pushes count, sort, skip and limit into MongoDB. Only declared fields may sort (an unknown field, including$where, answers 400); an_idtiebreaker keeps order stable. - Observing.
observe(filter?)emits full lists,observeById(id)one document ornull,observeIterable(filter?)an async iterable without RxJS. All use change streams, which need a replica set or sharded cluster; a standalone server fails before the initial read. - Watcher and joins. Resolve
mongoDBWatcherin the same scope as the collections:watcher.changes(books)streams change events;watcher.observe(books, filter).join(authors, filter).select((a, b) => ...)recomputes a combined result when either changes. Join only collections from the same scope. A non-resumable error terminates subscribers; resubscribe, because the watcher never silently skips an interval. It is not a durable event consumer.
What ships with it
1 file 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.
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.
- today Changed · -47 lines · -4 tokens per session 8ccffcd4a61f
- 23d ago First seen · 151 lines · 51 tokens per session scan A bbb6765fcc3c
cratis-arc-storage-typescript is a skill published in the GitHub repository Cratis/AI (4 stars, last pushed today), licensed MIT. It adds 47 tokens to every session and 1,357 once invoked, about $0.0002 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-11-07.
cratis-arc-storage-typescript compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cratis-arc-storage-typescriptCratis/AI | Skill | 4 | today | MIT | A | 47 | Claude Code, Codex |
| imagegenopenai/codex | Skill | 137k | today | Apache-2.0 | A | 113 | Codex |
| playwright-climicrosoft/playwright | Skill | 101k | today | Apache-2.0 | A | 19 | Claude Code |
| browser-automationopenclaw/openclaw | Skill | 395k | today | MIT | A | 36 | Claude Code |
| systematic-debuggingobra/superpowers | Skill | 330k | 2d ago | MIT | A | 21 | Claude Code |
| free-llm-apismnfst/awesome-free-llm-apis | Skill | 14k | today | CC0-1.0 | A | 113 | Claude Code, Codex |
| next-cache-components-adoptionvercel/next.js | Skill | 144k | today | MIT | A | 95 | Claude Code |