github-copilot-prompts ts.instructions.md

Instructions for raffertyuy/github-copilot-prompts, covering typescript coding best practices, typescript-specific guidelines, formatting, error handling and documentation.

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/raffertyuy/github-copilot-prompts/ts
Clone the repo
git clone --depth 1 https://github.com/raffertyuy/github-copilot-prompts

Made for: GitHub Copilot.

Per session 289 This file is loaded in full into every session.
When invoked 289 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.00289 $0.00289
Opus 5 $0.00144 $0.00144
Sonnet 5 $0.00058 $0.00058
Haiku 4.5 $0.00029 $0.00029

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

Security

Grade A, and why

github-copilot-prompts ts.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 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.

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/ts.instructions.md · 40 lines

What it actually says

TypeScript Coding Best Practices

TypeScript-Specific Guidelines

  • Prefer const and let over var for variable declarations.
  • Use type annotations for function parameters, return types, and variables.
  • Prefer interfaces over type aliases for object shapes.
  • Avoid using any; use specific types or generics where possible.
  • Use ES6+ features and syntax.

Formatting

  • Use semicolons consistently.
  • Use single quotes for strings, except when escaping is easier with double quotes.

Error Handling

  • Use try/catch blocks for asynchronous code and handle errors gracefully.
  • Avoid using bare catch clauses; specify the error type if possible.

Documentation

  • Add JSDoc comments to all public classes, interfaces, functions, and methods.

Testing

  • Write unit tests for all functions and classes.
  • Use frameworks like Jest or Mocha.
  • Name test files and functions clearly.

File and Directory Structure

  • Use lowercase with hyphens for file and folder names.
  • Organize code into modules and folders logically.
  • Place executable code inside main or entry-point files.

Performance

  • Profile and optimize only after identifying bottlenecks.
  • Use built-in data structures and libraries where possible.

Version Control

  • Commit code with clear, concise messages.
  • Do not commit secrets or large binary files.
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 · 40 lines · 289 tokens per session scan A 01979de291c7

Subscribe to this mod's changes

github-copilot-prompts ts.instructions.md is an instructions file published in the GitHub repository raffertyuy/github-copilot-prompts (43 stars, last pushed 5mo ago), licensed MIT. It adds 289 tokens to every session, about $0.0014 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-09-01.