lodgify-mcp / rules
Cursor rule4 starsChanged 16 months agoMITView on GitHub
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 4,263 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 repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/architecture-patterns.mdcCursor rule
- .cursor/rules/cursor_rules.mdcCursor rule
- .cursor/rules/development-workflow.mdcCursor rule
- .cursor/rules/mcp-development.mdcCursor rule
- .cursor/rules/project-overview.mdcCursor rule
- .cursor/rules/self_improve.mdcCursor rule
- .cursor/rules/taskmaster/dev_workflow.mdcCursor rule
- .cursor/rules/taskmaster/taskmaster.mdcCursor rule
- .cursor/rules/testing-guidelines.mdcCursor rule
The file
Show its rules and text
We split this coding-standards.mdc into the rules it gives an agent
17 rules. About 0 are common, 13 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 4
Follow the Biome configuration in biome.json:
- Very specific: line 13
Follow the strict configuration in tsconfig.json:
- Distinctive: line 27
Module Size: Keep each module under 250 lines for maintainability
- Distinctive: line 29
Registry Pattern: Use central registries for tools and resources
- Very specific: line 30
Dependency Injection: Use closure-based getClient() pattern
- Distinctive: line 33
Centralized: All errors go through src/mcp/errors/
- Distinctive: line 34
Sanitization: Remove sensitive data before returning to user
- Distinctive: line 35
Type Safety: Use typed error classes from src/core/errors/
- Distinctive: line 36
Logging: Use structured logging with appropriate levels
- Distinctive: line 39
When creating new tools in src/mcp/tools/:
- Very specific: line 71
Type Imports: Use import type for type-only imports
- Distinctive: line 74
JSDoc: Use for public APIs and complex functions
- Distinctive: line 75
README: Keep README.md updated with new features
- Distinctive: line 76
Changelog: Update CHANGELOG.md for all changes
- Distinctive: line 77
Examples: Add examples to examples/ for new features
- Distinctive: line 80
API Keys: Never log or expose API keys
- Distinctive: line 81
Input Validation: Always validate inputs with Zod schemas
≈ “Common” is an estimate: at least 1 in 5 of the 7,111 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
# Coding Standards for Lodgify MCP Server
## Code Style (Biome Configuration)
Follow the Biome configuration in [biome.json](mdc:biome.json):
- **Indentation**: 2 spaces
- **Line Width**: 100 characters
- **Quotes**: Single quotes for strings
- **Semicolons**: As needed (automatic)
- **Trailing Commas**: Always
- **Line Endings**: LF
## TypeScript Standards
Follow the strict configuration in [tsconfig.json](mdc:tsconfig.json):
- **Strict Mode**: Enabled
- **Target**: ES2022
- **Module**: NodeNext
- **No Unused Locals/Parameters**: Enabled
- **No Implicit Returns**: Enabled
## Naming Conventions
- **Files**: `kebab-case` (e.g., `lodgify-orchestrator.ts`)
- **Types/Classes**: `PascalCase` (e.g., `LodgifyOrchestrator`)
- **Variables/Functions**: `camelCase` (e.g., `getClient`)
- **Constants**: `UPPER_SNAKE_CASE` (e.g., `MAX_RETRY_ATTEMPTS`)
## Module Organization
- **Module Size**: Keep each module under 250 lines for maintainability
- **Single Responsibility**: Each module should have one clear purpose
- **Registry Pattern**: Use central registries for tools and resources
- **Dependency Injection**: Use closure-based `getClient()` pattern
## Error Handling
- **Centralized**: All errors go through [src/mcp/errors/](mdc:src/mcp/errors/)
- **Sanitization**: Remove sensitive data before returning to user
- **Type Safety**: Use typed error classes from [src/core/errors/](mdc:src/core/errors/)
- **Logging**: Use structured logging with appropriate levels
## MCP Tool Implementation Pattern
When creating new tools in [src/mcp/tools/](mdc:src/mcp/tools/):
```typescript
// 1. Define Zod schema for input validation
const toolSchema = z.object({
propertyId: z.string().min(1),
// ... other parameters
});
// 2. Create tool registration object
export const myTool = {
name: 'lodgify_my_tool',
description: 'Description of what this tool does',
inputSchema: toolSchema,
handler: async (params) => {
const client = getClient();
// Implementation
}
};
```
## Testing Standards
- **Test Location**: [tests/](mdc:tests/) mirroring [src/](mdc:src/) structure
- **Framework**: Bun test
- **Coverage**: Aim for ≥90% for client code
- **Mocking**: Mock external HTTP calls
- **Deterministic**: Tests should be deterministic and repeatable
## Import Organization
- **External Libraries**: First
- **Internal Modules**: Second (alphabetical)
- **Relative Imports**: Last
- **Type Imports**: Use `import type` for type-only imports
## Documentation
- **JSDoc**: Use for public APIs and complex functions
- **README**: Keep [README.md](mdc:README.md) updated with new features
- **Changelog**: Update [CHANGELOG.md](mdc:CHANGELOG.md) for all changes
- **Examples**: Add examples to [examples/](mdc:examples/) for new features
## Security Guidelines
- **API Keys**: Never log or expose API keys
- **Input Validation**: Always validate inputs with Zod schemas
- **Error Messages**: Sanitize error messages to avoid information leakage
- **Read-Only Mode**: Respect `LODGIFY_READ_ONLY` environment variable
description:
globs:
alwaysApply: true
---
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.

