# convert_paths_absolute

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.

- command · `type=command` · Claude Code, Cursor, Codex, GitHub Copilot, Gemini CLI · ★ 1573 repo stars
- Author: disler
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/disler/claude-code-hooks-multi-agent-observability/tree/HEAD/.claude/commands/convert_paths_absolute.md
- Updated: 2026-02-08
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/commands/convert-paths-absolute

## What it 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.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/commands/convert_paths_absolute.md` — Call it with /convert_paths_absolute. For all projects use ~/.claude/commands/

### Codex

**Manually: put the files in place**
- File: `~/.codex/prompts/convert_paths_absolute.md` — Call it with /prompts:convert_paths_absolute. Codex marks this format deprecated in favour of skills

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/prompts/convert_paths_absolute.prompt.md`

### Gemini CLI

**Manually: put the files in place**
- File: `.gemini/commands/convert_paths_absolute.toml` — Gemini stores commands as TOML: the prompt text goes into the prompt field

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/disler/claude-code-hooks-multi-agent-observability/tree/HEAD/.claude/commands/convert_paths_absolute.md

## When to use it
- 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
- 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

## Similar
- [convert-file](https://affpapa.org/en/nevibecode/skills/convert-file.md) — skill · 889 installs
- [config](https://affpapa.org/en/nevibecode/commands/config.md) — command · ★ 850 repo stars
- [07_json_reshape](https://affpapa.org/en/nevibecode/prompts/07-json-reshape.md) — prompt · ★ 2744 repo stars
- [cmux-settings](https://affpapa.org/en/nevibecode/skills/cmux-settings.md) — skill · 7700 installs
- [add-path-type-assertions-or-realpath-resolve-calls-in-path-joini](https://affpapa.org/en/nevibecode/skills/add-path-type-assertions-or-realpath-resolve-calls-in-path-joini.md) — skill · ★ 539 repo stars
- [claude-settings-audit](https://affpapa.org/en/nevibecode/skills/claude-settings-audit.md) — skill · 4700 installs

From the same set: [disler/claude-code-hooks-multi-agent-observability](https://affpapa.org/en/nevibecode/by/disler/claude-code-hooks-multi-agent-observability.md) — 20 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
