troy: Instructions file for GitHub Copilot

.github/instructions/javascript.instructions.md

troy javascript.instructions.md is an instructions file for GitHub Copilot from sybrew/troy. It costs 682 tokens per session, scanned A, original, MIT.

A set of JavaScript coding rules for this repository, covering syntax, spacing, object formatting, and blank-line placement. JavaScript is the language commonly used to add behavior to web pages and applications.

In plain words
What is it for?
It is for writing or reviewing repository JavaScript while following its rules for functions, conditions, objects, and returns.
Why use it?
It removes ambiguity about how JavaScript should be structured and formatted when making changes.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

This is sybrew/troy's own configuration. It tells GitHub Copilot how to work on troy itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything troy configures →

Reuse

Borrowing it

Nothing to install: this file belongs to sybrew/troy. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/sybrew/troy/main/.github/instructions/javascript.instructions.md
Clone the repo
git clone --depth 1 https://github.com/sybrew/troy

Made for: GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for troy javascript.instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sybrew/troy/javascript/github.svg)](https://agentmods.dev/instructions/sybrew/troy/javascript)
Your own site
<a href="https://agentmods.dev/instructions/sybrew/troy/javascript"><img src="https://agentmods.dev/badge/instructions/sybrew/troy/javascript/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for troy javascript.instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/sybrew/troy/javascript"><img src="https://agentmods.dev/badge/instructions/sybrew/troy/javascript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 682 This file is loaded in full into every session.
When invoked 682 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00682 $0.00682
Opus 5.5 $0.00273 $0.00273
Sonnet 5.5 $0.00136 $0.00136
Haiku 4.5 $0.00068 $0.00068

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

Security

Grade A, and why

troy javascript.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/javascript.instructions.md · 24 lines

What it actually says

JavaScript Rules

  • Use ES6+.
  • Do not write constant functions.
  • Do not use JSX.
  • Never use wp.data.subscribe.
  • Apply PHP spacing standards, including vertical alignment.
  • Align object : with spaces after the separator.
  • After a function opening {, insert a blank line when the body has two or more statements. A single-statement body stays tight. A leading comment is not a statement: comment plus a single return or yield stays tight. With two or more statements, the blank line comes first so the first comment sits on the next interior line. Do not insert that blank after if, else, loop, try, or labeled { (label: {) braces.
  • A return or yield that ends that interior always has a blank line before it if that interior has two or more statements. Early return / yield inside if / else count: the blank is a visual split that this path ends there. A single-statement interior that is only a return or yield stays tight. Own-line comments immediately above that return or yield stay attached to it; the blank line goes before that comment group. Do not insert that blank before continue or break. After an early return, continue, or break guard, insert a blank line before the next sibling statement, including another guard.
  • Compact if / else if: keep a void return;, continue;, or break; on the same line when that line is at most 80 columns (tab = 4). Put a return with a value on the next line, unbraced. If that compact void line exceeds 80, put the terminator on the next line, unbraced. Do not wrap a single expression (no && / ||) just to make room for the terminator. If an && / || condition line exceeds 80, wrap at those operators (first operand padded by 3 spaces) and use braces. Do not wrap only the return.
  • For => {, add a newline after { when the body has two or more statements and the first is not return, or when the only statement is a multi-line braced if, for, while, or switch. Stay tight for a wrapped return or call, an unbraced one-line if, and a try/catch around a single call. Concise => expr without braces stays as-is.
  • Ignore long __-prefixed properties for spacing and alignment purposes.
  • Use const instead of import.
  • Do not add parentheses to lone parameters in arrow functions.
  • Put each chained method call on a new line.
  • Add trailing commas on multiline calls, arrays, objects, and parameter lists.
  • Do not create, edit, read, grep, search, or git diff *.min.js or *.min.css, including after minify exit code 0.
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 · 24 lines · 682 tokens per session scan A 2ee78bb49ac4

Subscribe to this mod's changes

troy javascript.instructions.md is an instructions file published in the GitHub repository sybrew/troy (55 stars, last pushed 14d ago), licensed MIT. It adds 682 tokens to every session, about $0.0027 per session on Opus 5.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-10-26.

Related

Other instructions, from other repositories