home / skills / hiroro-work / claude-plugins / ask-copilot

ask-copilot skill

/skills/ask-copilot

This skill helps you leverage Copilot CLI for coding assistance, improving speed, debugging, and task delegation.

npx playbooks add skill hiroro-work/claude-plugins --skill ask-copilot

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.6 KB
---
name: ask-copilot
description: Asks Copilot CLI for coding assistance. Use for getting a second opinion, code generation, debugging, or delegating coding tasks.
allowed-tools: Bash(copilot:*)
---

# Ask Copilot

Executes the local `copilot` CLI to get coding assistance.

**Note:** This skill requires the `copilot` CLI to be installed and available in your system's PATH.

## Quick start

Run a single query with `-p` (prompt mode):

```bash
copilot -p "Your question or task here" --allow-all-tools
```

## Common options

| Option | Description |
|--------|-------------|
| `-p` | Non-interactive prompt mode (required for scripting) |
| `--model MODEL` | Specify model (e.g., `claude-sonnet-4.5`, `gpt-5`, `gpt-5-mini`) |
| `--allow-all-tools` | Auto-approve all tool executions (required for -p) |
| `--continue` | Resume the most recent session |

> For all available options, run `copilot --help`

## Examples

**Ask a coding question:**

```bash
copilot -p "How do I implement a binary search in Python?" --allow-all-tools
```

**Use a specific model:**

```bash
copilot -p "Review this code for potential issues" --model gpt-5 --allow-all-tools
```

**Let Copilot make changes automatically:**

```bash
copilot -p "Refactor this function to use async/await" --allow-all-tools
```

**Continue a previous session:**

```bash
copilot --continue --allow-all-tools
```

## Notes

- The `-p` flag runs Copilot non-interactively and requires `--allow-all-tools`
- Default model is claude-sonnet-4.5; use `--model` to switch models
- The command inherits the current working directory

Overview

This skill integrates with the local Copilot CLI to get coding assistance from models available on your machine. It is designed for quick, scriptable queries, code generation, debugging help, and delegating repetitive coding tasks. It requires the copilot CLI to be installed and accessible in your system PATH.

How this skill works

The skill runs the copilot CLI in non-interactive prompt mode (-p) or continues an existing session with --continue. You pass a prompt and optional flags (model selection, tool approvals) and the CLI returns model-generated guidance, code changes, or diffs. Commands inherit the current working directory so Copilot can inspect local files when allowed.

When to use it

  • When you want a second opinion on design or implementation choices
  • To generate or refactor code snippets quickly from the command line
  • When debugging tricky issues and you need guided suggestions or reproductions
  • To delegate repetitive edits or transformations across files
  • For scripted automation of model queries in CI or local tooling

Best practices

  • Install and verify the copilot CLI is available in PATH before using the skill
  • Use -p for non-interactive, reproducible queries and include --allow-all-tools when required
  • Specify --model to choose a preferred model for consistency across runs
  • Keep prompts concise but include relevant code context or file paths for better accuracy
  • Run commands from the project root so Copilot can access repository files if needed

Example use cases

  • Ask for a code review and suggestions: copilot -p "Review this module for bugs and style issues" --model gpt-5 --allow-all-tools
  • Generate a function implementation from a spec: copilot -p "Write a fast Python binary search function" --allow-all-tools
  • Refactor code to modern patterns: copilot -p "Refactor this callback-based function to async/await" --allow-all-tools
  • Resume an analysis session to continue a multi-step task: copilot --continue --allow-all-tools
  • Automate checks in scripts by invoking copilot with specific models and prompts

FAQ

Do I need internet access to use this skill?

The copilot CLI may require network access depending on the configured model and provider; check your local Copilot setup and model requirements.

What flags are required for scripting use?

Use -p for non-interactive mode and include --allow-all-tools when the CLI demands tool approval; add --model to target a specific model.