Refactor install to use centralized symlink-based approach#3
Refactor install to use centralized symlink-based approach#3ibrahimkteish wants to merge 9 commits intopointfreeco:mainfrom
Conversation
- Remove destructive file deletion - all installs now merge files - Add support for --path . or --path current to install into current directory - Add path validation for ALL custom paths to ensure they're in .codex/skills or .claude/skills - Add helpful error messages with usage examples when validation fails - Add user confirmation prompt when installing to custom paths - Fix extraction to place skills directly in target path, not in nested skills/skills folder - Update help text to document current directory option This change ensures users never lose existing work when installing skills, and prevents installations to arbitrary directories outside the expected skills folders.
- Add test target to Package.swift - Refactor Install.swift to extract testable helper functions: - isCurrentDirectoryPath: Detects if path is current directory - validateInstallPath: Validates path contains expected tool pattern - resolveInstallURL: Resolves final install URL based on inputs - Create comprehensive test suite with 21 tests using @test syntax: - Path validation tests (valid/invalid paths, tool matching) - Current directory detection tests - Install URL resolution tests - Tool default path tests - Edge cases (whitespace, case sensitivity, trailing slashes) - All tests passing with Swift Testing framework (macOS 15+)
- Remove 'current' keyword support to avoid conflicts with actual directory names - Make path validation flexible to support different naming conventions (.github, .copilot, .claude) - Update validation to only require '/skills' in path instead of tool-specific pattern - Update tests to reflect new validation logic
- Add centralized skills storage (~/.pfw/skills or .pfw/skills) - Create symlinks from each AI tool's expected location to central storage - Support global vs local storage (--local flag) - Support global vs workspace symlinks (--workspace flag) - Add multi-tool support: cursor, claude, codex, kiro, gemini, antigravity - Add interactive tool selection prompt - Update Status command to show symlink status - Add comprehensive tests for new functionality
- Track symlink failures and exit with error code if any fail - Show proper completion message based on success/failure - Implement workspace symlink status in Status command - Refactor Status to extract duplicated symlink checking logic - Simplify .gitignore comments (detailed docs are in README)
- Implement directory creation for tool skills before symlink creation - Retrieve and create symlinks for all skill folders from the central skills directory - Improve error handling and output messages for symlink creation failures - Ensure existing symlinks are removed before creating new ones
|
Hey @ibrahimkteish, thanks for exploring all of this. This all sounds interesting, but it also is a bit much all at once. Can you instead open a PR that is focused on just a single topic? Also, once #5 is merged we'd like all PRs to have some test coverage too, when possible. |
|
Thanks for the feedback @mbrandonw ! I understand - this PR does cover a lot of ground at once. I can break this into smaller, focused PRs. Here's how I'm thinking of splitting it:
Should I close this PR and start fresh with smaller ones after #5 is merged? |
|
Hi @ibrahimkteish, yep most of that sounds good to me. Here is some specific feedback:
Yeah that would be great. Will let you know once #5 is merged. I built support for symlinks into the Thanks again for looking into this! |
Great, that all sounds good to me then. Will let you know once we merging everything.
Yep that's fine! Was just using a shorthand, but whatever is necessary for each tool will be used. |

Summary
~/.pfw/skills/or.pfw/skills/) with symlinks to each AI tool's expected location--localflag for project-specific storage that can be committed to git--workspaceflag for project-level symlinksWhy symlinks?
Instead of duplicating skills for each AI tool, this approach:
--localautomatically enables--workspaceto avoid conflicts between projectsTest plan
--local,--workspace,--allflagspfw statusshows correct symlink status for both global and workspace