Loading...
Loading...
Enforces using grealpath command for relative path calculations and absolute path conversions. Use when calculating relative paths between files, converting relative paths to absolute paths, or working with file path operations.
npx skill4agent add totto2727-dotfiles/agents use-grealpathgrealpathgrealpath --relative-to=<base># Calculate relative path from base directory to target
grealpath --relative-to=/home/user /home/user/test
# Output: test
# Calculate relative path from current directory
grealpath --relative-to=. ./subdir/file.txt
# Output: subdir/file.txt
# Calculate relative path between two specific paths
grealpath --relative-to=/path/to/base /path/to/base/subdir/file.txt
# Output: subdir/file.txtgrealpath# Convert relative path to absolute path
grealpath ./subdir/file.txt
# Output: /home/user/project/subdir/file.txt
# Convert with current directory as base
grealpath file.txt
# Output: /home/user/project/file.txt
# Resolve symbolic links to absolute paths
grealpath symlink
# Output: /home/user/project/actual/path# From file A to file B
grealpath --relative-to=/path/to/fileA /path/to/fileB# Simple conversion
grealpath relative/path/to/file
# With base directory
grealpath --relative-to=/base/dir relative/path# Resolve all symbolic links
grealpath -s symlink
# Or without -s flag (default behavior resolves symlinks)
grealpath symlink# Calculate relative path
grealpath --relative-to=/home/user /home/user/project/src/file.ts
# Output: project/src/file.ts
# Convert to absolute path
grealpath ./src/file.ts
# Output: /home/user/project/src/file.ts
# Resolve symbolic link
grealpath ./link-to-file
# Output: /home/user/project/actual/file.ts# DO NOT manually calculate relative paths
# DO NOT use cd and pwd combinations
# DO NOT use string manipulation for pathsgrealpathrealpathgrealpathrealpath--relative-to...