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/hculap/better-codeWrote 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/hculap/better-code/n1-analyze)<a href="https://agentmods.dev/commands/hculap/better-code/n1-analyze"><img src="https://agentmods.dev/badge/commands/hculap/better-code/n1-analyze/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/hculap/better-code/n1-analyze"><img src="https://agentmods.dev/badge/commands/hculap/better-code/n1-analyze.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.00014 | $0.01897 |
| Opus 5.5 | $0.00006 | $0.00759 |
| Sonnet 5.5 | $0.00003 | $0.00379 |
| Haiku 4.5 | $0.00001 | $0.00190 |
Grade A, and why
n1-analyze 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 1mo 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 — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.
N+1 Optimizer Analysis
Perform comprehensive performance analysis by launching 4 specialized agents IN PARALLEL. Each agent focuses on a different layer of the application stack.
Step 1: Detect Tech Stack
Check these files to identify the tech stack (use Read tool):
| File | Stack | Check For |
|---|---|---|
package.json |
Node.js | Look at dependencies for: react/vue/angular (frontend), express/fastify/nest (backend), prisma/typeorm/sequelize (ORM) |
requirements.txt or pyproject.toml |
Python | django, flask, fastapi, sqlalchemy, tortoise-orm |
go.mod |
Go | gin, echo, fiber, gorm, ent |
pom.xml or build.gradle |
Java | spring-boot, hibernate, jpa |
Gemfile |
Ruby | rails, sinatra, activerecord |
composer.json |
PHP | laravel, symfony, doctrine |
Also identify source directories by checking for: src/, app/, lib/, services/, api/, components/, pages/.
Record: Frontend framework, Backend framework, ORM/Database library, Source directories.
Step 2: Launch 4 Agents IN PARALLEL
CRITICAL: Launch ALL 4 agents in a SINGLE message with multiple Task tool calls. Do NOT launch them sequentially.
Use subagent_type with plugin namespace n1-optimizer:<agent-name>:
Agent 1: n1-optimizer:database-analyzer
Prompt: "Analyze this codebase for database performance issues.
Working directory: [WORKING_DIR]
Tech stack: [DETECTED_STACK - e.g., Node.js + Prisma + PostgreSQL]
Source directories: [DIRS - e.g., src/, services/]
Focus on:
- N+1 queries (queries inside loops, lazy loading)
- Missing indexes on frequently queried columns
- Inefficient JOINs
- Unbounded queries (no LIMIT)
- Query patterns in loops
Return findings in format: [SEVERITY] Issue - file:line"
Agent 2: n1-optimizer:backend-analyzer
Prompt: "Analyze this codebase for backend performance issues.
Working directory: [WORKING_DIR]
Tech stack: [DETECTED_STACK]
Source directories: [DIRS]
Focus on:
- O(n²) algorithms (nested loops on collections)
- Blocking operations in async code
- Memory leaks (unclosed resources, growing arrays)
- Redundant computations (missing memoization)
- Sequential awaits that could be parallel
Return findings in format: [SEVERITY] Issue - file:line"
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.
- 1mo ago First seen · 217 lines · 14 tokens per session scan A d3bd7145aaf5
n1-analyze is a command published in the GitHub repository hculap/better-code (2 stars, last pushed 17d ago), licensed MIT. It adds 14 tokens to every session and 1,897 once invoked, about $0.0001 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-08-31.
Other commands, from other repositories
sm-refit
Run slop-mop's one-time onboarding remediation rail for this repository.
latent-fix
Quick fix cho file đang mở hoặc file được chỉ định. Tối đa 1-2 patches.
debug
Diagnose Ansible playbook issues from symptoms.
debug-pod
Debug a failing or unhealthy Kubernetes pod by analyzing events, logs, and configuration.
fix
Universal debugging and fix application with semantic code analysis.
eg-fix-bug
Fix a bug using the elephant/goldfish workflow — problem doc, goldfish diagnosis check, failing test, fix, review, validate.