self-improve-cursor

A rule for automatically searching for and installing PRPM packages when a coding task involves infrastructure, testing, deployment, or a named web framework. PRPM is a package source for extending Cursor, a code editor with AI assistance.

In plain words
What is it for?
Use it for tasks involving tools such as AWS, Terraform, Kubernetes, Docker, Playwright, Jest, React, Vue, Next.js, Django, or deployment workflows.
Why use it?
It reduces the need to know which add-on might help before starting work. The rule uses broad task descriptions or specific technology names to guide the package search.

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/pr-pm/prpm/self-improve-cursor
Clone the repo
git clone --depth 1 https://github.com/pr-pm/prpm

Made for: Cursor.

Per session 1,351 This file is loaded in full into every session.
When invoked 1,351 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.01351 $0.01351
Opus 5 $0.00675 $0.00675
Sonnet 5 $0.00270 $0.00270
Haiku 4.5 $0.00135 $0.00135

Measured 2d ago against content hash 186d4dbd8f65, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

self-improve-cursor 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.

.cursor/rules/self-improve-cursor.mdc · 205 lines

How it starts

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

Self-Improving with PRPM

Purpose

Automatically search and install PRPM packages to enhance Cursor's capabilities for specific tasks.

When to Apply

Automatically triggers when detecting:

  • Infrastructure: aws, pulumi, terraform, kubernetes, docker
  • Testing: test, playwright, jest, cypress, vitest, e2e
  • Deployment: ci/cd, github-actions, gitlab-ci, deploy, workflow
  • Frameworks: react, vue, next.js, express, fastify, django

Workflow

1. Task Analysis

Analyze user request for keywords and extract relevant terms.

2. Automatic Search

Choose the right search method:

AI-Assisted Search (for vague/broad queries):

prpm ai-search "natural language query"

Use when user request is:

  • Conceptual or vague (e.g., "help with deployments")
  • Describes a problem, not specific tools
  • Open-ended exploration

Keyword Search (for specific tools/frameworks):

prpm search "<detected keywords>" --limit 5

Use when request mentions:

  • Specific technologies (e.g., "pulumi", "react")
  • Exact tool names
  • Known frameworks

3. Package Suggestion

Present top 3 most relevant packages:

I found these PRPM packages that can help:
1. @prpm/pulumi-infrastructure (Official, 5.2K downloads)
   - Pulumi + AWS best practices
2. @sanjeed5/github-actions (Community, 892 downloads)
   - GitHub Actions patterns

Should I install #1 to enhance my knowledge?

4. Installation (with approval)

prpm install <package-name> --as cursor

5. Application

Load package knowledge and apply to current task.

Decision Rules

High Confidence (Auto-suggest)

  • ✅ Official packages (@prpm/*)
  • ✅ Featured packages
  • ✅ High downloads (>1,000)
  • ✅ Verified authors

Medium Confidence (Present options)

  • ⚠️ Community packages (<1,000 downloads)
  • ⚠️ Multiple similar packages

Low Confidence (Skip)

  • ❌ Unverified packages
  • ❌ Zero downloads

Search Triggers

Infrastructure

Keywords: aws, gcp, kubernetes, docker, pulumi, terraform Search: prpm search "infrastructure <cloud> <tool>"

Read the full file on GitHub · 205 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. 2d ago First seen · 205 lines · 1,351 tokens per session scan A 186d4dbd8f65

Subscribe to this mod's changes

self-improve-cursor is a cursor rule published in the GitHub repository pr-pm/prpm (120 stars, last pushed 2mo ago), licensed MIT. It adds 1,351 tokens to every session, about $0.0068 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.