cursorrules

A general set of coding rules for an AI agent working in a software repository. It covers planning, minimal changes, tests, linting, mocks, and project conventions.

In plain words
What is it for?
For guiding implementation tasks that require an issue-based plan, code changes, tests, lint checks, and adherence to existing repository patterns.
Why use it?
It makes the agent's work more predictable and helps prevent unnecessary edits or unverified changes.

Cursor rule for Cursor

Install

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.

agentmods
npx agentmods add rules/snyk/agentic-integration-wrappers/cursorrules
Clone the repo
git clone --depth 1 https://github.com/snyk/agentic-integration-wrappers

Made for: Cursor.

Per session 702 This file is loaded in full into every session.
When invoked 702 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00702 $0.00702
Opus 5 $0.00351 $0.00351
Sonnet 5 $0.00140 $0.00140
Haiku 4.5 $0.00070 $0.00070

Measured 2d ago against content hash e1834053db23, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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 · 45 lines

What it actually says

** general **

  • always be concise, direct and don't try to appease me.
  • DOUBLE CHECK THAT YOUR CHANGES ARE REALLY NEEDED. ALWAYS STICK TO THE GIVEN GOAL, NOT MORE.
  • I repeat: don't optimize, don't refactor if not needed.
  • Adhere to the rules, fix linting & test issues that are newly introduced.
  • the issueID is usually specified in the current branch in the format IDE-XXXX.
  • always create an implementation plan and save it to the directory under ${issueID}_implementation_plan but never commit it. take it as a reference for each step and how to proceed. Get confirmation that the plan is ok.
  • Maintain existing code patterns and conventions

** how to implement **

  • don't comment what is done, instead comment why something is done if the code is not clear
  • always write and update test cases. iterate until they pass.
  • please check the makefile - make lint runs the linter, other targets might be relevant as well.
  • use existing mocks, don't write new ones.
  • if you use mocks, use gomock to generate them.
  • always run the tests after editing.
  • always use the linter
  • don't change code that does not need to be changed. only do the minimum changes.
  • this is not a library. if files are not used or needed anymore, delete them instead of deprecating them.
  • if a tool call fails, analyze why it failed and correct your approach. don't prompt the user for help.
  • if you don't know something, read the code instead of assuming it.
  • commenting out code to fix errors is not a solution. instead, fix the error.

** security **

  • determine the absolute path of the project directory. you can do that e.g. by executing pwd on the shell within the directory.
  • always use snyk for sca and code scanning. scan with both tools. you need to pass the absolute path of the directory we are scanning.
  • run snyk code tests after each edit. pass the absolute path of the project directory as a parameter
  • run snyk sca tests after updating go.mod and pass the absolute path of the project directory as a parameter.
  • run snyk sca and code test before committing. if not test data, fix issues before committing.

** fixing issues **

  • fix security issues if they are fixable. take the snyk scan results and the test results as input
  • don't fix test data

** committing **

  • when asked to commit, always use conventional commit messages (Conventional Commit Style (Subject + Body)). be descriptive in the body. if you find a JIRA issue (IDE-XXXX) in the branch name, use it as a postfix to the subject line in the format [IDE-XXXX]
  • consider all commits in the current branch when committing, to have the context of the current changes. when asked to push, always use 'git push --set-upstream origin $(git_current_branch)' with git_current_branch being the current branch we are on
  • never force push
  • never push without asking
  • never commit the hashicorp gomod
  • regularly fetch main branch and offer to merge it into git_current_branch
  • after pushing offer to create a PR on github. analyze the changes by comparing the current branch ($(git_current_branch)) with origin/main, and craft a PR description and title. use the github pr template in this repository
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. 2d ago First seen · 45 lines · 702 tokens per session scan A e1834053db23

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository snyk/agentic-integration-wrappers (11 stars, last pushed 26d ago), licensed Apache-2.0. It adds 702 tokens to every session, about $0.0035 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.