dependency-selection

A set of rules for choosing Composer dependencies, which are reusable PHP packages managed through Packagist or Git repositories. It defines checks for package activity and compatibility before adding a dependency.

In plain words
What is it for?
Use it whenever a Laravel or PHP project needs a new package from Packagist, GitHub, or another Composer-compatible source.
Why use it?
It helps avoid selecting abandoned or unsuitable libraries and makes the decision reviewable. The rules also distinguish new packages from version updates and removals.

Cursor rule

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/pekral/cursor-rules/dependency-selection
Clone the repo
git clone --depth 1 https://github.com/pekral/cursor-rules
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,987 The whole file, excluding the scripts and references it only reads on demand.
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.00022 $0.01987
Opus 5 $0.00011 $0.00993
Sonnet 5 $0.00004 $0.00397
Haiku 4.5 $0.00002 $0.00199

Measured yesterday against content hash b471734fa3e8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dependency-selection 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.

rules/php/dependency-selection.mdc · 78 lines

How it starts

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

Scope

Apply this rule every time a skill needs to propose a new Composer dependency — whether the package is being looked up on Packagist (the default registry), on GitHub directly (VCS repository, private fork, unpublished package), or on any other Composer-compatible source. The goal is to keep the project off abandoned and unmaintained libraries and to make the selection auditable.

The rule does not trigger for:

  • bumping a version of a package that is already in composer.json — that is owned by @skills/composer-update/SKILL.md (the activity gate below still applies if the bump uncovers an abandoned upstream)
  • removing a package — no activity check needed
  • internal pekral/* or other first-party packages owned by the same organisation — the Activity gate below is informational only, the Compatibility gate still applies

Activity gate (mandatory — every candidate must pass before it can be considered)

A candidate package qualifies only when all of the following hold. Evaluate each candidate against the canonical source (Packagist for registered packages, the GitHub repository for VCS / unregistered packages) — never guess from memory or from the package name alone.

  1. Recent activity (≤ 12 months). The most recent commit on the default branch and the most recent tagged release must both be no older than 12 months from today's date. A package with a recent commit but no release in the last 12 months still qualifies only when the recent commit is on the default branch and the project's release cadence (visible from prior tags) is documented as low-frequency-by-design (PSR specs, mature standalone utilities). Cite the documented cadence in the selection note.
  2. Not archived. The GitHub repository must not be archived (archived: false in the repo metadata).
  3. Not abandoned on Packagist. When the candidate is registered on Packagist, the package page must not carry the abandoned flag. When abandoned with a documented replacement, follow the replacement pointer and re-run the whole selection against the suggested successor — never adopt an abandoned package even if it still appears active on GitHub.
  4. Tagged release exists. The repository ships at least one Composer-installable tagged release (v*, *.*.*, or any SemVer tag Composer recognises). Composer's dev-main / dev-master constraints do not qualify a candidate; depending on a moving branch is prohibited.
  5. Issue tracker is responsive. Open issues / PRs receive at least one maintainer reply within the last 12 months. A repository with > 50 open issues and zero maintainer activity in the last 12 months fails this gate even when the commit history looks healthy (drive-by commits without triage are not maintenance).

Read the full file on GitHub · 78 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. yesterday First seen · 78 lines · 22 tokens per session scan A b471734fa3e8

Subscribe to this mod's changes

dependency-selection is a cursor rule published in the GitHub repository pekral/cursor-rules (6 stars, last pushed 6d ago), licensed MIT. It adds 22 tokens to every session and 1,987 once invoked, about $0.0001 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.