code-conventions

A project guide for keeping code changes consistent across a GitHub Action and its command-line tool. It names the approved logging helpers, shared constants, and source files to update when adding inputs or changing descriptions.

In plain words
What is it for?
Use it when adding action inputs, updating pull-request descriptions or release notes, changing logging, or checking that imports and dependencies remain compatible with the project’s bundler.
Why use it?
It prevents scattered logging, repeated hardcoded values, and incomplete changes when a new input or release description is added. It also records constraints for the tool that bundles the project for distribution.

Cursor rule for Cursor

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 rules/vypdev/copilot/code-conventions
Clone the repo
git clone --depth 1 https://github.com/vypdev/copilot

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 415 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00415
Opus 5 $0.00000 $0.00208
Sonnet 5 $0.00000 $0.00083
Haiku 4.5 $0.00000 $0.00042

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

Security

Grade A, and why

code-conventions 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.

.cursor/rules/code-conventions.mdc · 35 lines

What it actually says

Code Conventions

Logging and constants

  • Use logger: logInfo, logError, logDebugInfo from src/utils/logger. No ad-hoc console.log.
  • Use constants: INPUT_KEYS and ACTIONS from src/utils/constants.ts for input names and action names. No hardcoded strings for these.

Adding a new action input

  1. action.yml: Add the input with description and default (if any).
  2. src/utils/constants.ts: Add the key to INPUT_KEYS (e.g. NEW_INPUT: 'new-input').
  3. src/actions/github_action.ts: Read the input (e.g. core.getInput(INPUT_KEYS.NEW_INPUT)) and pass it into the object used to build Execution.
  4. Optional: If the CLI must support it, add to local_action.ts and the corresponding CLI option.

Where to change content/descriptions

  • PR description (template filling, AI content): src/manager/description/ (configuration_handler, content interfaces).
  • Hotfix/release changelog (markdown extraction, formatting): src/manager/description/markdown_content_hotfix_handler.ts.

Build and bundles

  • The project uses @vercel/ncc to bundle the action and CLI. Keep imports and dependencies compatible with ncc (no dynamic requires that ncc cannot see).
  • Do not edit or rely on build/; it is generated. Run tests and lint only on src/.

Style and lint

  • Prefer TypeScript; avoid any (lint rule: no-explicit-any).
  • Run npm run lint before committing; use npm run lint:fix when possible.
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 · 35 lines · 0 tokens per session scan A 678dce985134

Subscribe to this mod's changes

code-conventions is a cursor rule published in the GitHub repository vypdev/copilot (2 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 415 tokens. 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-31.