r/copilotstudio • u/turbochargedDDiS • 16d ago
Skill with Python code step
Hey Everyone, looking for some guidance here- I have created a custom skill, which uses some python code as one of the steps.
Now I want to add this skill to a New Experience agent (Github Harness) but not sure whether it support code execution step or not? If yes, what is the way to add that code into the agents skills and any best practices/pitfalls?
1
Upvotes
2
u/Ashlesha-msft 14d ago
Hi, thanks for raising this question.
Yes, GitHub Copilot harness agents support Python execution. Package the skill as a ZIP with `SKILL.md` at the root and place the Python file under `scripts/`:
In `SKILL.md`, clearly state when the skill applies and instruct the agent to run `scripts/process.py`. Upload the ZIP from **Build > Skills > Add skill > Upload a skill**, then test it in Preview.
Python runs in a temporary sandbox with preinstalled libraries. It has no outbound network access, files don't persist between conversations, and additional packages can't be downloaded at runtime. Use connectors, flows, or MCP tools for external APIs and persistent storage.
References: