publishing-dotnettool

publishing-dotnettool is a cursor rule for coding agents from Aaronontheweb/dotnet-cursor-rules. It costs 43 tokens per session (510 once invoked), scanned A, original, Apache-2.0.

A set of rules for packaging and publishing a .NET command-line tool as a NuGet package. A command-line tool is a program run from a terminal rather than through a graphical interface.

In plain words
What is it for?
Use it when configuring a tool project, setting semantic versions, writing installation and usage documentation, adding inline help, and preparing the package for publication.
Why use it?
It helps make the tool installable, versioned, documented, and usable across different .NET environments. It also defines checks for package metadata and release quality.

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/publishing-dotnettool
Clone the repo
git clone --depth 1 https://github.com/Aaronontheweb/dotnet-cursor-rules

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 publishing-dotnettool

README.md
[![agentmods](https://agentmods.dev/badge/rules/aaronontheweb/dotnet-cursor-rules/publishing-dotnettool.svg)](https://agentmods.dev/rules/aaronontheweb/dotnet-cursor-rules/publishing-dotnettool)
Your own site
<a href="https://agentmods.dev/rules/aaronontheweb/dotnet-cursor-rules/publishing-dotnettool"><img src="https://agentmods.dev/badge/rules/aaronontheweb/dotnet-cursor-rules/publishing-dotnettool.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 510 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.00043 $0.00510
Opus 5 $0.00022 $0.00255
Sonnet 5 $0.00009 $0.00102
Haiku 4.5 $0.00004 $0.00051

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

Security

Grade A, and why

publishing-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 3d 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/publishing-dotnettool.mdc · 46 lines

How it starts

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

Cursor Rules File: Best Practices for Publishing a dotnet Tool

This file serves as a guideline for the Cursor AI Agent to ensure the proper

creation, packaging, and publishing of a dotnet tool. Follow these rules to

maintain consistency, quality, and security across published tools.

Role Definition:

  • .NET Expert
  • OSS author
  • Aware that users running on multiple versions of .NET in different environments might need access to this tool

General: Description: > The dotnet tool must be packaged as a NuGet package that adheres to semantic versioning, proper dependency management, and includes comprehensive documentation. This file outlines the steps and checks that need to be performed. Requirements: - Use a project file (.csproj) with the property true - Follow semantic versioning (MAJOR.MINOR.PATCH) - Ensure the tool is documented with a README and inline help support

Preparation:

  • Validate that the project file includes:
    • true
    • Proper versioning and package metadata (e.g., PackageId, Authors, Description, License)
  • Include a detailed README file with:
    • Installation instructions (e.g., dotnet tool install -g <package-id>)
    • Usage examples and command options
    • Troubleshooting and FAQ sections
  • Confirm that all dependencies are explicitly declared
  • Always target the most recent long-term release of .NET (currently .NET 8) unless the project is explicitly set to multi-target or targets and older version of the runtime
  • Always include a <RollForward>LatestMajor</RollForward> so the tool can automatically be used with newer runtimes without a new version needing to be released

Packaging:

  • Use the dotnet pack command to generate the NuGet package:
    • Ensure that all necessary files (binaries, assets, configuration files) are included
    • Verify that the output .nupkg file contains the expected metadata and assets
  • Run tests to verify that the tool functions correctly in a local install scenario

Read the full file on GitHub · 46 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. 3d ago First seen · 46 lines · 43 tokens per session scan A 5cf827548199

Subscribe to this mod's changes

publishing-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 43 tokens to every session and 510 once invoked, about $0.0002 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.