Agent skill
cd-permanent
Change directory permanently within the session (project tree only)
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/cd-permanent
SKILL.md
Instructions
Step 1: Parse and Validate Path
Parse $ARGUMENTS as the target path.
If empty: Show usage: /cd-permanent <path>
Step 2: Check if Path is Within Project
# Get project root and target real path
PROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
TARGET_PATH=$(realpath -m "$ARGUMENTS" 2>/dev/null || echo "$ARGUMENTS")
Check if $TARGET_PATH starts with $PROJECT_ROOT:
- If YES: Continue to Step 3
- If NO: Continue to Step 4
Step 3: Change Directory (Within Project)
cd "$TARGET_PATH"
pwd
Confirm: "Changed directory to: [new path]"
Step 4: Outside Project
Cannot change directory outside the project tree. Claude Code enforces staying within the base directory where the session started.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?