fix(cli): find marimo-pair skill from subdirectories of the repo root - #10704
Open
jungleBadger wants to merge 1 commit into
Open
fix(cli): find marimo-pair skill from subdirectories of the repo root#10704jungleBadger wants to merge 1 commit into
jungleBadger wants to merge 1 commit into
Conversation
`marimo pair prompt --claude` reported the marimo-pair skill as missing whenever it ran below the repository root, even with the skill correctly installed at `<repo>/.claude/skills/marimo-pair/`. `_claude_skill_dirs()` only considered `Path.cwd() / ".claude"`, but Claude Code resolves project skills from the start directory and every parent up to the repository root. Walk the same path so a skill installed once at the root is found from any subdirectory, stopping at the root rather than escaping to unrelated ancestors. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
jungleBadger
marked this pull request as ready for review
August 30, 2026 14:51
jungleBadger
marked this pull request as draft
August 30, 2026 20:54
jungleBadger
marked this pull request as ready for review
August 30, 2026 20:56
1 task
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.
Problem
marimo pair prompt --claudereports the marimo-pair skill as missing whenever it isrun from a subdirectory of the project, even when the skill is correctly installed at
<repo>/.claude/skills/marimo-pair/SKILL.md:Same project, same install. Running the command from anywhere below the root — which is
common, since notebooks often live in a subdirectory — tells the user to reinstall a
skill they already have.
Cause
_claude_skill_dirs()builds its roots fromPath.cwd() / ".claude"only. Claude Coderesolves project skills from
.claude/skillsin the directory it was started in and inevery parent directory up to the repository root, so a skill installed once at the root
applies to every subdirectory. The validator checked a single directory where Claude Code
checks a chain.
Fix
Add
_claude_project_roots(), which walks from the current directory up to the repositoryroot and returns each
.claudealong the way. It stops at the root rather than continuingto unrelated ancestors, and treats a
.gitfile as a root so worktrees and submodulesresolve correctly. Outside a repository there is no root to walk to, so only the current
directory applies — matching the previous behaviour for that case.
~/.claudeis still checked, and the plugin/marketplace subdirectory handling is unchanged.Tests
_claude_skill_dirs()had no coverage, which is how this went unnoticed. AddedTestClaudeProjectRootswith five cases: the parent walk itself, the end-to-end"skill at root, found from a subdirectory" regression, the stop-at-root boundary,
.git-as-a-file, and the no-repository fallback.Verified the regression test fails without the fix and passes with it, using only the
pre-existing
_claude_skill_dirs()/AgentConfigAPI:tests/_cli/test_cli_pair.py— 31 passed.ruff check,ruff format --check, andmypy marimo/_cli/pair/commands.pyall clean. The widertests/_cli/suite has 7failures in
test_cli_export.py(test_export_watch_*_no_out_dir) that reproduceidentically on an unmodified checkout of
main, so they are unrelated to this change.Related
Same class of path-resolution mismatch as previous fixes to this function, and not covered
by any of them:
This is the project-root dimension: all three above corrected which directories are
checked, while
.claudeproject roots were still resolved fromPath.cwd()alone.Note
Drafted with AI assistance; disclosed via a
Co-Authored-Bytrailer on the commit. Happyto drop the trailer or restructure if that conflicts with project preference.