packmind packmind-back-end-typescript-clean-code-practices.instructions.md

Team rules for writing maintainable TypeScript back-end code, including logging, imports, error types, and dependency setup.

In plain words
What is it for?
Use them when developing or reviewing back-end TypeScript services in Packmind.
Why use it?
They reduce inconsistent code and make errors, logs, and service behavior easier to understand and maintain.

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/packmindhub/packmind/packmind-back-end-typescript-clean-code-practices
Clone the repo
git clone --depth 1 https://github.com/PackmindHub/packmind

Made for: GitHub Copilot.

Per session 255 This file is loaded in full into every session.
When invoked 255 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.00255 $0.00255
Opus 5 $0.00128 $0.00128
Sonnet 5 $0.00051 $0.00051
Haiku 4.5 $0.00026 $0.00026

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

Security

Grade A, and why

packmind packmind-back-end-typescript-clean-code-practices.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.

packages/.github/instructions/packmind-back-end-typescript-clean-code-practices.instructions.md · 13 lines

What it actually says

Standard: Back-end TypeScript Clean Code Practices

This standard establishes clean code practices in TypeScript for back-end development to enhance maintainability and ensure consistent patterns across services. It covers logging best practices, error... :

  • Avoid excessive logger.debug calls in production code and limit logging to essential logger.info statements. Use logger.info for important business events, logger.error for error handling, and add logger.debug manually only when debugging specific issues.
  • Inject PackmindLogger as a constructor parameter with a default value using a variable or a string representing the class name.
  • Instantiate use cases in adapters without passing the adapter's logger; use cases must create their own logger for proper origin tracking.
  • Keep all import statements at the top of the file before any other code. Never use dynamic imports in the middle of the code unless absolutely necessary for code splitting or lazy loading.
  • Use dedicated error types instead of generic Error instances to enable precise error handling and improve code maintainability. Create custom error classes that extend Error with descriptive names and context-specific information.

Full standard is available here for further request: Back-end TypeScript Clean Code Practices

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 · 13 lines · 255 tokens per session scan A 3015bbdc0459

Subscribe to this mod's changes

packmind packmind-back-end-typescript-clean-code-practices.instructions.md is an instructions file published in the GitHub repository PackmindHub/packmind (306 stars, last pushed 4d ago), licensed Apache-2.0. It adds 255 tokens to every session, about $0.0013 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.