agentmd: Cursor rule for Cursor

.cursorrules

cursorrules is a cursor rule for Cursor from mikiships/agentmd. It costs 552 tokens per session, scanned A, original, MIT.

A collection of Cursor IDE rules that guide AI-assisted coding in a Python project. Cursor is a code editor with built-in AI interactions.

In plain words
What is it for?
Applying coding, testing, linting, formatting, file-handling, security, and change-scope rules during every AI interaction in the project.
Why use it?
It sets project-specific expectations for reading files, making focused changes, testing, formatting, typing, and avoiding unsafe or out-of-scope edits.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions Cursor.

This is mikiships/agentmd's own configuration. It tells Cursor how to work on agentmd itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agentmd configures →

Reuse

Borrowing it

Nothing to install: this file belongs to mikiships/agentmd. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/mikiships/agentmd/main/.cursorrules
Clone the repo
git clone --depth 1 https://github.com/mikiships/agentmd

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 cursorrules

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

Your own site · 80×15
<a href="https://agentmods.dev/rules/mikiships/agentmd/cursorrules"><img src="https://agentmods.dev/badge/rules/mikiships/agentmd/cursorrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 552 This file is loaded in full into every session.
When invoked 552 The same file — it is already loaded in full.
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.00552 $0.00552
Opus 5.5 $0.00221 $0.00221
Sonnet 5.5 $0.00110 $0.00110
Haiku 4.5 $0.00055 $0.00055

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

Security

Grade A, and why

cursorrules 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 1mo ago.

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.

.cursorrules · 64 lines

How it starts

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

.cursorrules

Cursor IDE rules. These rules are applied to every AI interaction in this project.

Always

  • Read the relevant source files before making changes.
  • Make minimal, targeted edits — avoid reformatting unrelated code.
  • Respect the existing code style (indentation, naming, import order).
  • Run python3 -m pytest tests/ -x after every non-trivial change.
  • Run ruff check . && ruff format --check . before finalizing changes.
  • Add type annotations to all new public functions.
  • Use pathlib.Path instead of os.path for file operations.

Never

  • Never commit API keys, tokens, or credentials.
  • Never delete tests to make the suite pass.
  • Never use TODO comments without a linked issue or explanation.
  • Never make changes outside the scope of the current task without flagging them.
  • Never use except: without specifying the exception type.
  • Never use eval() or exec() on untrusted input.

Project Overview

Primary languages: Python Package managers: pip CI: GitHub Actions

Build, Test, and Lint Commands

Install dependencies:

pip install -e '.[dev]'

Run tests:

python3 -m pytest tests/ -x

Lint / format:

ruff check . && ruff format --check .

Directory Structure

Top-level directories: .github, agentmd, tests Test roots: tests Most-changed directories: agentmd, tests, README.md, pyproject.toml, progress-log.md

File Patterns

Test files: tests/** Python source: **/*.py Python tests: **/test_*.py, **/*_test.py

Conventions Inferred from Codebase

Commit prefix style: feat, fix, chore, docs, feat(d3) (follow this pattern) Common file extensions: .pyc, .py, .md, .toml, .yml

  • Python: use type hints on all public functions
  • Python: snake_case for functions/variables, PascalCase for classes
  • Tests: files named test_*.py, functions named test_*

Context Preferences

When writing or reviewing code, prefer to include in context:

  • tests/ (primary code locations)
  • The file being edited and its direct imports.
  • Relevant test files alongside source files.
  • Configuration files when modifying build or tooling behavior.

Read the full file on GitHub · 64 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. 1mo ago First seen · 64 lines · 552 tokens per session scan A d6dd9c33ccc0

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository mikiships/agentmd (12 stars, last pushed 7mo ago), licensed MIT. It adds 552 tokens to every session, about $0.0022 per session on Opus 5.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-08-30.