|
| 1 | +# Two namespaced skills with the same base name in the same repo should |
| 2 | +# be independently installable using path-based disambiguation. |
| 3 | + |
| 4 | +# Use gh as a credential helper |
| 5 | +exec gh auth setup-git |
| 6 | + |
| 7 | +# Create a repo with two namespaced skills that share the name "deploy" |
| 8 | +exec gh repo create $ORG/$SCRIPT_NAME-$RANDOM_STRING --public --add-readme |
| 9 | +defer gh repo delete --yes $ORG/$SCRIPT_NAME-$RANDOM_STRING |
| 10 | + |
| 11 | +exec gh repo clone $ORG/$SCRIPT_NAME-$RANDOM_STRING |
| 12 | +cd $SCRIPT_NAME-$RANDOM_STRING |
| 13 | + |
| 14 | +mkdir -p skills/alice/deploy |
| 15 | +mkdir -p skills/bob/deploy |
| 16 | +cp $WORK/alice-skill.md skills/alice/deploy/SKILL.md |
| 17 | +cp $WORK/bob-skill.md skills/bob/deploy/SKILL.md |
| 18 | + |
| 19 | +exec git add -A |
| 20 | +exec git commit -m 'Add namespaced skills' |
| 21 | +exec git push origin main |
| 22 | + |
| 23 | +# Publish so the skills are discoverable |
| 24 | +exec gh skill publish --tag v1.0.0 |
| 25 | + |
| 26 | +# Install alice's deploy skill using the full path to disambiguate |
| 27 | +exec gh skill install $ORG/$SCRIPT_NAME-$RANDOM_STRING skills/alice/deploy --scope user --force |
| 28 | +stdout 'Installed alice/deploy' |
| 29 | + |
| 30 | +# Install bob's deploy skill using the full path |
| 31 | +exec gh skill install $ORG/$SCRIPT_NAME-$RANDOM_STRING skills/bob/deploy --scope user --force |
| 32 | +stdout 'Installed bob/deploy' |
| 33 | + |
| 34 | +# Verify both were installed to separate directories |
| 35 | +exists $HOME/.copilot/skills/alice/deploy/SKILL.md |
| 36 | +exists $HOME/.copilot/skills/bob/deploy/SKILL.md |
| 37 | + |
| 38 | +# Verify each has the correct content |
| 39 | +grep 'Alice' $HOME/.copilot/skills/alice/deploy/SKILL.md |
| 40 | +grep 'Bob' $HOME/.copilot/skills/bob/deploy/SKILL.md |
| 41 | + |
| 42 | +-- alice-skill.md -- |
| 43 | +--- |
| 44 | +name: deploy |
| 45 | +description: Alice's deployment skill |
| 46 | +--- |
| 47 | + |
| 48 | +# Deploy by Alice |
| 49 | + |
| 50 | +Deploys infrastructure using Alice's conventions. |
| 51 | + |
| 52 | +-- bob-skill.md -- |
| 53 | +--- |
| 54 | +name: deploy |
| 55 | +description: Bob's deployment skill |
| 56 | +--- |
| 57 | + |
| 58 | +# Deploy by Bob |
| 59 | + |
| 60 | +Deploys infrastructure using Bob's conventions. |
0 commit comments