Skip to main content
command CX Codex

convert_paths_absolute — Claude Code command

convert_paths_absolute — a slash command that rewrites relative paths in .claude/settings.json as absolute ones. It helps when command scripts break because they run from the wrong directory.

no license ★ 1,573 updated 2026-02-08

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/convert_paths_absolute.md
Open on GitHub

What convert_paths_absolute does

The command reads .claude/settings.json, finds scripts with relative paths, and converts them to absolute paths based on the current working directory. It also handles cases where a relative path is an argument to a command, such as python relative/path/script.py.

A backup of the original settings.json is made before any edits, so rolling back does not require digging through git. The JSON formatting and file structure stay untouched.

It works in Claude Code and Cursor. The instructions live in .claude/commands/convert_paths_absolute.md, so after setup the command behaves like any other slash command.

What it helps with

  • command scripts in settings.json fail from another directory
  • replace relative paths with absolute ones across all commands
  • keep a backup of settings.json before edits
  • avoid breaking JSON during bulk path replacement

Example prompts for the agent

  • Run convert_paths_absolute on my project
  • Convert every path in .claude/settings.json to absolute
  • Show me which settings paths are relative and fix them

How to install convert_paths_absolute

Manually: put the files in place

.claude/commands/convert_paths_absolute.md

Call it with /convert_paths_absolute. For all projects use ~/.claude/commands/

Questions about convert_paths_absolute

How do I install convert_paths_absolute in Claude Code?

Copy the command file to .claude/commands/convert_paths_absolute.md. The command then becomes available as a slash command in Claude Code.

What does convert_paths_absolute do?

It reads .claude/settings.json, finds commands with relative paths, and rewrites them as absolute paths from the current working directory. A backup of the file is created before changes.

What happens to a relative path used as a command argument?

The command handles that too: in python relative/path/script.py, the script path gets converted to absolute. Just make sure the working directory at runtime is the one you expect.

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →

From the same set20

The whole set →
build build is a command that reads a plan file and applies its changes to a codebase. It asks for the file path if none is provided. CX Codex +1 ★ 1,573repo stars fetch-docs-haiku45 fetch-docs-haiku45 retrieves online documentation using the Haiku model and saves it as markdown without cuts. CX Codex ★ 1,573repo stars fetch-docs-sonnet45 The fetch-docs-sonnet45 subagent retrieves documentation from a URL and writes it to a chosen file. Use it for documentation retrieval benchmarks. CX Codex ★ 1,573repo stars load_ai_docs load_ai_docs — a command that downloads documentation from AI platforms and saves it as markdown files for agents to reference locally. Use it when you want your sub-agents to have current docs without needing web access. CX Codex +1 ★ 1,573repo stars find_and_summarize find_and_summarize locates source files across target directories and creates concise two-sentence summaries in a YAML file. Useful for documenting modules without subagents. CX Codex +1 ★ 1,573repo stars create-worktree-subagent The create-worktree-subagent subagent creates isolated git worktrees for parallel development. Use it when the request explicitly delegates worktree creation to a subagent. CX Codex ★ 1,573repo stars docs-scraper docs-scraper — a subagent that fetches a documentation page by URL and saves it as a markdown file in ai_docs/. Handy when your agent needs a local copy of the docs. CX Codex ★ 1,573repo stars quick-plan quick-plan turns requirements into structured implementation blueprints stored in the specs/ folder. Useful before starting complex refactoring or new feature work. CX Codex +1 ★ 1,573repo stars

Project sponsors

Companies that keep this analytics open