code-convention

code-convention is a cursor rule for Cursor from adonai-labs/agent-runway. It costs 0 tokens per session (1,193 once invoked), scanned A, original, MIT.

A code-style checker for projects using ESLint, especially TypeScript and React. It checks naming, type usage, documentation, hooks, and other code-quality rules.

In plain words
What is it for?
Use it to run linting, check naming conventions, detect unnecessary use of `any`, find missing documentation, review React hook dependencies, and inspect possible performance issues.
Why use it?
It finds inconsistent or risky code patterns that a project's usual lint command may miss. It also gives remediation steps and a quality score.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to run linting, check naming conventions, detect unnecessary use of any, find missing documentation, review React hook dependencies, and inspect possible performance issues.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/adonai-labs/agent-runway/code-convention
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.

Clone the repo
git clone --depth 1 https://github.com/adonai-labs/agent-runway

Made for: Cursor.

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 code-convention

README.md
[![agentmods](https://agentmods.dev/badge/rules/adonai-labs/agent-runway/code-convention/github.svg)](https://agentmods.dev/rules/adonai-labs/agent-runway/code-convention)
Your own site
<a href="https://agentmods.dev/rules/adonai-labs/agent-runway/code-convention"><img src="https://agentmods.dev/badge/rules/adonai-labs/agent-runway/code-convention/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 code-convention

Your own site · 80×15
<a href="https://agentmods.dev/rules/adonai-labs/agent-runway/code-convention"><img src="https://agentmods.dev/badge/rules/adonai-labs/agent-runway/code-convention.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,193 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.01193
Opus 5.5 $0.00000 $0.00477
Sonnet 5.5 $0.00000 $0.00239
Haiku 4.5 $0.00000 $0.00119

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

Security

Grade A, and why

code-convention 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 28d 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.

src/stacks/typescript/code-convention.mdc · 105 lines

How it starts

The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code Convention Analysis (JS/TS)

When asked for a code convention review (or similar), do the following.

1. Run the project's lint first

npm run lint            # or: npx eslint .

ESLint 9+ uses flat config (eslint.config.js / .mjs / .ts). Files are selected by the config, so do not pass --ext.

2. Run focused checks

Extra --rule flags only work for plugins already loaded by the project's config (typescript-eslint, eslint-plugin-react-hooks, eslint-plugin-jsdoc). Skip a check if its plugin is not installed and note it in the report.

# Naming conventions
npx eslint -f json . --rule '@typescript-eslint/naming-convention: ["error",
  {"selector": "variableLike", "format": ["camelCase", "UPPER_CASE", "PascalCase"]},
  {"selector": "typeLike", "format": ["PascalCase"]},
  {"selector": "function", "format": ["camelCase", "PascalCase"]}]'

# Explicit any
npx eslint -f json . --rule '@typescript-eslint/no-explicit-any: error'

# JSDoc on exported functions/classes (core `require-jsdoc` was removed in ESLint 9; use eslint-plugin-jsdoc)
npx eslint -f json . --rule 'jsdoc/require-jsdoc: ["error", {"publicOnly": true, "require": {"FunctionDeclaration": true, "ClassDeclaration": true}}]'

# React hooks (React projects only)
npx eslint -f json . --rule 'react-hooks/rules-of-hooks: error' --rule 'react-hooks/exhaustive-deps: error'

Recommended baseline config:

// eslint.config.js
import { defineConfig } from 'eslint/config';
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import jsdoc from 'eslint-plugin-jsdoc';

export default defineConfig([
  { ignores: ['dist/**', '**/*.d.ts'] },
  js.configs.recommended,
  tseslint.configs.strictTypeChecked,
  { languageOptions: { parserOptions: { projectService: true } } },
  jsdoc.configs['flat/recommended-typescript'],
]);

3. Classify and score

Tag ESLint rule Weight Rule source
any @typescript-eslint/no-explicit-any -2 typescript.mdc
naming @typescript-eslint/naming-convention -1 typescript.mdc, react.mdc
missing-doc jsdoc/require-jsdoc -1 typescript.mdc
react-hooks react-hooks/* -1 react.mdc
architecture manual review (SRP, layering) -1 engineering-principles.mdc
performance manual review -0.5 performance.mdc
style other lint warnings -0.1 project config

Read the full file on GitHub · 105 lines

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. 28d ago Changed · -194 lines ec8e0ee88b98
  2. 3mo ago First seen · 299 lines · 0 tokens per session scan A 916a35cba8d3

Subscribe to this mod's changes

code-convention is a cursor rule published in the GitHub repository adonai-labs/agent-runway (2 stars, last pushed 7d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,193 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.

Related

code-convention compared with cursor rules from other repositories

code-convention next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
code-conventionadonai-labs/agent-runwayCursor rule27d agoMITA0Cursor
optimize-dry-solid-principles-cursorrules-prompt-fPatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A150Cursor
code-optimizationleshchenko1979/fast-mcp-telegramCursor rule5011d agoMITA0Cursor
agent-masterSurya8991/AgentMasterCursor rule215d agoMITB211Cursor
Accessibility-ReviewTheSethRose/DevRulesCursor rule261y agoMITA0Cursor
checkysfAskri/archguardianCursor rule49mo agoMITA0Cursor
prefer_pure_methods_over_impureDeGraciaMathieu/cursor-mdc-rulesCursor rule41y agononeA356Cursor