pinrag: Skill for Cursor

.cursor/skills/run-pinrag-unit-tests/SKILL.md

run-pinrag-unit-tests is a skill for Cursor from ndjordjevic/pinrag. It costs 51 tokens per session (471 once invoked), scanned A, original, MIT.

A project-specific command that runs the complete PinRAG test suite with pytest, a Python testing tool. It loads API keys from a local Cursor configuration file, prepares the project with uv, and then runs the tests.

In plain words
What is it for?
It is for running all PinRAG tests locally, including tests that use external AI services, before submitting changes or checking a build.
Why use it?
It standardizes the local test command and avoids manually copying credentials into the shell. It also sets default language-model settings needed by some integration tests.

Skill for Cursor

Written for Cursor: installed under .cursor/.

This is ndjordjevic/pinrag's own configuration. It tells Cursor how to work on pinrag 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 pinrag configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ndjordjevic/pinrag. 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/ndjordjevic/pinrag/main/.cursor/skills/run-pinrag-unit-tests/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ndjordjevic/pinrag

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 run-pinrag-unit-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/ndjordjevic/pinrag/run-pinrag-unit-tests/github.svg)](https://agentmods.dev/skills/ndjordjevic/pinrag/run-pinrag-unit-tests)
Your own site
<a href="https://agentmods.dev/skills/ndjordjevic/pinrag/run-pinrag-unit-tests"><img src="https://agentmods.dev/badge/skills/ndjordjevic/pinrag/run-pinrag-unit-tests/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 run-pinrag-unit-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/ndjordjevic/pinrag/run-pinrag-unit-tests"><img src="https://agentmods.dev/badge/skills/ndjordjevic/pinrag/run-pinrag-unit-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 471 The whole file, excluding the scripts and references it only reads on demand.
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.00051 $0.00471
Opus 5 $0.00026 $0.00235
Sonnet 5 $0.00010 $0.00094
Haiku 4.5 $0.00005 $0.00047

Measured 11d ago against content hash 8d0addeefacc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

run-pinrag-unit-tests 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 11d 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/skills/run-pinrag-unit-tests/SKILL.md · 22 lines

What it actually says

Run PinRAG tests

From the pinrag repo root (directory with pyproject.toml), run the evalpytest line below (one chained command). It reads ~/.cursor/mcp.jsonmcpServers.pinrag-dev.env (OpenAI, OpenRouter, Anthropic, etc.—not “OpenAPI”). Use another mcpServers key: set it on the same line (see export below).

Secrets: never paste mcp.json values into chat.

export PINRAG_MCP_JSON_KEY="${PINRAG_MCP_JSON_KEY:-pinrag-dev}"; eval "$(python3 -c "import json, pathlib, shlex, os; k=os.environ[\"PINRAG_MCP_JSON_KEY\"]; e=json.loads((pathlib.Path.home()/\".cursor/mcp.json\").read_text()).get(\"mcpServers\",{}).get(k,{}).get(\"env\")or{}; [print(\"export \"+n+\"=\"+shlex.quote(str(e[n]))) for n in sorted(e)]")" && export PINRAG_LLM_PROVIDER="${PINRAG_LLM_PROVIDER_TEST:-openai}" PINRAG_LLM_MODEL="${PINRAG_LLM_MODEL_TEST:-gpt-4o-mini}" && uv sync --all-extras && uv run pytest

The PINRAG_LLM_* exports avoid failures when mcp.json pins OpenRouter but integration tests (e.g. multi-query) still hit OpenAI chat with a non-OpenAI model id. Drop them if your MCP entry already uses PINRAG_LLM_PROVIDER=openai with a real OpenAI chat model.

Fast run (no integration / PyPI MCP):
uv sync --extra dev && uv run pytest -m "not integration and not pypi_mcp"

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. 11d ago First seen · 22 lines · 51 tokens per session scan A 8d0addeefacc

Subscribe to this mod's changes

run-pinrag-unit-tests is a skill published in the GitHub repository ndjordjevic/pinrag (2 stars, last pushed 5mo ago), licensed MIT. It adds 51 tokens to every session and 471 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

test-scenarios

Validate feature with real test scenarios before commit. Verifies environment (Docker, VPN, DB), seeds test data, runs unit + integration tests, and executes manual smoke tests against local or staging. Use after /code-review and before /commit. Use when the user says "test", "testar", "test scenarios", "smoke test"…

ivanhoinacki/team-exp-claude-config · 132 tokens

workflow-patterns

Use this skill when implementing tasks according to Conductor's TDD workflow, handling phase checkpoints, managing git commits for tasks, or understanding the verification protocol.

wshobson/agents · 35 tokens

ultracite

Ultracite is a zero-config linting and formatting preset for JavaScript/TypeScript projects. Use when: (1) Setting up or initializing Ultracite in a project (ultracite init), (2) Running linting or formatting commands (check, fix, doctor), (3) Writing or reviewing JS/TS code in a project that uses Ultracite — to…

haydenbleasel/ultracite · 142 tokens

skillshare-implement-feature

Implement a feature from a spec file or description using TDD workflow. Use this skill whenever the user asks to: add a new CLI command, implement a feature from a spec, build new functionality, add a flag, create a new internal package, or write Go code for skillshare. This skill enforces test-first development…

runkids/skillshare · 114 tokens

go-testing

Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.

Gentleman-Programming/gentle-ai · 26 tokens

designing-tests

Designs and implements testing strategies for any codebase. Use when adding tests, improving coverage, setting up testing infrastructure, debugging test failures, or when asked about unit tests, integration tests, or E2E testing.

CloudAI-X/claude-workflow-v2 · 48 tokens