microsoft / microsoft/GitHub-Copilot-for-Azure
Replace microsoft-foundry skill azd context resolution (Step 2) with a script
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 250
- Forks
- 204
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 67
Description
## Summary
Copilot has identified a portion of a skill that is a good candidate for replacement with a script.
The candidate is the **azd context resolution (Step 2)** in the `microsoft-foundry` skill (`SKILL.md`, Common Project Context Resolution).
## Candidate description
**azd context resolution (Step 2)**
This step runs `azd env get-values` — which emits *all* environment variables — and maps a fixed, known set of ~10 named variables (`AZURE_AI_PROJECT_ENDPOINT` / `AZURE_AIPROJECT_ENDPOINT`, `AGENT__NAME`, `AGENT__VERSION`, `AZURE_CONTAINER_REGISTRY_NAME` / `AZURE_CONTAINER_REGISTRY_ENDPOINT`, `APPLICATIONINSIGHTS_CONNECTION_STRING`, `AZURE_SUBSCRIPTION_ID`, `AZURE_RESOURCE_GROUP`, `AZURE_AI_ACCOUNT_NAME`, `AZURE_AI_PROJECT_NAME`) to deployment context. This is the textbook "command produces a lot of output, only a small part is needed" case — deterministic, output-heavy, and repeated across the deploy/invoke/observe/trace/troubleshoot sub-skills. The script could also fold in the environment-name precedence (`AZURE_ENV_NAME`, then the azd default from `.azure/config.json`) and emit a compact set of resolved values.
## Affected file and lines
- [`SKILL.md` — Step 2: Resolve Environment and Deployment Context (L120–L140)](https://github.com/microsoft/GitHub-Copilot-for-Azure/blob/164e0cda7b9d75d6e0d64b235d17bd7ff5e2909e/plugin/skills/microsoft-foundry/SKILL.md#L120-L140)
## Next steps
1. **Evaluate the candidate** — confirm the steps are stable and parameterizable, and that the script captures everything the skill needs.
2. **Create both a bash _and_ a PowerShell version** of the script so the skill works across platforms.
3. **Run integration tests** to verify the scripts behave correctly and the skill still completes end-to-end.
## Background Information
### Why replace regular steps with scripts
Replacing a regular, well-defined series of steps with a script can:
- **Reduce token usage** — the skill no longer needs to spell out each command and parse large command output inline; the agent invokes one script and reads a compact result.
- **Improve reliability** — the logic is written and tested once, instead of being re-derived by the agent on every run.
- **Improve determinism** — the same inputs always produce the same steps and output, removing run-to-run variation.
- **Improve speed of execution** — a single script call replaces multiple round-trips of command generation, execution, and large-output parsing.
### Authoring notes for the scripts
- **Reference scripts with markdown links**, not just a bare path to the script file.
- **Include examples** in the skill showing how to run each script (sample invocation with arguments).
- **Briefly explain what each script does** where it is referenced.
- **The script output should explain what it did**, so the agent and user can understand the result without re-inspecting raw command output.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with SKILL.md Step 2, lines 120–140, and inspect .azure/config.json for the environment-name precedence. Review how the deploy, invoke, observe, trace, and troubleshoot sub-skills use the resolved values, then run the integration tests. Done means bash and PowerShell scripts produce the compact context and the skill still completes end-to-end.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, bash, powershell
- Domain
- cloud, devops, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100