fix: replace tilde paths with $HOME in v3.0 markdown instructions#717
Open
m4nt0de4 wants to merge 1 commit intodanielmiessler:mainfrom
Open
fix: replace tilde paths with $HOME in v3.0 markdown instructions#717m4nt0de4 wants to merge 1 commit intodanielmiessler:mainfrom
m4nt0de4 wants to merge 1 commit intodanielmiessler:mainfrom
Conversation
Claude Code's Write/Edit tools use fs.writeFile() internally and do NOT shell-expand `~`. When AI follows markdown instructions containing `~/.claude/...` paths and passes them to Write/Edit tools, literal `~` directories are created in the working directory instead of writing to the home directory. This affects 11 skill/workflow files across v3.0 where Write-facing instructions used `~/.claude/` shorthand. Changed to `$HOME/.claude/` with resolution notes where appropriate. TypeScript tools (paths.ts, hooks) already use homedir() + join() and are unaffected. Relates to danielmiessler#699 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
nsalvacao
added a commit
to nsalvacao/Personal_AI_Infrastructure
that referenced
this pull request
Feb 17, 2026
nsalvacao
added a commit
to nsalvacao/Personal_AI_Infrastructure
that referenced
this pull request
Feb 17, 2026
intake(lote-A): import upstream PR danielmiessler#717 (tilde path markdown fix)
nsalvacao
added a commit
to nsalvacao/Personal_AI_Infrastructure
that referenced
this pull request
Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Claude Code's
Write/Edittools usefs.writeFile()internally — they do not shell-expand~. When the AI follows markdown instructions containing~/.claude/...paths and passes them toWrite/Edittools, a literal directory named~is created in the current working directory instead of writing to the user's home directory.This PR fixes 11 files across v3.0 where Write-facing markdown instructions used
~/.claude/shorthand, replacing them with$HOME/.claude/(with resolution notes where appropriate).Root cause: The PAI system has two path systems:
paths.ts, hooks) — usehomedir()+join()→ correct, unaffected~/.claude/shorthand that the AI passes verbatim toWrite/Edit→ broken on all platformsThis is platform-agnostic — affects Linux, macOS, and WSL equally since
Write/Editare API-level file operations, not shell commands.Files Changed (11 files, 20 insertions, 18 deletions)
PAI/Components/Algorithm/v1.6.0.mdPAI/SKILL.mdWorldThreatModelHarness/Workflows/UpdateModels.mdWorldThreatModelHarness/SKILL.mdEvals/Workflows/CreateUseCase.mdEvals/Workflows/CreateJudge.mdEvals/Workflows/CompareModels.mdEvals/Workflows/ComparePrompts.mdResearch/Workflows/ExtractAlpha.mdAgents/AgentProfileSystem.mdPAI/THEHOOKSYSTEM.mdWhat Was NOT Changed
mkdir -p ~/.claude/...in bash blocks) — shell correctly expands~Read ~/.claude/...) — Read tool handles~correctlyhomedir()+join()viapaths.ts~is fine in human-readable contextsTesting
Related
plansDirectorysetting)🤖 Generated with Claude Code