coding-standards

A set of coding rules for writing and reviewing software, including quality checks, forbidden patterns, and self-review steps.

In plain words
What is it for?
It is for checking code before a commit or merge, enforcing lint and test standards, and guiding safe handling of configuration, errors, imports, and logging.
Why use it?
It helps prevent common problems such as unused code, exposed secrets, inconsistent configuration, and changes merged without enough testing.

Cursor rule for Cursor

Install

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.

agentmods
npx agentmods add rules/gosha70/code-copilot-team/coding-standards
Clone the repo
git clone --depth 1 https://github.com/gosha70/code-copilot-team

Made for: Cursor.

Per session 1,040 This file is loaded in full into every session.
When invoked 1,040 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.01040 $0.01040
Opus 5 $0.00520 $0.00520
Sonnet 5 $0.00208 $0.00208
Haiku 4.5 $0.00104 $0.00104

Measured yesterday against content hash 7a51402ca1a0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

coding-standards scanned grade A with 1 finding 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 yesterday.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **Execute your own test plan.** If you write test commands (curl, bash, docker, etc.) as part of a build summary, run every command yourself and report results before declaring done.
adapters/cursor/.cursor/rules/coding-standards.mdc · 51 lines

How it starts

The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Coding Standards

Applied to all code generation and review sessions.

Quality Gates (enforce before merge/commit)

  • Lint errors: 0
  • Test coverage: >= 80% (critical paths >= 95%)
  • No commented-out code
  • No unused imports or dead code
  • No hard-coded secrets or credentials

Prohibited Patterns

  • No hard-coded structured data (JSON/XML literals) inside source — use config files or env vars. This includes default values on Python dataclasses/Pydantic models and equivalents in other languages — define only the schema in code; put actual defaults in config/defaults.yaml (or equivalent). A config loader reads the file and populates the schema; env vars or override files layer on top.
  • No magic numbers or strings — use named constants. When a string key crosses a module boundary (config key, variable name, prompt template name), define it as a constant in the lowest common ancestor package and import it everywhere. A hardcoded string in two modules is a silent breakage waiting to happen.
  • No secrets in source — use env vars or a secrets manager.
  • No print() debugging in committed code — use structured logging.
  • No wildcard imports.
  • No bare except / catch without specific exception types.
  • No SQL string concatenation — use parameterized queries.

Verification Discipline

  • Never suggest skipping a failing verification step. When a test, build, lint check, Docker build, or script execution fails, diagnose and fix the issue. Do not suggest workarounds that bypass the deliverable.
  • Execute your own test plan. If you write test commands (curl, bash, docker, etc.) as part of a build summary, run every command yourself and report results before declaring done.
  • Build it, run it. Any executable artifact you create (Dockerfile, shell script, CI workflow, launcher flag) must be executed at least once before committing. Syntax validity alone is not sufficient.
  • Re-review after fix. After applying a fix for a bug flagged in code review or a reviewer note, run the review process again (e.g., /team-review or the equivalent specialist agent) before declaring done. Do not just apply the fix and move on — the re-review may catch secondary issues exposed by the fix itself.
  • Confirm against origin before declaring done. Run scripts/check-origin-alignment.sh <feature-id> before presenting any feature for review. Exit ≥ 2 means the working artifact has drifted from the user's origin and you must surface the three-resolution escalation (rescope / restart / document divergence) — do not proceed. See shared/skills/origin-confirmation/SKILL.md for the full protocol.

Read the full file on GitHub · 51 lines

Changes

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.

  1. yesterday First seen · 51 lines · 1,040 tokens per session scan A 7a51402ca1a0

Subscribe to this mod's changes

coding-standards is a cursor rule published in the GitHub repository gosha70/code-copilot-team (6 stars, last pushed yesterday), licensed MIT. It adds 1,040 tokens to every session, about $0.0052 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.