Agent skill

Dotnet Run File

by NikiforovAll in NikiforovAll/claude-code-rules

Run script-like CSharp programs using dotnet run file.cs. An agent skill from NikiforovAll/claude-code-rules.

Apache-2.0Auto-check passed

Install Dotnet Run File

skills CLI
$ npx skills add NikiforovAll/claude-code-rules --skill dotnet-run-file -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install NikiforovAll/claude-code-rules dotnet-run-file --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/NikiforovAll/claude-code-rules.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/handbook-dotnet/skills/dotnet-run-file .claude/skills/dotnet-run-file && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dotnet-run-file
GitHub stars
141
Token cost
~704 tokens
SKILL.md length
227 words
Files
2 (incl. references)
Skills in repo
26
Repo updated
First seen
Licence
Apache-2.0

At a glance

Run script-like CSharp programs using dotnet run file.cs. An agent skill from NikiforovAll/claude-code-rules.

  • Works in 2 steps: Run a C# File → Execute via Stdin
  • Users want to execute CSharp code directly
  • SKILL.md covers When to Use This Skill, Guide, Quick Reference and Core Operations, plus 2 more sections
  • Calls dotnet and jq

What it does

Dotnet Run File is an agent skill from NikiforovAll/claude-code-rules. Run script-like CSharp programs using dotnet run file.cs. Use this skill when users want to execute CSharp code directly, write one-liner scripts via stdin, or learn about run file directives.

Its SKILL.md is about 700 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/guide.md`).

It works with .NET and C#. The repository describes itself as: Learn practical techniques to enhance your AI-assisted development workflow with Claude Code. The licence is Apache-2.0.

When your agent uses it

  • Users want to execute CSharp code directly
  • Write one-liner scripts via stdin
  • Learn about run file directives

Example prompts

  • “/dotnet-run-file”

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Run a C# File
  2. Execute via Stdin

What it can do on your machine

Read from SKILL.md and the folder at commit 281c063. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • dotnet
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dotnet Run File loads about 704 tokens when it runs, and up to ~1.5k if it reads all its reference files. Until then it costs about 52 tokens; SKILL.md has 227 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~52
When it runs · the whole SKILL.md, loaded when a task matches
~704
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from NikiforovAll/claude-code-rules at commit 281c063, republished under its Apache-2.0 licence (© NikiforovAll). 227 words, ~704 tokens.

Download SKILL.mdSave it as .claude/skills/dotnet-run-file/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
dotnet-run-file
description
Run script-like CSharp programs using dotnet run file.cs. Use this skill when users want to execute CSharp code directly, write one-liner scripts via stdin, or learn about run file directives.

.NET Run Files

Run C# code directly without creating project files using .NET 10's dotnet run file.cs feature.

When to Use This Skill

Use this skill when the user wants to:

  • Execute C# code quickly without creating a project
  • Write one-liner scripts via stdin (ideal for Claude Code)
  • Learn about run file directives (#:package, #:sdk, #:property)
  • Create executable shell scripts in C#
  • Convert a run file to a full project

Guide

For detailed examples and directives reference, load references/guide.md.

Quick Reference

Basic Execution
bash
# Run a .cs file
dotnet run app.cs

# Run from stdin
echo 'Console.WriteLine("Hello");' | dotnet run -

# Multi-line via heredoc
dotnet run - << 'EOF'
var now = DateTime.Now;
Console.WriteLine($"Time: {now}");
EOF
Directives
csharp
#:package Humanizer@*            // NuGet package (version required, wildcards ok)
#:sdk Microsoft.NET.Sdk.Web       // SDK selection
#:property LangVersion preview    // MSBuild property
#:project ../src/MyLib            // Project reference
Convert to Project
bash
dotnet project convert app.cs

Core Operations

1. Run a C# File

Steps:

  1. Create a .cs file with your code (top-level statements supported)
  2. Add directives at the top if needed (packages, SDK, properties)
  3. Execute: dotnet run filename.cs

Example:

csharp
// hello.cs
Console.WriteLine("Hello from .NET!");
bash
dotnet run hello.cs
2. Execute via Stdin

Purpose: Run C# code without creating files - ideal for quick scripts and AI-assisted workflows.

Patterns:

bash
# Simple one-liner
echo 'Console.WriteLine(Math.PI);' | dotnet run -

# With package
dotnet run - << 'EOF'
#:package Humanizer@*
using Humanizer;
Console.WriteLine(TimeSpan.FromMinutes(90).Humanize());
EOF

# Heredoc for multi-line
dotnet run - << 'EOF'
using System.Text.Json;

var obj = new { Name = "Test", Value = 42 };
Console.WriteLine(JsonSerializer.Serialize(obj));
EOF

Interactive Flow

When user asks to run C# code without specifics:

  1. Ask what they want to accomplish
  2. Determine if stdin one-liner or file-based is better
  3. For simple tasks → use stdin pattern
  4. For complex tasks → create a .cs file
  5. Add necessary directives based on requirements
  6. Execute and show results

Claude Code Integration Tips

For AI-assisted workflows:

  • Prefer stdin for quick calculations, data transformations, API calls
  • Use heredoc syntax for multi-line code
  • Output JSON for easy parsing: dotnet run script.cs | jq .

© NikiforovAll, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in plugins/handbook-dotnet/skills/dotnet-run-file of NikiforovAll/claude-code-rules.

  • SKILL.md
  • references/guide.md

Open the folder on GitHubat commit 281c063

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders. This page covers the copy in NikiforovAll/claude-code-rules, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Dotnet Run File next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dotnet Run File compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dotnet Run File this skillNikiforovAll/claude-code-rules141—~704Automated safety check: PassApache-2.0
Minimax DOCXpoco-ai/poco-claw1.4k7 repos~3.9kAutomated safety check: PassMIT
Speckit ConstitutionWeihanLi/WeihanLi.Common24211 repos~2.1kAutomated safety check: PassApache-2.0
Analyzing .NET Performancedotnet/skills5.6k3 repos~3.1kAutomated safety check: PassMIT
Find Untested Sourcesmicrosoft/testfx1k2 repos~3.3kAutomated safety check: PassMIT
Add Analyzerdotnet/roslynator3.5k—~1.3kAutomated safety check: PassCustom licence

Similar skills

  • Minimax DOCX

    poco-ai/poco-claw

    Professional DOCX document creation, editing, and formatting using OpenXML SDK (.NET).

    1.4k GitHub starsUsed in 7 repos~3.9k tokens
    Documents & OfficeAuto-check passed
  • Speckit Constitution

    WeihanLi/WeihanLi.Common

    Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.

    242 GitHub starsUsed in 11 repos~2.1k tokens
    DevelopmentAuto-check passed
  • Official

    Scans C# and .NET code for about 50 performance anti-patterns and reports prioritized findings with concrete fixes, at a scan depth you choose.

    5.6k GitHub starsUsed in 3 repos~3.1k tokens
    DevelopmentAuto-check passed
  • Find Untested Sources

    microsoft/testfx

    Official

    MANDATORY for static source-to-test pairing: find or list source files/modules without corresponding tests, or suggest test locations from repository structure.

    1k GitHub starsUsed in 2 repos~3.3k tokens
    MobileAuto-check passed
  • Add Analyzer

    dotnet/roslynator

    Official

    A skill your agent uses when adding a new RCS diagnostic in roslynator (RCS0 formatting, RCS1 general, RCS9 code-analysis), wiring roslynator EditorConfig options, or when docs say CHANGELOG.md…

    3.5k GitHub stars~1.3k tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • GitVersion .NET Development

    GitTools/GitVersion

    Gives repository-specific .NET guidance for GitVersion: build and test commands, central package management, project layout and coding conventions.

    3.1k GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed

More from NikiforovAll/claude-code-rules

All 26 skills in this repo
  • Reflect Solution

    NikiforovAll/claude-code-rules

    Summarize WHAT WAS SHIPPED in a Claude Code session as a self-contained HTML slide deck — the elevator pitch (problem, solution, decisions, artifacts, verification, gaps), not a play-by-play of tool…

    141 GitHub stars~3.8k tokensUpdated 8 days ago
    Auto-check passed
  • Dotnet Analyzers

    NikiforovAll/claude-code-rules

    Run dotnet format to fix code style and analyzer diagnostics (IDE0005, CA, SA).

    141 GitHub stars~1.9k tokensUpdated 8 days ago
    Auto-check passed
  • Ilspy Decompile

    NikiforovAll/claude-code-rules

    Understand implementation details of .NET code by decompiling assemblies.

    141 GitHub starsUsed in 2 repos~760 tokens
    Auto-check passed
  • Reflect Tree

    NikiforovAll/claude-code-rules

    Visualize a Claude Code session as a quest/skill tree — a navigable SVG graph where nodes are turns and edges show flow, with distinct visual encoding for normal flow, dead-ends, corrections…

    141 GitHub stars~2.8k tokensUpdated 8 days ago
    Auto-check passed
  • Structured Plan Mode

    NikiforovAll/claude-code-rules

    This skill should be used when planning and tracking complex feature implementations that require systematic task decomposition.

    141 GitHub stars~4.2k tokensUpdated 8 days ago
    Auto-check passed
  • Glab

    NikiforovAll/claude-code-rules

    Expert guidance for using the GitLab CLI (glab) to manage GitLab issues, merge requests, CI/CD pipelines, repositories, and other GitLab operations from the command line.

    141 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed

Works with

Questions about Dotnet Run File

What does Dotnet Run File do?

Run script-like CSharp programs using dotnet run file.cs. An agent skill from NikiforovAll/claude-code-rules. Dotnet Run File is an agent skill from NikiforovAll/claude-code-rules.cs.

When should I use Dotnet Run File?

Dotnet Run File fits situations like: users want to execute CSharp code directly; write one-liner scripts via stdin; learn about run file directives.

How do I install Dotnet Run File in Claude Code?

Run `npx skills add NikiforovAll/claude-code-rules --skill dotnet-run-file -a claude-code`. Or copy the skill folder (plugins/handbook-dotnet/skills/dotnet-run-file in NikiforovAll/claude-code-rules) into .claude/skills/dotnet-run-file in your project. Claude Code loads it when a task matches its description.

How do I install Dotnet Run File in Codex?

Run `npx skills add NikiforovAll/claude-code-rules --skill dotnet-run-file -a codex`. Or copy the skill folder (plugins/handbook-dotnet/skills/dotnet-run-file in NikiforovAll/claude-code-rules) into .agents/skills/dotnet-run-file in your project. Codex loads it when a task matches its description.

Can I use Dotnet Run File in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add NikiforovAll/claude-code-rules --skill dotnet-run-file -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dotnet-run-file, .gemini/skills/dotnet-run-file, .github/skills/dotnet-run-file and .opencode/skills/dotnet-run-file in your project.

What does Dotnet Run File need to run?

Going by SKILL.md and its folder, Dotnet Run File needs the command-line tools its instructions call (dotnet and jq).

Does Dotnet Run File access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Dotnet Run File safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dotnet Run File use?

Dotnet Run File is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dotnet Run File use?

About 704 tokens (SKILL.md is roughly 2.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 833 tokens, read only when the agent opens those files.

What are the alternatives to Dotnet Run File?

Skills that share tags, products or a category with Dotnet Run File: Minimax DOCX (poco-ai/poco-claw, 1.4k stars), Speckit Constitution (WeihanLi/WeihanLi.Common, 242 stars), Analyzing .NET Performance (dotnet/skills, 5.6k stars) and Find Untested Sources (microsoft/testfx, 1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dotnet Run File?

NikiforovAll (a GitHub user) maintains it in NikiforovAll/claude-code-rules, which has 141 GitHub stars. The repository holds 26 skills in this directory. The repository was last updated on October 2, 2026.

Source: NikiforovAll/claude-code-rules on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.