Skip to content

Fixes for Claude.#6

Merged
mbrandonw merged 49 commits intomainfrom
claude-fix
Jan 28, 2026
Merged

Fixes for Claude.#6
mbrandonw merged 49 commits intomainfrom
claude-fix

Conversation

@mbrandonw
Copy link
Copy Markdown
Member

@mbrandonw mbrandonw commented Jan 26, 2026

Right now pfw doesn't work for Claude because Claude doesn't support nested skills, e.g. ~/.claude/skills/the-point-free-way/skills/SQLiteData/SKILL.md. That intermediate the-point-free-way/skills directory is a problem.

So we now just copy each skill directly into the skills directory, but with a "pfw-" prefix to distinguish them from other skills. We also delete all existing "pfw-…" directories when installing.

withIntermediateDirectories createIntermediates: Bool,
attributes: [FileAttributeKey: Any]?
) throws
func createDirectory(at url: URL, withIntermediateDirectories createIntermediates: Bool) throws
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to this PR, and I could move this to #5 where it belongs, but I realized that I went a little overzealous with the arguments to some of the FileSystem methods. we don't need access to all of the arguments, so scaled things back.

allowUncontainedSymlinks: Bool,
progress: Progress?,
pathEncoding: String.Encoding?
) throws
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Comment on lines +14 to +15
func moveItem(at srcURL: URL, to dstURL: URL) throws
func contentsOfDirectory(at url: URL) throws -> [URL]
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New FileSystem endpoints to implement the claude fix. We need to be able to move directories and inspect directories so that we can delete previous versions.

Comment thread Sources/pfw/Install.swift
Comment on lines +87 to +91
if installPath.hasPrefix("~/") {
expandedPath = fileSystem.homeDirectoryForCurrentUser.path + "/" + installPath.dropFirst(2)
} else {
expandedPath = installPath
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed expanding tilde paths too.

Base automatically changed from tests to main January 28, 2026 18:05
@mbrandonw mbrandonw merged commit 83bd64b into main Jan 28, 2026
2 checks passed
@mbrandonw mbrandonw deleted the claude-fix branch January 28, 2026 18:19
@mbrandonw mbrandonw restored the claude-fix branch January 28, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants