Skip to content

feat(install): accept GitHub skill file URLs#1989

Open
WilliamK112 wants to merge 2 commits into
microsoft:mainfrom
WilliamK112:codex/apm-github-skill-url-1970
Open

feat(install): accept GitHub skill file URLs#1989
WilliamK112 wants to merge 2 commits into
microsoft:mainfrom
WilliamK112:codex/apm-github-skill-url-1970

Conversation

@WilliamK112

@WilliamK112 WilliamK112 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

apm-spec-waiver: CLI-only URL normalization reuses existing git and skills manifest semantics.

Closes #1970

Summary

  • Normalize GitHub blob URLs and raw.githubusercontent.com URLs that point at skills/<name>/SKILL.md into repo refs plus an implicit skills subset.
  • Apply the implicit skill pin per package, so mixed installs do not leak that skill filter onto unrelated packages.
  • Keep malformed GitHub SKILL.md URLs clear by reporting when the file is outside a skills/ directory.
  • Add direct parser coverage for URL variants, aggregation, malformed paths, and traversal rejection.

Validation

  • uv run --frozen --extra dev pytest tests/unit/install/test_github_skill_url.py tests/unit/install/test_skill_subset_deploy_parity.py tests/unit/test_skill_subset_persistence.py tests/integration/test_pack_install_flow.py::TestValidateAndAddPackagesToApmYml -q -n0 (91 passed)
  • uv run --frozen --extra dev ruff check src/apm_cli/commands/install.py src/apm_cli/install/package_resolution.py tests/unit/install/test_github_skill_url.py tests/integration/test_pack_install_flow.py
  • uv run --frozen --extra dev ruff format --check src/apm_cli/commands/install.py src/apm_cli/install/package_resolution.py tests/unit/install/test_github_skill_url.py tests/integration/test_pack_install_flow.py
  • BASE_REF=origin/main bash tests/spec_conformance/mode_b_detector.sh
  • git diff --check origin/main...HEAD

Signed-off-by: WilliamK112 WilliamK112@users.noreply.github.com

Copilot AI review requested due to automatic review settings July 1, 2026 18:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR extends apm install to accept full GitHub file URLs that point to skills/<name>/SKILL.md (from both github.com/.../blob/... and raw.githubusercontent.com/...) by normalizing them into a repo ref plus an implicit per-package skills: subset pin in apm.yml.

Changes:

  • Add GitHub SKILL.md URL normalization that derives (repo#ref, skills[]) and produces clearer validation errors for malformed URLs.
  • Apply implicit skill subset pins per package during install reference resolution (preventing subset leakage across other packages in the same install).
  • Add integration coverage for blob/raw URL normalization, manifest update behavior, non-leakage, and invalid “outside skills/” URLs.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/integration/test_pack_install_flow.py Adds integration tests covering GitHub blob/raw SKILL.md URL installs and error cases.
src/apm_cli/install/package_resolution.py Introduces URL parsing/normalization helpers to convert GitHub SKILL.md URLs into repo refs + skill subsets.
src/apm_cli/commands/install.py Threads per-package implicit skill subsets into _resolve_package_references so subset pins apply only to the intended package(s).

Comment thread src/apm_cli/commands/install.py
@sergio-sisternes-epam sergio-sisternes-epam added the panel-review Trigger the apm-review-panel gh-aw workflow label Jul 1, 2026
@sergio-sisternes-epam sergio-sisternes-epam self-assigned this Jul 1, 2026
@WilliamK112
WilliamK112 force-pushed the codex/apm-github-skill-url-1970 branch from 2d6fe00 to 3257119 Compare July 2, 2026 01:22
WilliamK112 and others added 2 commits July 23, 2026 22:05
Signed-off-by: Ching Wei Kang <WilliamK112@users.noreply.github.com>
apm-spec-waiver: CLI-only URL normalization reuses existing git and skills manifest semantics.
Signed-off-by: WilliamK112 <164879897+WilliamK112@users.noreply.github.com>
@WilliamK112
WilliamK112 force-pushed the codex/apm-github-skill-url-1970 branch from 3257119 to 1e0e1f0 Compare July 23, 2026 14:08
@WilliamK112

Copy link
Copy Markdown
Contributor Author

Rebased onto current main and resolved the install/docs conflicts. I also added direct parser tests for aggregation, malformed paths, and percent-encoded traversal rejection. Current focused validation: 91 tests passed; Ruff check/format, the Mode B spec gate, and git diff --check are clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

panel-review Trigger the apm-review-panel gh-aw workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Support installing skill from complete GitHub URL to SKILL.md file

3 participants