home / skills / ntaksh42 / agents / copilot-delegate

copilot-delegate skill

/dotfiles/claude/skills/copilot-delegate

This skill delegates user requests to the GitHub Copilot CLI and returns the exact results.

npx playbooks add skill ntaksh42/agents --skill copilot-delegate

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

Files (1)
SKILL.md
1.0 KB
---
name: copilot-delegate
description: Copilot CLIに処理を委譲するスキル。ユーザーが「Copilotに聞いて」「Copilotで確認して」「Copilotに任せて」などと明示的に依頼したときに使用する。GitHub Copilot CLIの機能を活用して、コマンドの提案やGit操作の説明などを取得する。
---

# Copilot Delegate

GitHub Copilot CLIに処理を委譲し、その結果を返す。

## 使用方法

ユーザーが明示的にCopilotへの委譲を依頼した場合、以下のコマンドを実行する:

```bash
copilot -p "依頼内容"
```

## トリガー例

- 「Copilotに聞いて」
- 「Copilotで確認して」
- 「Copilotに任せて」
- 「Copilotに相談して」

## 実行手順

1. ユーザーの依頼内容を抽出する
2. `copilot -p "依頼内容"` を実行する
3. 結果をそのままユーザーに返す

## 注意事項

- Copilot CLIがインストールされていない場合はエラーになる
- 結果はCopilot CLIの出力をそのまま表示する

Overview

This skill delegates user requests to GitHub Copilot CLI and returns the CLI output directly. It is used when a user explicitly asks to consult or hand a task over to Copilot. The skill focuses on forwarding prompts to copilot -p and relaying results unchanged.

How this skill works

When a user explicitly asks to use Copilot, the skill extracts the user’s request and runs copilot -p "{user request}" on the host where the agent operates. It captures the CLI output and returns it verbatim to the user. If the Copilot CLI is not installed or an error occurs, the skill reports the failure and the CLI error message.

When to use it

  • User says phrases like "Ask Copilot", "Check with Copilot", or "Hand it to Copilot".
  • You need command suggestions, code snippets, or Git operation explanations from GitHub Copilot CLI.
  • Quickly delegate exploratory or generative prompts to the Copilot CLI rather than answering directly.
  • When the user specifically requests an authoritative Copilot response.
  • When you want Copilot-provided command-line output or suggested commands.

Best practices

  • Confirm the user explicitly requested Copilot delegation before running the CLI.
  • Sanitize or review sensitive content in prompts to avoid exposing secrets to the CLI environment.
  • Return the CLI output verbatim, but optionally add a short note if the CLI produced errors.
  • Check that the runtime environment has Copilot CLI installed and accessible before delegation.
  • If the user needs follow-up, offer to run additional Copilot prompts refining the original request.

Example use cases

  • User: "Ask Copilot how to rebase this branch" → run copilot -p "how to rebase branch X onto Y" and return output.
  • User: "Check with Copilot for a suggested git commit message" → forward the diff or description to Copilot and relay its suggestion.
  • User: "Let Copilot propose a command to delete stale branches" → capture the proposed shell command and share it.
  • User: "Consult Copilot for a refactor example" → send the refactor prompt and return the code sample produced by Copilot.
  • User: "Have Copilot review my git workflow steps" → pass the workflow description and return Copilot’s guidance.

FAQ

What happens if Copilot CLI is not installed?

The skill returns an error indicating the CLI is missing and provides that CLI error output.

Do you modify Copilot’s output?

No. The skill returns Copilot CLI output verbatim, though it may add a brief note about errors or execution context.

Can I chain multiple Copilot prompts?

Yes. You can ask for follow-up runs or refinements; each will be executed as a separate copilot -p invocation.