
Fsi
- 14 installs
- 466 repo stars
- Updated July 25, 2026
- managedcode/dotnet-skills
Helps with ai & agent building tasks.
About
fsi is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
- fsi
- AI & Agent Building
- AI-coding skill
Fsi by the numbers
- 14 all-time installs (skills.sh)
- +1 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #11,275 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/managedcode/dotnet-skills --skill fsiAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 14 |
|---|---|
| repo stars | ★ 466 |
| Last updated | July 25, 2026 |
| Repository | managedcode/dotnet-skills ↗ |
What it does
Helps with ai & agent building tasks.
Files
F# Interactive
Trigger On
- the task asks for F# Interactive, FSI,
.fsx, ordotnet fsi - a quick typed experiment is needed before changing compiled project code
- a script should reference NuGet packages directly with
#r "nuget: ..." - an investigation needs quick access to F# type inference, pattern matching, or pipelines
- a repeatable one-file probe is better than a temporary project
Do Not Use For
- long-lived application code that needs a compiled
.fsproj - production automation that should be versioned as a CLI, test project, or build target
- C# script work
- package restore from untrusted sources
Quick Start
Run an interactive REPL:
dotnet fsiRun a script:
dotnet fsi scripts/check.fsxCreate 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.fsxOn Windows, run scripts with dotnet fsi scripts/check.fsx.
Workflow
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.
Current Upstream Notes
- The refreshed F# Interactive reference keeps
dotnet fsias the supported command-line entry point for interactive sessions and.fsxscripts. - Use repeatable
.fsxfiles with explicit#r "nuget: ..."and#loaddirectives once an experiment affects a repository task; do not rely on hidden REPL state.
Interactive Session Rules
- End REPL submissions with
;;. - Multi-line input is allowed; FSI evaluates when it receives
;;. - Previously evaluated values stay in the session, so do not rely on hidden session state in scripts.
- Use
.fsxfiles for repeatability once an experiment matters.
let square x = x * x;;
[ 1 .. 5 ] |> List.map square;;Script Patterns
Read And Summarize Text
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}"Write A Checked Output File
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)Reference NuGet Packages
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}"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}"Split Scripts With Load
#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}"Promote To A Project
Move from FSI to a compiled project when:
- the script has multiple dependencies, tests, or distribution needs
- startup time or restore behavior matters
- C# or other .NET callers need a stable assembly
- the code needs CI coverage beyond a smoke run
Start with:
dotnet new console -lang "F#" -o tools/Probe
dotnet build tools/Probe/Probe.fsprojValidate
Use the simplest command that proves the script still runs:
dotnet fsi scripts/check.fsx
dotnet fsi scripts/check.fsx -- arg1 arg2For scripts that reference packages, run from a clean shell at least once so hidden REPL state cannot mask missing #r, #load, or open directives.
Sources
- https://learn.microsoft.com/dotnet/fsharp/tools/fsharp-interactive/
- https://learn.microsoft.com/dotnet/fsharp/get-started/get-started-vscode#explore-f-with-scripts-and-the-repl
- https://learn.microsoft.com/dotnet/fsharp/language-reference/fsharp-interactive-options
{
"version": "1.0.1",
"category": "Core",
"packages": [
"FSharp.Core"
]
}