Agent skill

dotnet-enable-autocomplete

Enables tab autocomplete for the dotnet CLI. Also use when the user mentions "dotnet autocomplete," "dotnet tab completion," "CLI completion," "shell completion for dotnet," or "dotnet intellisense in terminal."

Stars 0
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/Im5tu/claude/tree/main/skills/dotnet-enable-autocomplete

Metadata

Additional technical details for this skill

author
Im5tu
version
1.0

SKILL.md

.NET CLI Tab Completion

Enable tab autocomplete for the dotnet CLI in your preferred shell.

Steps

  1. Determine .NET version (CRITICAL - commands differ by version)

    bash
    dotnet sdk check
    
    • Parse output to identify installed SDK versions
    • .NET 10+: Uses dotnet completions script <shell> (native completions)
    • Pre-.NET 10: Uses dotnet complete --position (dynamic completions)
  2. Ask user which shells they use, allowing multi-select:

    • PowerShell
    • bash
    • zsh
    • fish
    • nushell

For each user shell:

  1. Detect profile file location based on shell:

    Shell Profile Path
    PowerShell $PROFILE
    bash ~/.bashrc
    zsh ~/.zshrc
    fish ~/.config/fish/config.fish
    nushell ~/.config/nushell/config.nu
  2. Check if completion already configured

    • Read the profile file
    • Search for existing dotnet completion setup
    • If found, inform user and ask if they want to replace it
  3. Append completion script to profile based on .NET version and shell

  4. Inform user to restart their shell or source the profile

Completion Scripts

.NET 10+ (Native Completions)

PowerShell:

powershell
dotnet completions script pwsh | Out-String | Invoke-Expression

bash:

bash
eval "$(dotnet completions script bash)"

zsh:

zsh
eval "$(dotnet completions script zsh)"

fish:

fish
dotnet completions script fish | source

nushell: See .NET CLI docs for config.nu setup.

Pre-.NET 10 (Dynamic Completions)

PowerShell:

powershell
# dotnet CLI tab completion
Register-ArgumentCompleter -Native -CommandName dotnet -ScriptBlock {
    param($wordToComplete, $commandAst, $cursorPosition)
    dotnet complete --position $cursorPosition "$commandAst" | ForEach-Object {
        [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
    }
}

bash:

bash
# dotnet CLI tab completion
_dotnet_bash_complete() {
    local cur="${COMP_WORDS[COMP_CWORD]}"
    local IFS=$'\n'
    local candidates
    read -d '' -ra candidates < <(dotnet complete --position "${COMP_POINT}" "${COMP_LINE}" 2>/dev/null)
    read -d '' -ra COMPREPLY < <(compgen -W "${candidates[*]}" -- "$cur")
}
complete -f -F _dotnet_bash_complete dotnet

zsh:

zsh
# dotnet CLI tab completion
_dotnet_zsh_complete() {
    local completions=("$(dotnet complete --position ${CURSOR} "${BUFFER}" 2>/dev/null)")
    reply=("${(ps:\n:)completions}")
}
compctl -K _dotnet_zsh_complete dotnet

fish:

fish
# dotnet CLI tab completion
complete -f -c dotnet -a "(dotnet complete --position (commandline -cp) (commandline -op))"

nushell:

nu
# Add to external_completer in config.nu
let external_completer = {|spans|
    match $spans.0 {
        dotnet => (
            dotnet complete (
                $spans | skip 1 | str join " "
            ) | lines
        )
    }
}

Error Handling

  • If dotnet sdk check fails: Ensure .NET SDK is installed
  • If profile file doesn't exist: Create it with the completion script
  • If profile file is read-only: Warn user and provide script to add manually

Notes

  • .NET 10+ provides native dotnet completions command
  • Pre-.NET 10 uses dotnet complete with dynamic scripts
  • Always back up profile before modifying
  • User must restart shell or source profile for changes to take effect

Expand your agent's capabilities with these related and highly-rated skills.

Im5tu/claude

flutter-animations

Comprehensive guide for implementing animations in Flutter. Use when adding motion and visual effects to Flutter apps: implicit animations (AnimatedContainer, AnimatedOpacity, TweenAnimationBuilder), explicit animations (AnimationController, Tween, AnimatedWidget/AnimatedBuilder), hero animations (shared element transitions), staggered animations (sequential/overlapping), and physics-based animations. Includes workflow for choosing the right animation type, implementation patterns, and best practices for performance and user experience.

0 0
Explore
Im5tu/claude

dotnet-source-gen-logging

Converts logging to use the LoggerMessage source generator for high-performance, AOT-compatible logging. Also use when the user mentions "LoggerMessage," "logging source generator," "high-performance logging," "optimize logging," "AOT logging," or "structured logging source gen." For full AOT analysis, see dotnet-aot-analysis.

0 0
Explore
Im5tu/claude

dotnet-source-gen-options-validation

Converts options validation to use the compile-time source generator for AOT-compatible, reflection-free validation. Also use when the user mentions "OptionsValidator," "options validation source gen," "AOT options validation," "compile-time validation," "ValidateDataAnnotations replacement," or "reflection-free validation." For full AOT analysis, see dotnet-aot-analysis.

0 0
Explore
Im5tu/claude

dotnet-enable-testing-platform

Enables the Microsoft Testing Platform runner in global.json. Also use when the user mentions "testing platform," "Microsoft.Testing.Platform," "new test runner," "migrate test runner," "global.json testing," or "modern test platform."

0 0
Explore
Im5tu/claude

dotnet-json-polymorphic

Configures polymorphic JSON serialization with [JsonPolymorphic] and [JsonDerivedType] attributes. Also use when the user mentions "polymorphic JSON," "JsonDerivedType," "JSON inheritance," "type discriminator," "serialize derived types," or "JSON polymorphism." For full JSON source generation, see dotnet-source-gen-json.

0 0
Explore
Im5tu/claude

competitor-alternatives

When the user wants to create competitor comparison or alternative pages for SEO and sales enablement. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' or 'competitive landing pages.' Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. Emphasizes deep research, modular content architecture, and varied section types beyond feature tables.

0 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results