aspnet-core
Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on…
Use F# Interactive (`dotnet fsi`) for .NET exploration, scriptable experiments, package-backed .fsx workflows, quick data transforms, and reproducible command-line probes. USE FOR: .fsx scripts, F# REPL work, #r nuget references, #load composition, interactive type exploration,
$ npx -y skills add managedcode/dotnet-skills --skill fsi --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/fsiContext preview
The summary Claude sees to decide when to auto-load this skill.
Use F# Interactive (`dotnet fsi`) for .NET exploration, scriptable experiments, package-backed .fsx workflows, quick data transforms, and reproducible command-line probes. USE FOR: .fsx scripts, F# REPL work, #r nuget references, #load composition, interactive type exploration,
name: fsi description: "Use F# Interactive (`dotnet fsi`) for .NET exploration, scriptable experiments, package-backed .fsx workflows, quick data transforms, and reproducible command-line probes. USE FOR: .fsx scripts, F# REPL work, #r nuget references, #load composition, interactive type exploration, and small strongly typed experiments before moving code into a project. DO NOT USE FOR: production application code that needs compiled project structure; C# scripting; long-lived automation better expressed as a normal CLI, test, or build target. INVOKES: run dotnet fsi, edit .fsx scripts, load project or source files, and validate snippets against the target SDK." compatibility: "Requires a .NET SDK with `dotnet fsi`; NuGet-backed scripts may need package restore and trusted package sources."
Run an interactive REPL:
dotnet fsi
Run a script:
dotnet fsi scripts/check.fsx
Create a Unix executable script when that fits the repo:
#!/usr/bin/env -S dotnet fsi printfn "Hello from FSI"
chmod +x scripts/check.fsx ./scripts/check.fsx
On Windows, run scripts with `dotnet fsi scripts/check.fsx`.
1. Decide whether the request is a disposable REPL probe, a repeatable `.fsx` script, or code that should be promoted to a compiled F# project. 2. Put repeatable work in an `.fsx` file immediately. Add all required `#r`, `#load`, `open`, input path, and package source directives to the script instead of relying on hidden REPL state. 3. Keep package references pinned when the script should be reproducible, and use only trusted NuGet feeds or local feeds derived from `__SOURCE_DIRECTORY__`. 4. Run the script with `dotnet fsi` from a clean shell, passing the same arguments the user or CI will use. 5. Promote the script to an `.fsproj` when it needs tests, distribution, project references, or long-term CI coverage.
let square x = x * x;; [ 1 .. 5 ] |> List.map square;;
Use ordinary .NET APIs directly from F# scripts.
open System
open System.IO
let summarize path =
File.ReadLines path
|> Seq.filter (String.IsNullOrWhiteSpace >> not)
|> Seq.countBy (fun line -> line.Split(' ')[0])
|> Seq.sortByDescending snd
|> Seq.truncate 10
|> Seq.toList
for key, count in summarize "input.log" do
printfn $"{key}: {count}"Keep script outputs deterministic and fail early when required inputs are missing.
open System
open System.IO
let input = "data/items.txt"
let output = "artifacts/items.normalized.txt"
if not (File.Exists input) then
failwith $"Missing input file: {input}"
Directory.CreateDirectory(Path.GetDirectoryName output) |> ignore
File.ReadLines input
|> Seq.map (fun line -> line.Trim())
|> Seq.filter (String.IsNullOrWhiteSpace >> not)
|> Seq.distinct
|> Seq.sort
|> fun lines -> File.WriteAllLines(output, lines)Pin package versions for repeatable scripts. Only use package sources the repo trusts.
#r "nuget: Newtonsoft.Json, 13.0.3"
open Newtonsoft.Json
let payload = {| Name = "Ada"; Kind = "sample" |}
let json = JsonConvert.SerializeObject(payload)
printfn $"{json}"FSI does not use referenced package build targets during restore by default. Enable them only when a trusted package requires them; pin the version and test from a fresh process:
#r "nuget: FSharp.Data, 6.6.0, usepackagetargets=true"
Keep `usepackagetargets=false` or omit the option for ordinary references. This controls package restore behavior; it does not turn an `.fsx` script into a compiled project.
Use `#i` only when an additional feed is required. Local feed paths must be absolute; construct them from `__SOURCE_DIRECTORY__` instead of committing personal paths.
let localFeed =
System.IO.Path.Combine(__SOURCE_DIRECTORY__, "../artifacts/packages")
|> System.IO.Path.GetFullPath
#i $"nuget: {localFeed}"`#load` evaluates another script and exposes it through the generated module name.
// MathHelpers.fsx let square x = x * x
// Check.fsx
#load "MathHelpers.fsx"
open MathHelpers
printfn $"%d{square 12}"Move from FSI to a compiled project when:
Start with:
dotnet new console -lang "F#" -
Stop explaining .NET to your AI. Start building. We've all been there: asking Claude to use Entity Framework, only to get EF6 patterns in a .NET 8 project. Explaining to Copilot that Blazor Server and Blazor WebAssembly aren't the same thing.
Repo: managedcode/dotnet-skills
Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on…
Build, upgrade, and operate Aspire 13.5.x C# or TypeScript application hosts with the current CLI, AppHost, ServiceDefaults, integrations, dashboard, testing,…
Build, review, or migrate Azure Functions in .NET with correct execution model, isolated worker setup, bindings, DI, and Durable Functions patterns. USE FOR:…
Build and review Blazor applications across server, WebAssembly, web app, and hybrid scenarios with correct component design, state flow, rendering, and…
Maintain or migrate EF6-based applications with realistic guidance on what to keep, what to modernize, and when EF Core is or is not the right next step. USE…
Design, tune, or review EF Core data access with proper modeling, migrations, query translation, performance, and lifetime management for modern .NET…