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 agentmods add agents/jsk9999/ai-nexus/code-standardsgit clone --depth 1 https://github.com/JSK9999/ai-nexusWhat 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 | $0.00016 | $0.00759 |
| Opus 5 | $0.00008 | $0.00380 |
| Sonnet 5 | $0.00003 | $0.00152 |
| Haiku 4.5 | $0.00002 | $0.00076 |
Grade A, and why
Code Standards 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 2d 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.
What it actually says
AGENTS.md
Problem Definition → Small Safe Changes → Change Review → Refactoring — Repeat this loop.
Mandatory Rules
Read related files from start to finish, including call/reference paths, before changing anything.
Keep work, commits, and PRs small.
Record assumptions in Issues/PRs/ADRs.
Validate all inputs and encode/normalize outputs.
Avoid premature abstraction and use intention-revealing names.
Compare at least two alternatives before deciding.
Mindset
Think like a senior engineer.
Don't jump to conclusions or rush into assumptions.
Always evaluate multiple approaches, write one line each for pros/cons/risks, then choose the simplest solution.
Code & File Reference Rules
Read files thoroughly from start to finish (no partial reading).
Before changing code, find and read definitions, references, call sites, related tests, docs/config/flags.
Don't change code without reading the entire file.
Before modifying symbols, use global search to understand pre/post conditions and document impact in 1-3 lines.
Required Coding Rules
Write Problem 1-Pager before coding: Background / Problem / Goals / Non-Goals / Constraints.
Follow limits: File ≤ 300 LOC, Function ≤ 50 LOC, Parameters ≤ 5, Cyclomatic Complexity ≤ 10. Split/refactor if exceeded.
Prefer explicit code; prohibit hidden "magic".
Follow DRY but avoid premature abstraction.
Isolate side effects (I/O, network, global state) to boundary layers.
Handle only specific exceptions and provide clear messages to users.
Use structured logging and don't record sensitive data (propagate request/correlation IDs when possible).
Consider timezones and DST.
Testing Rules
Add new tests for new code; bug fixes must include regression tests (write to fail first).
Tests should be deterministic and independent; replace external systems with fakes/contract tests.
E2E tests must include ≥1 success path and ≥1 failure path.
Proactively assess risks from concurrency/locks/retries (duplicates, deadlocks, etc.).
ABSOLUTE Security Rules
NEVER: Leave secrets (passwords/API keys/tokens) in code/logs/tickets/environment variables/.env files.
NEVER: Log sensitive data (PII/credit cards/SSN) in logs.
NEVER: Leave SQL injection, XSS, CSRF vulnerabilities.
ALWAYS: Validate, normalize, and encode all inputs; use parameterized queries.
ALWAYS: Use HTTPS/TLS and apply principle of least privilege.
ALWAYS: Apply authentication/authorization to all endpoints.
ALWAYS: Set security headers (CSP, HSTS, X-Frame-Options).
ALWAYS: Regularly scan and update dependency vulnerabilities.
Stop work immediately and request review upon security violations.
Clean Code Rules
Use intention-revealing names.
Each function does one thing.
Isolate side effects to boundary layers.
Prefer guard clauses.
Always symbolize constants (no hardcoding).
Structure code as Input → Processing → Return.
Report failures with specific errors/messages.
Make tests work as usage examples and include boundary/failure cases.
Never add useless emojis.
Anti-Pattern Rules
Don't modify code without reading full context.
Don't expose secrets.
Don't ignore failures or warnings.
Don't introduce unfounded optimizations or abstractions.
Don't abuse broad exceptions.
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.
- 2d ago First seen · 82 lines · 16 tokens per session scan A 7eb17b955a13
Code Standards is an agent published in the GitHub repository JSK9999/ai-nexus (18 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 16 tokens to every session and 759 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-08-30.
Other agents, from other repositories
code-smell-detector
Code quality analysis and anti-pattern detection specialist.
dev
开发者(Developer)角色:负责代码实现、PR 创建与迭代、代码审查响应、 技术方案设计。监听 issues.assigned 事件,自动接收被指派的开发任务。.
complexity-analyzer
Code complexity metrics and simplification specialist.
Refactoring Specialist
Expert at breaking down complex methods into smaller, focused, testable units while maintaining backward compatibility.
explore-companion
You are the Explore Companion. Your job is to make the leader faster, not to lead. The leader is already executing the main task; you run behind it, answer one narrow probe, and hand back just enough map that the leader does not spend its own context discovering where things are.
backend
You are the Backend agent. Your job is server-side logic: services, business rules, persistence wiring, and reliable request handling.