agentleFS
enunoenuno/unifi-mcp-server/.cursor/rules/README.md

unifi-mcp-server / rules

Cursor rule294 starsChanged 18 days agoApache-2.0View on GitHub

This directory contains project-specific rules and guidelines for Cursor IDE AI assistants. These rules migrated from the legacy .cursorrules format to the current modular .mdc (Markdown Cursor) standard. Rules are organized by domain for better context-specific application: core-principles.mdc - Fundamental coding principles mcp-tools.mdc - MCP tool implementation patterns unifi-api.mdc - UniFi API integration guidelines project-context.mdc - Project overview and context workflow.mdc - Development workflow environment-setup.mdc - Configuration management common-mistakes.mdc - Best practices and pitfalls Cursor IDE automatically loads these rules…

We split this README.md into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When adding new rules:

    line 82
  2. Very specific:

    Create a new .mdc file with descriptive name

    line 84
  3. Very specific:

    Add YAML frontmatter with description, globs, and alwaysApply

    line 85
  4. Distinctive:

    Follow existing format and style

    line 86
  5. Distinctive:

    Update this README with brief description

    line 87

≈ “Common” is an estimate: at least 1 in 5 of the 6,350 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
README.md

Cursor Rules for UniFi MCP Server

This directory contains project-specific rules and guidelines for Cursor IDE AI assistants. These rules migrated from the legacy .cursorrules format to the current modular .mdc (Markdown Cursor) standard.

File Organization

Rules are organized by domain for better context-specific application:

Core Rules (Always Applied)

core-principles.mdc - Fundamental coding principles

  • Async-first development patterns
  • Type safety and validation
  • Security-first design
  • Comprehensive testing requirements
  • Documentation standards

mcp-tools.mdc - MCP tool implementation patterns

  • Tool structure and organization
  • Safety checks and confirm parameters
  • Error handling patterns
  • Cache invalidation strategies

unifi-api.mdc - UniFi API integration guidelines

  • Authentication with API keys
  • Cloud vs local gateway modes
  • Rate limiting considerations
  • Error handling patterns
  • Official documentation references

Contextual Rules

project-context.mdc - Project overview and context

  • Technology stack
  • Architecture patterns
  • File structure conventions
  • Naming standards

workflow.mdc - Development workflow

  • Git branching and commit practices
  • Testing procedures
  • Code quality checklist
  • Pre-commit requirements

environment-setup.mdc - Configuration management

  • Environment variables
  • Configuration loading order
  • Security best practices

common-mistakes.mdc - Best practices and pitfalls

  • Common mistakes to avoid
  • Quick command reference
  • Key resources
  • Reminders

How to Use

Cursor IDE automatically loads these rules based on:

  1. File patterns (globs) - Rules apply when editing matching files
  2. Always apply flag (alwaysApply: true) - Rules always loaded regardless of context
  3. File context - Rules apply when working in specific directories

Migration Notes

Migrated from legacy .cursorrules format on 2025-01-XX:

  • Split monolithic rules into focused .mdc files
  • Added metadata headers for better organization
  • Maintained all original guidelines and patterns
  • Improved discoverability with descriptive file names

Contributing

When adding new rules:

  1. Create a new .mdc file with descriptive name
  2. Add YAML frontmatter with description, globs, and alwaysApply
  3. Follow existing format and style
  4. Update this README with brief description

Related Documentation

For more detailed guidelines, see:

  • docs/AI-Coding/AI_CODING_ASSISTANT.md - AI coding assistant guidelines
  • docs/AI-Coding/AI_GIT_PRACTICES.md - Git best practices
  • AGENTS.md - Agent guidelines and rules
  • CONTRIBUTING.md - General contribution guidelines

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.