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.
git clone --depth 1 https://github.com/sigistry/marketplaceWrote 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/commands/sigistry/marketplace/n1-scan)<a href="https://agentmods.dev/commands/sigistry/marketplace/n1-scan"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/n1-scan/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/commands/sigistry/marketplace/n1-scan"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/n1-scan.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.00018 | $0.00648 |
| Opus 5 | $0.00009 | $0.00324 |
| Sonnet 5 | $0.00004 | $0.00130 |
| Haiku 4.5 | $0.00002 | $0.00065 |
Grade A, and why
n1-scan 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 6d 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 — 39 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Scan the ORM / data-access code at $ARGUMENTS (default: the current diff or the app's models/services directories) for N+1 query patterns, and report each with an idiomatic fix. This is a static scan of source code, no database connection or query log required. It dispatches the n1-hunter agent, which reads the schema-antipatterns skill's ORM N+1 catalog.
Process
Step 1: Detect the ORM
Identify the data-access layer from manifests and imports:
| ORM | Signal |
|---|---|
| Django ORM | models.py, objects.filter, .all(), settings.py |
| SQLAlchemy | sqlalchemy, session.query, relationship( |
| Rails ActiveRecord | app/models/, has_many, .where |
| Sequelize | sequelize, Model.findAll, hasMany |
| Prisma | prisma/schema.prisma, prisma.*.findMany |
| TypeORM | @Entity, getRepository, @OneToMany |
| Hibernate/JPA | @Entity, @OneToMany(fetch=LAZY), EntityManager |
| GORM (Go) | gorm.io, db.Find, Preload |
| Entity Framework | DbContext, DbSet<, .Include( |
Step 2: Dispatch the n1-hunter agent
Launch the n1-hunter agent with the target path. It looks for the classic shape: a query that returns a collection, followed by a loop (or a serializer/to_json/template) that accesses a lazy-loaded relation per element, triggering one query per row. It also flags missing select_related/prefetch_related/joinedload/includes/with/Include()/Preload on queries whose results are iterated with relation access.
Step 3: Report
Relay the agent's findings as:
## N+1 Findings: a table:file:line | ORM | Pattern | Fix. Each row names the loop and the relation being lazily loaded, and gives the exact eager-load call for that ORM.## Severity Note: which findings are in hot paths (request handlers, list endpoints, serializers) vs cold paths (one-off scripts).
Important Notes
- Report only patterns backed by real code, cite the exact file:line of the query and the loop.
- A static scan yields suspected N+1s; note where confirmation needs the runtime query count (the fix is still correct).
- Never fabricate line numbers or relations; if the relation's laziness cannot be confirmed from the code, say so.
- Prefer the idiomatic batch/eager fix for the detected ORM over a hand-rolled
IN (...)unless the ORM lacks one.
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.
- 6d ago First seen · 39 lines · 18 tokens per session scan A 04bc71d1b9bd
n1-scan is a command published in the GitHub repository sigistry/marketplace (3 stars, last pushed 5d ago), licensed MIT. It adds 18 tokens to every session and 648 once invoked, about $0.0001 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-09-03.
Other commands, from other repositories
five-whys
Use the "Five Whys" root cause analysis technique to deeply understand problems.
debug
Structured debugging with parallel investigation agents.
dead-code-scan
Scan for dead code, unused imports, duplicates, and zombie code across the project.
esp-debug
Help debug ESP32 crashes, hangs, and peripheral issues.
inventory
Codebase inventory skill — scans the repo for a named pattern (inline SQL, fetch calls, feature flags, debug leftovers, deprecated APIs, etc.) and emits a structured Markdown inventory cross-referenced with framework metadata (routes, handlers). Language-agnostic and pack-driven — the engine matches whatever a YAML…
f5-db
Database operations and migrations.