naming-cheatsheet

naming-cheatsheet is a cursor rule for Cursor from CiscoDevNet/essentials. It costs 1,437 tokens per session, scanned A, original, Apache-2.0.

A reference for naming code consistently across Python, TypeScript, JavaScript, and Pulumi configuration. It lists conventions such as `snake_case`, `camelCase`, and `PascalCase` with examples.

In plain words
What is it for?
Use it when naming functions, variables, classes, modules, constants, configuration keys, or infrastructure resources.
Why use it?
It removes guesswork when choosing names and helps keep a codebase easier to read. It is especially aimed at projects whose main code is Python but also include TypeScript or infrastructure code.

Cursor rule for Cursor

Written for Cursor: installed under .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/ciscodevnet/essentials/naming-cheatsheet
Clone the repo
git clone --depth 1 https://github.com/CiscoDevNet/essentials

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 naming-cheatsheet

README.md
[![agentmods](https://agentmods.dev/badge/rules/ciscodevnet/essentials/naming-cheatsheet.svg)](https://agentmods.dev/rules/ciscodevnet/essentials/naming-cheatsheet)
Your own site
<a href="https://agentmods.dev/rules/ciscodevnet/essentials/naming-cheatsheet"><img src="https://agentmods.dev/badge/rules/ciscodevnet/essentials/naming-cheatsheet.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,437 This file is loaded in full into every session.
When invoked 1,437 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.1 $0.01437 $0.01437
Opus 5 $0.00718 $0.00718
Sonnet 5 $0.00287 $0.00287
Haiku 4.5 $0.00144 $0.00144

Measured yesterday against content hash 84a6f9e4909f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

naming-cheatsheet 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/naming-cheatsheet.mdc · 257 lines

How it starts

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

Naming Cheatsheet

Naming things is hard. This cheatsheet makes it easier. The codebase is primarily Python, so all examples use Python / PEP 8 conventions unless noted otherwise.

Naming Convention by Language

Python (primary) — PEP 8

Kind Convention Examples
Functions, methods, variables snake_case get_user, post_count
Classes, dataclasses, exceptions PascalCase LangSmithConfig, DataplaneOutputs
Module-level constants UPPER_SNAKE_CASE DEFAULT_SEPARATOR
Private / internal names Leading _ _VPC_CIDR, _HOST_BACKEND_URL
Modules and packages snake_case langsmith_hosting, config

TypeScript / JavaScript (secondary — apps/typescript/)

Kind Convention
Variables, functions camelCase
Classes, components, types PascalCase
Constants UPPER_SNAKE_CASE

IaC / Pulumi

Kind Convention Examples
Pulumi logical resource names kebab-case with parent prefix f"{cluster_name}-dataplane"
Pulumi config YAML keys camelCase (Pulumi convention) eksClusterName, langsmithApiKey
Helm release names short kebab-case name="dataplane"

S-I-D

A name must be Short, Intuitive, and Descriptive.

# Bad
a = 5
is_paginatable = a > 10   # unnatural
should_paginatize = a > 10 # made-up verb

# Good
post_count = 5
has_pagination = post_count > 10
should_paginate = post_count > 10

Avoid Contractions

Do not use contractions. They reduce readability.

# Bad
on_itm_clk = lambda: ...

# Good
on_item_click = lambda: ...

Avoid Context Duplication

Remove the context from a name when it is already implied by its container.

class MenuItem:
    # Bad — duplicates the class context
    def handle_menu_item_click(self, event): ...

    # Good — reads as MenuItem.handle_click()
    def handle_click(self, event): ...

Read the full file on GitHub · 257 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. yesterday First seen · 257 lines · 1,437 tokens per session scan A 84a6f9e4909f

Subscribe to this mod's changes

naming-cheatsheet is a cursor rule published in the GitHub repository CiscoDevNet/essentials (7 stars, last pushed 17d ago), licensed Apache-2.0. It adds 1,437 tokens to every session, about $0.0072 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-04.