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.
git clone --depth 1 https://github.com/bernierllc/agents-environment-configWrote 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.
[](https://agentmods.dev/rules/bernierllc/agents-environment-config/package-reuse)<a href="https://agentmods.dev/rules/bernierllc/agents-environment-config/package-reuse"><img src="https://agentmods.dev/badge/rules/bernierllc/agents-environment-config/package-reuse/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.
<a href="https://agentmods.dev/rules/bernierllc/agents-environment-config/package-reuse"><img src="https://agentmods.dev/badge/rules/bernierllc/agents-environment-config/package-reuse.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00532 |
| Opus 5.5 | $0.00000 | $0.00213 |
| Sonnet 5.5 | $0.00000 | $0.00106 |
| Haiku 4.5 | $0.00000 | $0.00053 |
Grade A, and why
package-reuse 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Package Reuse Rules
Core Principle
Reuse first, create second. Before writing new functionality or a new package, check whether it already exists: in this repository, in your organization's packages, or as a well-maintained public package.
Pre-Development Checklist
1. Check what already exists
- This repository: list its workspace packages (
packages/,apps/, or the workspace tool's list command) and search for the functionality by name and by behavior. - Your organization: check its internal registry or package scope, if it has one.
- Public registries: prefer a widely used, maintained package over writing your own for well-solved problems (retries, CSV parsing, markdown, email, tokens, queues).
2. Ask what the feature actually needs
- Retry logic, state machines, metrics, parsing, rendering, messaging, auth tokens: each is usually a solved problem. Name the existing package that solves it before writing code.
3. Evaluate candidates
For each potentially relevant package:
- Review the README and API documentation
- Check it supports your specific use case
- Consider whether it can be extended rather than replaced
- Look for integration patterns in its examples
- Check maintenance health (recent releases, open issues, license)
Implementation Steps
- Before starting: list what exists (step 1 above)
- Research: read candidate READMEs and examples
- Plan integration: design how to use the existing package
- Implement: add it as a dependency
- Test: make sure the integration works
- Document: note which package provides the behavior and why it was chosen
Benefits
- Faster development - Leverage existing, tested code
- Better consistency - Use proven patterns across packages
- Reduced maintenance - Single source of truth for common functionality
- Improved reliability - Use battle-tested implementations
When to Create New Packages
Only create a new package when:
- No existing package provides the needed functionality
- The functionality is truly atomic and reusable
- It follows MECE architecture principles
- It provides clear value as a standalone package
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.
- 2mo ago Changed · -14 lines 15b447e05405
- 3mo ago First seen · 73 lines · 0 tokens per session scan A 9b70985b6cc7
package-reuse is a cursor rule published in the GitHub repository bernierllc/agents-environment-config (11 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 532 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-08-31.
package-reuse compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| package-reusebernierllc/agents-environment-config | Cursor rule | 11 | yesterday | MIT | A | 0 | Cursor |
| no-mvn-compiletheonedev/onedev | Cursor rule | 15k | yesterday | MIT | A | 131 | Cursor |
| devSynkraAI/aiox-core | Cursor rule | 3.2k | yesterday | none | A | 10 | Cursor |
| qaSynkraAI/aiox-core | Cursor rule | 3.2k | yesterday | none | A | 12 | Cursor |
| github-workflowgiantswarm/muster | Cursor rule | 42 | today | Apache-2.0 | A | 987 | Cursor |
| aiox-masterSynkraAI/aiox-core | Cursor rule | 3.2k | yesterday | none | A | 19 | Cursor |
| poSynkraAI/aiox-core | Cursor rule | 3.2k | yesterday | none | A | 9 | Cursor |