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.
curl -O https://raw.githubusercontent.com/sybrew/troy/main/.cursor/skills/trailing-comma/SKILL.mdgit clone --depth 1 https://github.com/sybrew/troyWrote 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.
[](https://agentmods.dev/skills/sybrew/troy/trailing-comma)<a href="https://agentmods.dev/skills/sybrew/troy/trailing-comma"><img src="https://agentmods.dev/badge/skills/sybrew/troy/trailing-comma/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.
<a href="https://agentmods.dev/skills/sybrew/troy/trailing-comma"><img src="https://agentmods.dev/badge/skills/sybrew/troy/trailing-comma.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00054 | $0.00767 |
| Opus 5.5 | $0.00022 | $0.00307 |
| Sonnet 5.5 | $0.00011 | $0.00153 |
| Haiku 4.5 | $0.00005 | $0.00077 |
Grade A, and why
trailing-comma 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.
How it starts
The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Trailing commas
Source of truth: .github/copilot-instructions.md — trailing commas at the end of multiline object/array properties and function arguments when the language supports it.
PHP 7.4
Put a trailing comma on multiline:
- Function and method calls (
apply_filters(,sprintf(,Escape::css_content() array( … )and[ … ]literals
Do not put a trailing comma on:
- Function, method, closure, or
fn()parameter lists in PHP 7.4 packages (PHP 8.0 syntax) - Closure
use ( … )lists (PHP 8.0) if (/elseif (/for (/foreach (/while (/switch (/catch (conditions- Single-line calls or arrays
src/troy-server/** is PHP 8.4+. Put a trailing comma on multiline parameter lists there, matching existing constructors. PHP 7.4 packages must not.
JavaScript
Same rule for multiline calls, arrays, and objects. Parameter lists may have trailing commas (ES2017). Do not edit *.min.js.
Shapes
Comma after the last item of a multiline call, array, or object. A docblock after ( does not make it single-line.
foo( $a, $b ); // no — one line
foo(
$a,
$b, // yes
);
bar(
baz( $x ), // yes — bar is multiline
);
bar(
baz(
$x, // yes — both
),
);
[
'a' => 1,
'b' => 2, // yes
];
function f( $a, $b ) {} // no — one line; PHP 7.4 packages: never on params
function f( // troy-server (PHP 8.4) multiline params: yes
$a,
$b,
) {}
use ( $c ) // no — closure use (PHP 8.0)
if ( $a && $b ) {} // no — condition
fn( a, b ); // no — one line
fn(
a,
b, // yes
);
{ a: 1, b: 2 }; // no — one line
{
a: 1,
b: 2, // yes
}
function f( a, b ) {} // yes — JS parameters may
Finder
PHP only. Same command on Windows (PowerShell or cmd), macOS, and Linux. PHP 7.4+ on PATH. Reports; does not rewrite.
php .cursor/skills/trailing-comma/scripts/find-missing.php path/to/file.php
php .cursor/skills/trailing-comma/scripts/find-missing.php src
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 2d ago First seen · 89 lines · 54 tokens per session scan A ef803901cb6e
trailing-comma is a skill published in the GitHub repository sybrew/troy (55 stars, last pushed 14d ago), licensed MIT. It adds 54 tokens to every session and 767 once invoked, about $0.0002 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.
Other skills, from other repositories
bd-better-route-bridge
Compose better-data DTOs with the better-route library — use BetterRouteBridge::{get, post, put, patch, delete} to register a REST route that hydrates the request into a DTO, validates, calls the handler with (DataObject, mixed $request), and presents returned DataObject values through Presenter with…
bd-data-object
Add or modify DataObject subclasses inside the better-data library — the immutable, attribute-decorated DTOs the whole library is built around. Every DTO is final readonly class extends DataObject with constructor-promoted typed parameters; sources hydrate via ::fromArray, sinks project via SinkProjection, the…
wp-plugin-bootstrap
Scaffolds and reviews the main entry-point PHP file of a WordPress plugin — header (with Requires Plugins for WP 6.5+), ABSPATH guard, file/path/url/version constants, Composer PSR-4 autoload with src/ as the default class root, optional scoped fallback for release ZIP safety, PascalCase class filenames that match…
bd-attribute
Add a new declarative attribute to the better-data library (e.g. #[ArrayOf], #[Default], domain hint). Attributes live in src/Attribute/ as final readonly classes with constructor-promoted public properties — pure data carriers, never business logic. The failure mode that catches every contributor is "partial wiring"…
bd-hydration-coercion
Modify how raw values become typed property values in better-data — work in TypeCoercer (primitives + DateTime + Enum + Secret) or DataObject::coerceParameter (attribute-aware — ListOf, Encrypted, etc.). Critical layering — TypeCoercer is pure, must stay callable from a no-WordPress unit test, no side effects, no…
bd-source-adapter
Add a new source adapter to better-data — code that reads from a WordPress data store the library doesn't cover yet (comments, attachments, transients, custom tables). Mirror the canonical shape PostSource / UserSource / TermSource use — a non-final class with static hydrate(int|object, $dtoClass) and…