Skip to content

Support skills.sh monorepo subdirectory paths in scanner pipeline #15

@rbodkin

Description

@rbodkin

Context

From PR #13 review. Currently scan-emerging normalizes skills.sh/owner/repo/skill to github.com/owner/repo and clones the repo root. For monorepos (e.g. github/awesome-copilot with multiple skills in subdirectories), scanners that need specific files get skipped:

  • cisco-skill: requires SKILL.md at scan root — skips all monorepo skills
  • cisco-mcp: searches for tools.json at root and @mcp.tool() via rglob (partial mitigation) — but can't distinguish tools from sibling skills

PR #13 added visible warnings when this happens, but the underlying limitation remains.

Proposed fix

Thread the skill subdirectory path through the fetch → prep → scan pipeline:

  1. Extract the skill-name-within-repo (3rd path component from skills.sh URLs) during manifest building
  2. Store it on ManifestEntry (e.g. subdir: str | None)
  3. In prepare_for_scanner, use skill_dir / subdir instead of skill_dir when subdir is known
  4. Update tests to cover the subdir case

Impact

Without this, cisco-skill and cisco-mcp effectively only work on single-skill repos, not the many skills.sh monorepos.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions