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 widnyana/eyay-toolkits --skill ts-db-perfgit clone --depth 1 https://github.com/widnyana/eyay-toolkitsWrote 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/widnyana/eyay-toolkits/ts-db-perf)<a href="https://agentmods.dev/skills/widnyana/eyay-toolkits/ts-db-perf"><img src="https://agentmods.dev/badge/skills/widnyana/eyay-toolkits/ts-db-perf/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/widnyana/eyay-toolkits/ts-db-perf"><img src="https://agentmods.dev/badge/skills/widnyana/eyay-toolkits/ts-db-perf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00107 | $0.01564 |
| Opus 5 | $0.00053 | $0.00782 |
| Sonnet 5 | $0.00021 | $0.00313 |
| Haiku 4.5 | $0.00011 | $0.00156 |
Grade A, and why
ts-db-perf 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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 233 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TypeScript Database Optimization
Optimize: $ARGUMENTS
1. N+1 Query Elimination
The classic trap: fetching a list, then querying per item in a loop.
// N+1: one query for the list, one per item
const orders = await db.order.findMany();
for (const order of orders) {
order.customer = await db.customer.findUnique({ where: { id: order.customerId } });
}
// Resolved: single query with join/include
const orders = await db.order.findMany({
include: { customer: true },
});
If the ORM doesn't support include, use a WHERE id IN (...) or a JOIN.
2. Select Only What You Need
// Over-fetching
const users = await db.user.findMany();
// Tight select
const users = await db.user.findMany({
select: { id: true, email: true },
});
Applies to raw SQL too -- avoid SELECT * when you only need a few columns.
3. Pagination
Always paginate list endpoints. Cursor-based for large/real-time datasets, offset-based for simple cases.
// Offset-based
const [data, total] = await Promise.all([
db.user.findMany({ skip: (page - 1) * limit, take: limit }),
db.user.count(),
]);
// Cursor-based (no count query, stable under writes)
const items = await db.message.findMany({
take: limit,
cursor: cursor ? { id: cursor } : undefined,
orderBy: { createdAt: "desc" },
});
4. Caching
Cache where data is read-heavy and stale reads are tolerable.
async function getExchangeRate(from: string, to: string): Promise<number> {
const key = `rate:${from}:${to}`;
const cached = await cache.get(key);
if (cached !== null) return Number(cached);
const rate = await fetchRateFromAPI(from, to);
await cache.set(key, String(rate), { ttl: 60 }); // 60s TTL
return rate;
}
For repository-level caching, wrap the lookup:
async findById(id: string): Promise<User | null> {
const cached = await cache.get(`user:${id}`);
if (cached) return JSON.parse(cached);
const user = await db.user.findUnique({ where: { id } });
if (user) await cache.set(`user:${id}`, JSON.stringify(user), { ttl: 300 });
return user;
}
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.
- 10d ago First seen · 233 lines · 107 tokens per session scan A 298589b4b2d0
ts-db-perf is a skill published in the GitHub repository widnyana/eyay-toolkits (7 stars, last pushed 8d ago), licensed MIT. It adds 107 tokens to every session and 1,564 once invoked, about $0.0005 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.
Other skills, from other repositories
phoenix-contexts
Phoenix context design — creating/splitting contexts, Scope (1.8+), Ecto.Multi, PubSub, routers, plugs, controllers. Use when editing contexts, routers, or designing boundaries.
laravel-scout
Implement full-text search with Laravel Scout. Use when adding search to Eloquent models with Meilisearch, Algolia, or database driver.
go-architecture
Use when laying out a new Go service, choosing an HTTP router or DB layer, or wiring dependencies. Not for concurrency (go-concurrency) or language idioms (go-core-idioms).
backend-engineer
Use when designing APIs, working with databases, building microservices, handling authentication and authorisation, optimising server performance, designing data models, or any task involving server-side logic, infrastructure, or system architecture.
consistency-coordination
This skill should be used when the user asks about the "CAP theorem", "PACELC", a "consistency model", "eventual vs strong consistency", "read-your-writes", "causal consistency", "quorum" or "R+W>N", "consensus", "Raft / Paxos", "leader election", "consistent hashing", a "distributed transaction", "2PC", or "saga".…
database-design-document
Design a production database schema including ERD, table definitions, data dictionary, indexing strategy, normalization decisions, and migration plan. Use when designing a new database, adding major entities, or documenting an existing schema.