Skip to content

Skills not loaded when prompt is passed via -p #1187

@nsgundy

Description

@nsgundy

Describe the bug

I have installed the playwright-cli skill. The skill is not used when I use -p to execute the prompt:

copilot --model gpt-5-mini --allow-all-tools -p "take screenshot of github.com"

Affected version

0.0.398

Steps to reproduce the behavior

  1. Install playwright-cli skill from https://github.com/microsoft/playwright-cli using the /plugin method
  2. In an empty directory (i.e. /tmp/test) run
copilot --model gpt-5-mini --allow-all-tools -i "take screenshot of github.com"

Output

Fetching GitHub homepage HTML so a best-effort textual capture can be provided (no headless browser available here); calling web fetch and reporting intent in parallel.

● web_fetch
  └ Here is the raw content:

Running a headless browser to capture a full-page PNG of https://github.com because it produces an accurate screenshot.

● Take screenshot of github.com using headless browser
  $ BROWSER="$(command -v chromium-browser || command -v chromium || command -v google-chrome || 
  command -v google-chrome-stable || true)"
  if [ -n "$BROWSER" ]; then
    "$BROWSER" --headless --disable-gpu --no-sandbox --screenshot=/tmp/github_screenshot.png 
  --window-size=1280,1024 "https://github.com" || true...
   └ 36 lines...

read_bash
   └ 31 lines...

stop_bash
   └ 1 line...

● Check screenshot file exists
  $ ls -l /tmp/github_screenshot.png || true
   └ 2 lines...

Tried taking a screenshot but no headless browser produced an image; environment likely lacks a Chrome/Chromium binary or necessary system services. If a screenshot is still needed, allow use of an alternative method (e.g., using an external screenshot API or grant access to a system with a browser) and specify preferred output filename.

Expected behavior

I expect to see the same behavior as when running in interactive mode where the skill gets loaded as expected (same cwd as above).

copilot --model gpt-5-mini --allow-all-tools -i "take screenshot of github.com"

Output

❯ take screenshot of github.com

◐ **Clarifying tool invocation**

  I’m working through how to effectively use the report_intent function alongside multi_tool_use.parallel, which only allows tool 
  functions. It’s important to follow the guideline that says the report_intent must come first in tool calls. I also need to 
  include a brief explanation before invoking the tools, making sure not to use "I will" statements. So, I’ll need to craft a 
  concise pre-tool message that explains my actions clearly while adhering to the limitations.**Setting up tool calls**

  I need to initiate multi_tool_use.parallel by first calling functions.report_intent with a brief intent string like "Taking 
  screenshot." Next, I’ll use functions.skill with the skill "playwright-cli." However, I must consider that this skill may require
   additional context later, as it could ask for details like the URL or output location. I’ll start with a simple pre-tool 
  message, then call the tools and handle the responses from the skill agent as needed. This should be straightforward!

● skill(playwright-cli)

● Open GitHub and take screenshot
  $ playwright-cli open https://github.com && playwright-cli resize 1280 800 && playwright-cli screenshot && ls -1t *.png | head -n1
   └ 12 lines...

● Screenshot saved to .playwright-cli/page-2026-01-29T11-52-46-390Z.png.

Additional context

Executed in a Docker development container based on Ubuntu 20.04 with Nodejs 18 installed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions