coding-style

coding-style is a cursor rule for Cursor from lacymorrow/paperclip-hub. It costs 0 tokens per session (486 once invoked), scanned A, original, MIT.

Coding-style guidelines define naming, file organization, TypeScript usage, and React component conventions for a codebase.

In plain words
What is it for?
Use them when creating or editing TypeScript and React files, choosing names, organizing components, and handling comments and types.
Why use it?
They reduce inconsistent code and make files easier to read, review, maintain, and extend.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use them when creating or editing TypeScript and React files, choosing names, organizing components, and handling comments and types.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/lacymorrow/paperclip-hub/coding-style
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/lacymorrow/paperclip-hub

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 coding-style

README.md
[![agentmods](https://agentmods.dev/badge/rules/lacymorrow/paperclip-hub/coding-style/github.svg)](https://agentmods.dev/rules/lacymorrow/paperclip-hub/coding-style)
Your own site
<a href="https://agentmods.dev/rules/lacymorrow/paperclip-hub/coding-style"><img src="https://agentmods.dev/badge/rules/lacymorrow/paperclip-hub/coding-style/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 coding-style

Your own site · 80×15
<a href="https://agentmods.dev/rules/lacymorrow/paperclip-hub/coding-style"><img src="https://agentmods.dev/badge/rules/lacymorrow/paperclip-hub/coding-style.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 486 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.00486
Opus 5.5 $0.00000 $0.00194
Sonnet 5.5 $0.00000 $0.00097
Haiku 4.5 $0.00000 $0.00049

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

Security

Grade A, and why

coding-style 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/coding-style.mdc · 84 lines

How it starts

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

Coding Style Guidelines

Naming Conventions

  • Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError)
  • Use kebab-case for file names (e.g., user-profile.tsx)
  • Use PascalCase for component names (e.g., UserProfile)
  • Use camelCase for variables and functions
  • Use SCREAMING_SNAKE_CASE for constants

File Structure

  • Exported component
  • Subcomponents
  • Helpers
  • Static content
  • Types
  • Keep files small (<200 lines)

TypeScript Usage

  • Use TypeScript for all code
  • Prefer interfaces over types
  • Avoid enums; use maps instead
  • Use functional components with TypeScript interfaces
  • Pre-emptively add types to all functions and variables
  • Fix all TypeScript errors and warnings
  • Use proper type imports

React Components

  • Use arrow functions for components:
    ✅ export const Component = () => { ... }
    ❌ export function Component() { ... }
    ❌ export default function Component() { ... }
    
  • One component per file
  • Use named exports
  • Keep components focused and small
  • Document complex logic

Comments

  • Pre-emptively add comments to explain "why" behind the code
  • Preserve existing comments unless specifically asked to modify
  • Use callouts and examples:
    /*
     * Logging configuration
     * @see https://nextjs.org/docs/app/api-reference/next-config-js/logging
     */
    
  • Document complex logic and important decisions

Code Organization

  • Group related code together
  • Use index files for exports
  • Separate concerns appropriately
  • Follow DRY principles
  • Pre-emptively optimize for production
  • Keep code maintainable and readable

Error Handling

  • Handle all potential errors
  • Provide meaningful error messages
  • Use proper error boundaries
  • Log errors appropriately
  • Document error scenarios

Testing

  • Write tests for new functionality
  • Test edge cases
  • Follow existing test patterns
  • Document test coverage expectations
  • Keep tests maintainable

Best Practices

  • Use open-source libraries when beneficial
  • Follow security best practices
  • Optimize for performance
  • Consider accessibility
  • Document architecture decisions
  • Maintain consistency across codebase

Read the full file on GitHub · 84 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 · 84 lines · 0 tokens per session scan A efc5fc688503

Subscribe to this mod's changes

coding-style is a cursor rule published in the GitHub repository lacymorrow/paperclip-hub (15 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 486 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-11-10.

Related

coding-style compared with cursor rules from other repositories

coding-style next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
coding-stylelacymorrow/paperclip-hubCursor rule15yesterdayMITA0Cursor
update-ai-sdkgiselles-ai/giselleCursor rule560yesterdayApache-2.0A11Cursor
functionsthedaviddias/llms-txt-hubCursor rule926yesterdaynoneA506Cursor
technical-stackKaelSensei/MagicAIBuilderCursor rule2todayMITA1,259Cursor
typescript-code-generation-rulesWebDevPeterGriffin/The-VibeCode-BibleCursor rule427d agononeA402Cursor
typescript-coding-styleWebDevPeterGriffin/The-VibeCode-BibleCursor rule427d agononeA128Cursor
react-and-typescript-general-rulesWebDevPeterGriffin/The-VibeCode-BibleCursor rule427d agononeA142Cursor