# Atomic Directory Navigation

> atomic-directory-navigation

- Skill: `claudiawong522/atomic-directory-navigation` (Agent Skill)
- Install (CLI): `npx skillmds@latest add claudiawong522/atomic-directory-navigation`
- Raw SKILL.md: https://api.skillmd.com/api/skills/claudiawong522/atomic-directory-navigation/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: claudiawong522 (https://skillmd.com/u/claudiawong522)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/claudiawong522/atomic-directory-navigation

---

# atomic-directory-navigation

Verify directory changes in a single command by combining navigation with confirmation.

# Atomic Directory Navigation

When navigating to a directory, combine the `cd` command with a verification command to ensure the change succeeded in one atomic operation.

## Why This Matters

Separate navigation and verification commands can lead to:
- Running commands in the wrong directory if `cd` silently fails
- Wasted steps and slower workflows
- Uncertainty about your current location

## How to Apply It

Instead of:
```bash
cd /path/to/directory
pwd
```

Use a single command:
```bash
cd /path/to/directory && pwd
```

Or verify the change worked before proceeding:
```bash
cd /path/to/directory && ls
```

## Common Patterns

- **Confirm arrival**: `cd /path && pwd`
- **List contents**: `cd /path && ls -la`
- **Check for key files**: `cd /path && ls myfile.txt`
- **Run with fallback**: `cd /path || echo "Directory not found"`

## Tips

- Use `&&` to chain verification only if navigation succeeds
- Use `||` to provide error handling if the directory doesn't exist
- This approach works with symbolic links and relative paths
- Include `-L` flag with `cd` if you need to follow symlinks explicitly

