apex-accelerator code-quality.instructions.md

Code-quality guidance focused on useful comments and review priorities, including security checks. It says comments should explain why non-obvious code exists, while language-specific rules still apply.

In plain words
What is it for?
Use it during code reviews and implementation to decide what to comment, check for security concerns, and follow additional rules for PowerShell, Bicep, and shell scripts.
Why use it?
Comments that merely repeat the code become noise and can go stale. This helps reviewers and maintainers focus on decisions, unusual logic, and security risks.

Instructions file for GitHub Copilot

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 instructions/jonathan-vella/apex-accelerator/code-quality
Clone the repo
git clone --depth 1 https://github.com/jonathan-vella/apex-accelerator

Made for: GitHub Copilot.

Per session 943 This file is loaded in full into every session.
When invoked 943 The same file — it is already loaded in full.
Security scan A 0 findings. 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.00943 $0.00943
Opus 5 $0.00472 $0.00472
Sonnet 5 $0.00189 $0.00189
Haiku 4.5 $0.00094 $0.00094

Measured 2d ago against content hash e1dcd1935f2f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

apex-accelerator code-quality.instructions.md 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.

.github/instructions/code-quality.instructions.md · 109 lines

How it starts

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

Code Quality Instructions

Language-Specific Precedence

Language-specific instruction files take precedence over these general guidelines. In particular:

  • PowerShell (powershell.instructions.md): always include comment-based help (.SYNOPSIS, .DESCRIPTION, .EXAMPLE).
  • Bicep (iac-bicep-best-practices.instructions.md): always use @description annotations on parameters, variables, and outputs.
  • Shell (shell.instructions.md): include a header comment explaining the script's purpose.

These requirements are additive — public-facing APIs and parameters must be documented per their language rules, while internal code follows the minimal-comment philosophy below.


Commenting: Core Principle

Write code that speaks for itself. Comment only when necessary to explain WHY, not WHAT.

AVOID These Comments

  • Obvious: let counter = 0; // Initialize counter to zero
  • Redundant: comment repeats what the code already says
  • Outdated: comment doesn't match the code

WRITE These Comments

  • Complex business logic: explains WHY a specific calculation
  • Non-obvious algorithms: explains the algorithm choice
  • Regex patterns: explains what the regex matches
  • API constraints or gotchas: explains external limitations

Decision Framework

  1. Is the code self-explanatory? → No comment needed
  2. Would a better name eliminate the need? → Refactor instead
  3. Does this explain WHY, not WHAT? → Good comment
  4. Will this help future maintainers? → Good comment

Annotations

Use standard annotation tags: TODO, FIXME, HACK, NOTE, WARNING, PERF, SECURITY, BUG, REFACTOR, DEPRECATED.

Anti-Patterns

  • Dead code left as comments — delete it (Git has history)
  • Journal comments tracking changes — use Git log
  • Closing brace comments — refactor into smaller functions
  • Commented-out code blocks — delete or explain why kept

Code Review Priorities

🔴 CRITICAL (Block merge): Security vulns, logic errors, breaking changes, data loss

Read the full file on GitHub · 109 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. 2d ago First seen · 109 lines · 943 tokens per session scan A e1dcd1935f2f

Subscribe to this mod's changes

apex-accelerator code-quality.instructions.md is an instructions file published in the GitHub repository jonathan-vella/apex-accelerator (50 stars, last pushed 5d ago), licensed MIT. It adds 943 tokens to every session, about $0.0047 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.

Related

Other instructions, from other repositories

claude-code-settings copilot-instructions.md

Instructions for feiskyer/claude-code-settings, covering claude.md, environment setup, required dependencies, configuration and skills.

feiskyer/claude-code-settings · 649 tokens

squad copilot-instructions.md

Copilot instructions for bradygaster/squad, covering copilot coding agent — squad instructions, ⚠️ identity lock — read this first, 🚦 route before you act — generic copilot sessions, adversarial input handling and team context.

bradygaster/squad · 1,349 tokens

vscode-unify-chat-provider AGENTS.md

Instructions for smallmain/vscode-unify-chat-provider, a project described as: Integrate multiple LLM API providers into VS Code's GitHub Copilot Chat using the Language Model API. One-click use of your Claude Code, Gemini CLI, Antigravity, Github Copilot, OpenAI Codex (ChatGPT Plus/Pro), xAI Grok (SuperGrok / X…

smallmain/vscode-unify-chat-provider · 271 tokens

PlatformPlatform AGENTS.md

Instructions for platformplatform/PlatformPlatform, covering behavioral guidelines, build, test, and format, product management tool, auto memory and source of truth.

platformplatform/PlatformPlatform · 805 tokens

PromptKit copilot-instructions.md

Instructions for microsoft/PromptKit, covering promptkit — copilot instructions, how to use this repository, what this repository is, architecture and component conventions.

microsoft/PromptKit · 1,144 tokens

agent-rules testing.instructions.md

Instructions for lirantal/agent-rules, covering testing guidelines for node.js applications, general testing principles, guiding principles, descriptive test naming (three-part structure) and structure tests by the aaa pattern.

lirantal/agent-rules · 6,713 tokens