Skip to content
Development
Command

/convert_paths_relative

Converts absolute paths in .claude/settings.json command scripts to relative paths

From plugin
nano-agent
20412 skills10 agents12 commands

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/convert_paths_relative

Context preview

What this command does when you run it.

Converts absolute paths in .claude/settings.json command scripts to relative paths

Command definition

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

convert_paths_relative

This command converts all absolute paths in .claude/settings.json command scripts to relative paths. It helps make the configuration more portable and easier for others to use as a starter template.

Instructions

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

Watched how we used GPT-5 and Claude Code with nano-agents here. What? A MCP Server for experimental, small scale engineering agents with multi-provider LLM support. Why?

Get the whole plugin