consuming-dotnettool

A set of project rules for managing .NET command-line tools, which are installable programs used by .NET projects. It requires a tool manifest that records the tools and their exact versions.

In plain words
What is it for?
Use it to create or maintain a .NET tool manifest, install and update tools with fixed versions, restore them in CI, and document their use.
Why use it?
It keeps local development and continuous integration (automated build and test systems) using the same tool versions. This reduces unexpected changes between environments.

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/aaronontheweb/dotnet-cursor-rules/consuming-dotnettool
Clone the repo
git clone --depth 1 https://github.com/Aaronontheweb/dotnet-cursor-rules
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 779 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.00026 $0.00779
Opus 5 $0.00013 $0.00390
Sonnet 5 $0.00005 $0.00156
Haiku 4.5 $0.00003 $0.00078

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

Security

Grade A, and why

consuming-dotnettool 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.

dotnet-tools/consuming-dotnettool.mdc · 72 lines

How it starts

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

Cursor Rules File: Best Practices for Consuming dotnet Tool Instances

This file provides guidelines for projects that depend on dotnet tools. It ensures that:

- A tool manifest is maintained for local and CI/CD consistency.

- Tool versions are explicitly defined.

- Proper installation, updating, and documentation practices are followed.

General: Description: > Projects consuming dotnet tool instances must manage their tool dependencies through a tool manifest. This approach promotes reproducible builds and clear dependency management, ensuring that the correct tool versions are used consistently across different environments. Requirements: - Maintain a tool manifest file (typically located at .config/dotnet-tools.json) in the project root. - Use explicit versioning for all dotnet tools to prevent unexpected updates. - Integrate tool management into the CI/CD pipeline for automated restoration.

Preparation:

  • If a tool manifest does not exist, create one by running:
    • dotnet new tool-manifest
  • Update the tool manifest with the necessary tools by executing:
    • dotnet tool install <tool-package> --version <version>
  • Ensure the manifest file (.config/dotnet-tools.json) is checked into version control for consistency.

Tool Management:

  • Installation:
    • Use dotnet tool install with an explicit version to add a tool to the manifest.
    • Verify that the installed tool versions match the ones specified in the manifest.
    • For tools that support both global and local installation, prefer local installation via manifest.
  • Updating:
    • To update a tool, use dotnet tool update <tool-package> --version <version>.
    • After updating, validate that the manifest reflects the new version.
  • Restoration:
    • Ensure that dotnet tool restore is executed as part of local setup and CI/CD processes to install all tools defined in the manifest.
  • Verification:
    • Periodically review the manifest to confirm that all tool versions are current and that deprecated or unused tools are removed.

Read the full file on GitHub · 72 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 · 72 lines · 26 tokens per session scan A 0f8e45a4e403

Subscribe to this mod's changes

consuming-dotnettool is a cursor rule published in the GitHub repository Aaronontheweb/dotnet-cursor-rules (134 stars, last pushed 1y ago), licensed Apache-2.0. It adds 26 tokens to every session and 779 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-30.