convert_paths_absolute banner
disler disler

convert_paths_absolute

Development community intermediate

Description

This command converts all relative paths in .claude/settings.json command scripts to absolute paths using the current working directory. It helps ensure that command scripts work correctly regardless

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

Repository README

This is the README for disler/nano-agent, shared by 3 entries in this directory. It describes the repository, not this entry specifically.


allowed-tools: Read,Bash,Edit,Write description: Converts relative paths in .claude/settings.json command scripts to absolute paths

convert_paths_absolute

This command converts all relative paths in .claude/settings.json command scripts to absolute paths using the current working directory. It helps ensure that command scripts work correctly regardless of where they are executed from.

Instructions

  • Get the current working directory using pwd
  • Read the .claude/settings.json file
  • Parse the JSON content to find all command scripts
  • Identify relative paths in the command scripts (paths that don't start with / or ~)
  • Convert each relative path to an absolute path by prepending the current working directory
  • Update the settings.json file with the converted absolute paths
  • Show the user what changes were made
  • Handle cases where paths might be arguments to commands (e.g., python relative/path/script.py)
  • Preserve the existing JSON formatting and structure
  • Create a backup of the original settings.json before making changes