xiaohongshu
xiaohongshu
install-local-tool
Build and install a dotnet tool locally to global tools, handling platform-specific packaging and process cleanup.
Full skill instructions
Builds the current project as a dotnet tool and installs it to the global dotnet tools, replacing any existing version.
Canonical Source: This skill is maintained at stoicstudio/ClaudeSkills. Run
/update-skill install-local-toolto update.
Before running, ensure:
<PackAsTool>true</PackAsTool> in .csproj)dotnet test passes (if tests exist)Find the main .csproj file that defines the tool:
# Look for .csproj with PackAsTool in src/ directory
grep -r "<PackAsTool>true</PackAsTool>" src/**/*.csproj
Or use the project structure convention: src/{ProjectName}/{ProjectName}.csproj
Read the .csproj file and extract these properties:
| Property | Purpose | Example |
|---|---|---|
ToolCommandName | CLI command name | clang-codex |
PackageId | NuGet package identifier | clang-codex.mcp |
Version | Package version | 0.22.4 |
Detect Platform-Specific Packaging:
Check if PackageId is conditional on $(TargetRid):
<!-- Platform-specific pattern -->
<PackageId Condition="'$(TargetRid)' != ''">clang-codex.mcp.$(TargetRid)</PackageId>
<PackageId Condition="'$(TargetRid)' == ''">clang-codex.mcp</PackageId>
If this pattern exists, the project requires platform-specific packaging.
If platform-specific packaging is needed, detect the runtime identifier:
# Windows
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" || "$OS" == "Windows_NT" ]]; then
# Check architecture
if [[ "$(uname -m)" == "aarch64" || "$PROCESSOR_ARCHITECTURE" == "ARM64" ]]; then
RID="win-arm64"
else
RID="win-x64"
fi
# Linux
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
if [[ "$(uname -m)" == "aarch64" ]]; then
RID="linux-arm64"
else
RID="linux-x64"
fi
# macOS
elif [[ "$OSTYPE" == "darwin"* ]]; then
if [[ "$(uname -m)" == "arm64" ]]; then
RID="osx-arm64"
else
RID="osx-x64"
fi
fi
# If platform-specific
if [[ "$PLATFORM_SPECIFIC" == "true" ]]; then
PACKAGE_NAME="${BASE_PACKAGE_ID}.${RID}" # e.g., clang-codex.mcp.win-x64
else
PACKAGE_NAME="$BASE_PACKAGE_ID" # e.g., roslyn-codex.mcp
fi
Kill any running instances of the tool to allow file replacement:
# Get the tool command name from .csproj
TOOL_CMD="clang-codex" # from ToolCommandName
# Windows (via taskkill)
taskkill /F /IM "${TOOL_CMD}.exe" 2>/dev/null || true
# Linux/macOS (via pkill)
pkill -f "$TOOL_CMD" 2>/dev/null || true
Note: The process name is typically {ToolCommandName}.exe on Windows or just {ToolCommandName} on Unix.
dotnet tool uninstall --global "$PACKAGE_NAME" 2>/dev/null || true
The || true ensures the command succeeds even if the tool isn't installed.
# Navigate to project directory
cd src/{ProjectName}
# Clean previous artifacts
rm -rf bin/Release/*.nupkg
# Build and pack
if [[ "$PLATFORM_SPECIFIC" == "true" ]]; then
# Platform-specific: pass TargetRid to get correct PackageId
dotnet pack -c Release -p:TargetRid=$RID
else
# Standard: no RID needed
dotnet pack -c Release
fi
The .nupkg will be created in bin/Release/.
# Find the generated .nupkg
NUPKG=$(ls bin/Release/*.nupkg | head -1)
# Install globally from local package
dotnet tool install --global --add-source ./bin/Release "$PACKAGE_NAME"
# Check installation
dotnet tool list --global | grep "$TOOL_CMD"
# Test the tool
$TOOL_CMD --version 2>/dev/null || $TOOL_CMD --help 2>/dev/null || echo "Tool installed (no --version/--help flag)"
Report success with:
dotnet tool list --global)✓ Stopped 2 running instances of clang-codex
✓ Uninstalled clang-codex.mcp.win-x64 (previous version)
✓ Built and packed clang-codex.mcp.win-x64 v0.22.4
✓ Installed globally
Tool: clang-codex
Package: clang-codex.mcp.win-x64
Version: 0.22.4
Path: C:\Users\john\.dotnet\tools\clang-codex.exe
Projects that bundle native libraries (like ClangCodex.Mcp with libclang) require platform-specific packaging. Detection:
Indicators in .csproj:
<TargetRid> property<PackageId> based on $(TargetRid)<RuntimeIdentifiers> listing multiple platforms*.runtime.* native library packagesWhy needed: Native libraries must match the target platform. A single "any" package cannot contain all platform variants efficiently.
| Problem | Solution |
|---|---|
| "Tool already installed" | Uninstall failed; manually run dotnet tool uninstall --global {name} |
| "Process in use" | Close IDE or apps using the tool, or use Task Manager |
| "Package not found" | Check that dotnet pack succeeded and .nupkg exists |
| "Version mismatch" | Ensure Version in .csproj matches expected version |
| "Wrong platform" | Verify RID detection matches your actual platform |
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience