Support PI_CODING_AGENT_DIR for skills - #14260
Open
tommaso-moro wants to merge 1 commit into
Open
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Resolves #14118 by honoring Pi’s custom global agent directory for user-scoped skills.
Changes:
- Resolves Pi skills under
$PI_CODING_AGENT_DIR/skills. - Preserves the existing default path when unset.
- Adds registry and installation regression tests.
Show a summary per file
| File | Description |
|---|---|
internal/skills/registry/registry.go |
Adds Pi environment-based directory resolution. |
internal/skills/registry/registry_test.go |
Tests default and overridden Pi paths. |
pkg/cmd/skills/install/install_test.go |
Verifies installation into the overridden directory. |
Review details
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Balanced
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.
Fixes #14118
Description
Pi supports relocating its global agent configuration with
PI_CODING_AGENT_DIRand discovers global skills under that directory'sskills/subdirectory.gh skillignored the override and always used~/.pi/agent/skillsfor Pi user-scope operations.This updates the shared agent registry resolver to use
$PI_CODING_AGENT_DIR/skillswhen the variable is set. Because install, list, and update all use this resolver, they now agree on the custom Pi location. When the variable is unset, the existing~/.pi/agent/skillsfallback remains unchanged.How did you test this change?
Given
PI_CODING_AGENT_DIRpointed to this checkout's.githubdirectory, whoseskills/directory contains thecode-reviewskill, when I rango run ./cmd/gh skill list --agent pi --scope user --json skillName,path, the command reportedcode-reviewat.github/skills/code-reviewinstead of looking under~/.pi/agent/skills.Key points
The change stays in
AgentHost.InstallDir, matching the existingCLAUDE_CONFIG_DIRhandling. Project-scope resolution and every other agent remain unchanged.Notes for reviewers
Start with
internal/skills/registry/registry.go, then review the registry and install regression tests. Pi's current environment variable documentation definesPI_CODING_AGENT_DIRas the config-directory override, and its skills documentation places global skills beneath the agent directory. This follows the same approach merged for Claude Code in #13523.Authorship and follow-up
Who wrote this:
Who answers review comments: