Skip to content

Comments

feat: add --path flag for subfolder filtering#11

Merged
trieloff merged 2 commits intotrieloff:mainfrom
shsteimer:feat/subfolder-filtering
Feb 11, 2026
Merged

feat: add --path flag for subfolder filtering#11
trieloff merged 2 commits intotrieloff:mainfrom
shsteimer:feat/subfolder-filtering

Conversation

@shsteimer
Copy link
Contributor

@shsteimer shsteimer commented Feb 5, 2026

Summary

  • Adds -p, --path <subfolder> option to restrict skill discovery to a specific subdirectory within the cloned repo
  • Enables parity with the Vercel Skills CLI's tree-URL syntax (npx skills add https://github.com/owner/repo/tree/main/path)
  • Validates the path exists after clone, with a clear error if not

This allows the adobe/skills README to document equivalent commands for both tools:

# Vercel Skills CLI
npx skills add https://github.com/adobe/skills/tree/main/skills/aem/edge-delivery-services --all

# upskill (new)
upskill adobe/skills --path skills/aem/edge-delivery-services --all

Test plan

  • upskill adobe/skills --path skills/aem/edge-delivery-services --list shows only EDS skills
  • upskill adobe/skills --path skills/aem/edge-delivery-services --all installs only EDS skills
  • upskill adobe/skills --path nonexistent/path --all fails with clear error
  • Existing behavior without --path is unchanged
  • CI passes (make test includes new --path tests)

🤖 Generated with Claude Code


Summary by cubic

Adds a -p/--path flag to filter skill discovery to a subfolder in the cloned repo. Validates the path after clone, prevents path traversal, and matches the Vercel Skills CLI tree-URL behavior.

  • New Features
    • Restricts scanning, listing, and installs to the given subfolder; fails fast with a clear “Path not found” error.
    • Updated README with usage examples and added tests for valid/invalid paths.

Written for commit fbf5452. Summary will update on new commits.

Adds -p/--path <subfolder> option to restrict skill discovery to a
specific subdirectory within the cloned repository. This enables
parity with the Vercel Skills CLI's tree-URL syntax for repos that
organize skills in nested directories.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 3 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="upskill">

<violation number="1" location="upskill:375">
P2: User-provided `--path` is concatenated without validation, allowing `../` to escape the cloned repo and scan/copy SKILL.md files outside the repository.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Ask questions if you need clarification on any suggestion

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Canonicalize both the clone directory and the resolved search path
using pwd -P, then verify the search path is within the clone root.
This prevents ../  sequences from escaping the cloned repo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@trieloff trieloff merged commit 9904cac into trieloff:main Feb 11, 2026
2 checks passed
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