mcp-devtools / rules
Cursor rule13 starsChanged 21 months agoMITArchived repositoryView on GitHub
TypeScript Coding Standards
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository9 other files it gives its agents.
- .cursor/rules/ai-assisted-development.mdcCursor rule
- .cursor/rules/core-libraries-usage.mdcCursor rule
- .cursor/rules/mcp-server-implementation.mdcCursor rule
- .cursor/rules/mcp-tool-implementation.mdcCursor rule
- .cursor/rules/new-package-creation.mdcCursor rule
- .cursor/rules/package-documentation.mdcCursor rule
- .cursor/rules/repository-structure.mdcCursor rule
- .cursor/rules/rules-for-cursor.mdcCursor rule
- .cursor/rules/testing-standards.mdcCursor rule
The file
Show its rules and text
We split this typescript-style.mdc into the rules it gives an agent
18 rules. About 0 are common, 12 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Follow these standards when writing TypeScript code for MCP DevTools:
- Very specific: line 17
Files: Use camelCase for filenames
- Very specific: line 18
Interfaces: Use PascalCase prefixed with I (e.g., IToolParams)
- Very specific: line 19
Types: Use PascalCase (e.g., ToolResponse)
- Very specific: line 20
Functions: Use camelCase (e.g., executeQuery)
- Very specific: line 21
Constants: Use UPPER_SNAKE_CASE for truly constant values
- Distinctive: line 30
Keep files under 300 lines when possible
- Very specific: line 34
Use explicit typing over any
- Distinctive: line 35
Prefer interfaces for object shapes
- Distinctive: line 36
Use type guards for runtime type checking
- Distinctive: line 38
Use readonly for immutable properties
- Distinctive: line 39
Always specify return types for functions
- Distinctive: line 40
Use null coalescing and optional chaining
- Distinctive: line 44
Use typed error classes
- Distinctive: line 51
Use JSDoc for public APIs
- Distinctive: line 54
Keep comments up to date with code changes
- Distinctive: line 58
Use named exports for multiple items
- Distinctive: line 59
Use default export for primary component of a file
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- description: TypeScript Coding Standards globs: packages/*/src/**/*.ts alwaysApply: true --- # TypeScript Coding Standards Follow these standards when writing TypeScript code for MCP DevTools: @file packages/jira/src/tools/getTicket.ts @file tsconfig.json @file .cursor/rules/testing-standards.mdc ## Naming Conventions - **Files**: Use `camelCase` for filenames - **Interfaces**: Use `PascalCase` prefixed with `I` (e.g., `IToolParams`) - **Types**: Use `PascalCase` (e.g., `ToolResponse`) - **Functions**: Use `camelCase` (e.g., `executeQuery`) - **Constants**: Use `UPPER_SNAKE_CASE` for truly constant values - **Variables**: Use `camelCase` - **Private/Protected Members**: Prefix with underscore (e.g., `_privateMethod`) ## Code Organization - One class/interface per file when possible - Group related functions in logical files - Export public API from index.ts files - Keep files under 300 lines when possible ## TypeScript Best Practices - Use explicit typing over `any` - Prefer interfaces for object shapes - Use type guards for runtime type checking - Utilize generics for reusable components - Use readonly for immutable properties - Always specify return types for functions - Use null coalescing and optional chaining ## Error Handling - Use typed error classes - Handle async errors with try/catch - Provide meaningful error messages - Return structured error responses ## Comments - Use JSDoc for public APIs - Comment complex algorithms - Explain "why" not "what" - Keep comments up to date with code changes ## Imports/Exports - Use named exports for multiple items - Use default export for primary component of a file - Group imports by external/internal/types - Avoid circular dependencies
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

