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.
npx agentmods add rules/getmockd/mockd/cursorrulesgit clone --depth 1 https://github.com/getmockd/mockdWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00803 | $0.00803 |
| Opus 5 | $0.00402 | $0.00402 |
| Sonnet 5 | $0.00161 | $0.00161 |
| Haiku 4.5 | $0.00080 | $0.00080 |
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 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.
How it starts
The opening of the file, as written. The whole thing — 113 lines — stays where its author put it; the contents beside it link to each section on GitHub.
mockd Rules for Cursor
Copy this file to
.cursor/rules/mockd.mdin your project root.
mockd Overview
mockd is a multi-protocol API mock server (HTTP, GraphQL, gRPC, WebSocket, MQTT, SSE, SOAP). It runs as a single binary with an admin API.
MCP Integration
mockd has an MCP server with 18 tools. Configure in .cursor/mcp.json:
{
"mcpServers": {
"mockd": {
"command": "mockd",
"args": ["mcp"]
}
}
}
The MCP server auto-starts a background daemon if no mockd server is running.
Ports
- Mock server: 4280 (never use 8080)
- Admin API: 4290 (never use 8081)
Common Patterns
Create a mock endpoint
mockd add http --path /api/users --status 200 --body '{"users":[]}'
Create CRUD endpoints (auto-generates GET, POST, PUT, DELETE)
mockd add http --path /api/users --stateful
Start with a config file
mockd start -c mocks.yaml
Verify mocks in CI
mockd verify check <mock-id> --exactly 3 || exit 1
Inject chaos for resilience testing
mockd chaos apply flaky # 30% errors
mockd chaos apply offline # 100% 503
mockd chaos disable
Config Format
mocks:
- id: get-users
type: http
http:
matcher:
method: GET
path: /api/users
response:
statusCode: 200
body: '[{"id":"{{uuid}}","name":"{{faker.name}}"}]'
Template Functions
{{uuid}}— UUID v4{{faker.name}},{{faker.email}},{{faker.phone}}— Identity{{faker.creditCard}},{{faker.iban}},{{faker.price}}— Finance{{now}},{{timestamp}}— Time{{request.Method}},{{request.Path}}— Echo request{{random.Int 1 100}}— Random numbers{{faker.words(5)}}— Parameterized
Tables + Extend (Stateful Config)
The recommended way to add stateful CRUD to imported API specs in config files:
version: "1.0"
imports:
- path: api-spec.yaml
as: api
tables:
- name: users
idField: id
extend:
- { mock: api.ListUsers, table: users, action: list }
- { mock: api.CreateUser, table: users, action: create }
- { mock: api.GetUser, table: users, action: get }
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.
- yesterday First seen · 113 lines · 803 tokens per session scan A 810ec6476405
cursorrules is a cursor rule published in the GitHub repository getmockd/mockd (144 stars, last pushed 13d ago), licensed Apache-2.0. It adds 803 tokens to every session, about $0.0040 per session on Opus 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.
Other cursor rules, from other repositories
p
Go项目开发规则 - 遵循Go最佳实践,不使用checkout和reset命令.
cursorrules
Core Go daemon (agentanycastd) for the AgentAnycast P2P runtime. Handles all P2P networking, encryption, NAT traversal, and A2A protocol logic. SDKs connect via gRPC over Unix domain socket.
unit-tests-tdd
TDD required for behavior changes; ≥80% package coverage on touched packages; unit-test conventions.
refactor-large-files
Guidance for splitting large route files into maintainable pieces.
seed-data
Patterns for development seed data — stable UUIDs, realistic data, cross-references.
feature-flags
Feature flag patterns — use when working with feature toggles.