From infracost
Install or update the Infracost Language Server. Use this skill when the user asks to install the Infracost LSP, or when infracost-ls is missing from the system.
npx claudepluginhub infracost/agent-skills --plugin infracostThis skill is limited to using the following tools:
Download and install the latest Infracost Language Server binary from GitHub releases (`infracost/lsp`).
Recommends LSP servers by language, configures .lsp.json files, provides installation guides, and troubleshoots issues in Claude Code.
Detects LSP servers for 18 languages including TypeScript, Python, Go, Rust, Java; installs missing ones via npm, pip, go; integrates with Claude Code for real-time diagnostics during /cc-setup phase 7 or project setup.
Guides integration of LSP servers into Claude Code plugins via plugin.json or .lsp.json for code intelligence like go-to-definition, references, hovers, and completions.
Share bugs, ideas, or general feedback.
Download and install the latest Infracost Language Server binary from GitHub releases (infracost/lsp).
The binary is called infracost-ls.
If infracost-ls is already on the PATH, check the installed version:
infracost-ls --version
If the command is not found, proceed to step 2.
Query the latest release tag from infracost/lsp.
Using gh (preferred):
gh release view --repo infracost/lsp --json tagName --jq '.tagName'
Fallback using curl:
curl -sL \
https://api.github.com/repos/infracost/lsp/releases/latest \
| grep '"tag_name"' | sed 's/.*"tag_name": *"//;s/".*//'
The tag format is v0.0.3. Derive the version number by stripping the v prefix (e.g., 0.0.3).
If infracost-ls is already installed and the installed version matches the latest version, inform the user that it is already up to date and stop.
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m)
case "$ARCH" in
x86_64) ARCH="amd64" ;;
aarch64|arm64) ARCH="arm64" ;;
esac
On Windows (where uname may not be available or returns MINGW/MSYS/CYGWIN), set OS=windows.
Construct the asset filename:
lsp_${OS}_${ARCH}.tar.gzlsp_windows_${ARCH}.zipFor example: lsp_darwin_arm64.tar.gz or lsp_windows_amd64.zip
Download the release asset to a temporary directory (/tmp on Linux/macOS, $TEMP on Windows).
Using gh (preferred):
gh release download "$TAG" \
--repo infracost/lsp \
--pattern "$ASSET_NAME" \
--dir /tmp
Fallback using curl:
curl -sL \
"https://github.com/infracost/lsp/releases/download/${TAG}/${ASSET_NAME}" \
-o "/tmp/${ASSET_NAME}"
tar -xzf "/tmp/${ASSET_NAME}" -C /tmp
chmod +x /tmp/infracost-ls
mv /tmp/infracost-ls /usr/local/bin/infracost-ls
If mv fails with a permission error, fall back to ~/.local/bin:
mkdir -p ~/.local/bin
mv /tmp/infracost-ls ~/.local/bin/infracost-ls
If ~/.local/bin is not already on the PATH, add it by appending to the user's shell profile:
if [[ ":$PATH:" != *":$HOME/.local/bin:"* ]]; then
SHELL_NAME=$(basename "$SHELL")
case "$SHELL_NAME" in
zsh) SHELL_RC="$HOME/.zshrc" ;;
bash) SHELL_RC="$HOME/.bashrc" ;;
*) SHELL_RC="$HOME/.profile" ;;
esac
echo 'export PATH="$HOME/.local/bin:$PATH"' >> "$SHELL_RC"
export PATH="$HOME/.local/bin:$PATH"
fi
Inform the user they may need to restart their shell or run source <rc_file> for the PATH change to take effect.
Expand-Archive -Path "$env:TEMP\$ASSET_NAME" -DestinationPath "$env:TEMP\infracost-ls" -Force
Move-Item -Path "$env:TEMP\infracost-ls\infracost-ls.exe" -Destination "$env:LOCALAPPDATA\Microsoft\WindowsApps\infracost-ls.exe" -Force
If WindowsApps is not on the PATH, move the binary to another directory that is on the PATH, or add the chosen directory to the PATH.
Remove the downloaded archive:
rm -f "/tmp/${ASSET_NAME}"
Confirm the installation succeeded:
infracost-ls --version
The output should match the version that was just installed.
/usr/local/bin: Fall back to ~/.local/bin as described in Step 6. Do not use sudo as it may not be available in all environments.linux, darwin, or windows, or the architecture is unsupported, inform the user and point them to the releases page at https://github.com/infracost/lsp/releases.infracost-preview login
Then retry starting the LSP.