ess-skill-scripts-pytest

ess-skill-scripts-pytest is a cursor rule for Cursor from CiscoDevNet/essentials. It costs 0 tokens per session (576 once invoked), scanned A, original, Apache-2.0.

A pytest configuration guide for Python command-line projects stored inside a skill's scripts folder. Pytest is a tool for running Python tests; these settings prevent test caches from being copied into deployed skills and help shared-package tests run reliably.

In plain words
What is it for?
Use it when configuring or running pytest for a skill's scripts project, especially when multiple skills share a Python package.
Why use it?
It removes unwanted test files from skill packages and avoids test collection problems caused by shared Python code and import order.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when configuring or running pytest for a skill's scripts project, especially when multiple skills share a Python package.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/ciscodevnet/essentials/ess-skill-scripts-pytest
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.

Clone the repo
git clone --depth 1 https://github.com/CiscoDevNet/essentials

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 ess-skill-scripts-pytest

README.md
[![agentmods](https://agentmods.dev/badge/rules/ciscodevnet/essentials/ess-skill-scripts-pytest/github.svg)](https://agentmods.dev/rules/ciscodevnet/essentials/ess-skill-scripts-pytest)
Your own site
<a href="https://agentmods.dev/rules/ciscodevnet/essentials/ess-skill-scripts-pytest"><img src="https://agentmods.dev/badge/rules/ciscodevnet/essentials/ess-skill-scripts-pytest/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 ess-skill-scripts-pytest

Your own site · 80×15
<a href="https://agentmods.dev/rules/ciscodevnet/essentials/ess-skill-scripts-pytest"><img src="https://agentmods.dev/badge/rules/ciscodevnet/essentials/ess-skill-scripts-pytest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 576 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.00000 $0.00576
Opus 5.5 $0.00000 $0.00230
Sonnet 5.5 $0.00000 $0.00115
Haiku 4.5 $0.00000 $0.00058

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

Security

Grade A, and why

ess-skill-scripts-pytest 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 7d 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/ess-skill-scripts-pytest.mdc · 52 lines

How it starts

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

Testing a skill's scripts/ project

A skill can carry its CLI as a uv project in scripts/. Code shared between skills lives in one skill's scripts/ and is a non-editable path dependency of the others, so that running a CLI never writes into an installed sibling. Two pytest defaults break this layout.

Turn off the pytest cache

uv run pytest skills/<name>/scripts makes that scripts/ directory pytest's root when no config file above it configures pytest, and pytest writes .pytest_cache there. Skill installers such as APM copy every file in the skill directory, git-ignored files included, so the cache reaches the lock file and the deployed copy. In every scripts/pyproject.toml:

[tool.pytest.ini_options]
addopts = "-p no:cacheprovider"

Run a shared package's tests apart from its consumers

A consumer's virtualenv holds a built copy of the shared package, which excludes test files, and pytest collects the source tree. Python loads a package once. Under pytest's default import mode, prepend, a test module is imported by its package name, such as shared_lib.test_main. If a consumer's tests imported shared_lib first, pytest looks for the test module in the built copy and fails with ModuleNotFoundError. Order decides: with the shared tests first, both suites pass.

This applies to every consumer in the same virtualenv, skill or not.

  • Run each scripts/ suite in its own pytest command, and document it that way in the skill's references.
  • To run a shared package's tests together with a consumer's, pass --import-mode=importlib on the command line.
  • Do not put --import-mode=importlib in scripts/pyproject.toml. Given several paths, pytest picks its root from their common ancestor and loads a config file above both skills, usually the repo root's, so the skill's setting never reaches a combined run.
  • Do not set it repo-wide without first collecting the whole repo in both modes (pytest --co -q --import-mode=<mode>) and comparing the counts. Other suites can depend on the default mode.
  • Keep the shared package non-editable and its tests out of its build. Making it editable to fix collection writes __pycache__ into the installed sibling skill.

Read the full file on GitHub · 52 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. 7d ago First seen · 52 lines · 0 tokens per session scan A ba63f208a0cc

Subscribe to this mod's changes

ess-skill-scripts-pytest is a cursor rule published in the GitHub repository CiscoDevNet/essentials (7 stars, last pushed 8d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 576 tokens. 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-11-24.

Related

ess-skill-scripts-pytest compared with cursor rules from other repositories

ess-skill-scripts-pytest next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ess-skill-scripts-pytestCiscoDevNet/essentialsCursor rule78d agoApache-2.0A0Cursor
dashboard-testingAutomattic/wp-calypsoCursor rule13kyesterdayGPL-2.0A0Cursor
solarStahlwalker/framework-solarCursor rule212d agoMITA0Cursor
no-barrel-filesprisma/ormCursor rule48ktodayApache-2.0A0Cursor
explicit-opt-in-over-diagnosticsprisma/ormCursor rule48ktodayApache-2.0A730Cursor
no-backward-compatibilityprisma/ormCursor rule48ktodayApache-2.0A0Cursor
test-packagesprisma/ormCursor rule48ktodayApache-2.0A5Cursor