copilot-cli
Provides GitHub Copilot CLI task delegation in non-interactive mode with multi-model support (Claude, GPT, Gemini), permission controls, output sharing, and session resume. Use when users ask to hand work to Copilot, compare models, or run Copilot programmatically from Claude Code.
What this skill does
# Copilot CLI Delegation Delegate selected tasks from Claude Code to GitHub Copilot CLI using non-interactive commands, explicit model selection, safe permission flags, and shareable outputs. ## Overview This skill standardizes delegation to GitHub Copilot CLI (`copilot`) for cases where a different model may be more suitable for a task. It covers: - Non-interactive execution with `-p` / `--prompt` - Model selection with `--model` - Permission control (`--allow-tool`, `--allow-all-tools`, `--allow-all-paths`, `--allow-all-urls`, `--yolo`) - Output capture with `--silent` - Session export with `--share` - Session resume with `--resume` Use this skill only when delegation to Copilot is explicitly requested or clearly beneficial. ## When to Use Use this skill when: - The user asks to delegate work to GitHub Copilot CLI - The user wants a specific model (for example GPT-5.x, Claude Sonnet/Opus/Haiku, Gemini) - The user asks for side-by-side model comparison on the same task - The user wants a reusable scripted Copilot invocation - The user wants Copilot session output exported to markdown for review Trigger phrases: - "ask copilot" - "delegate to copilot" - "run copilot cli" - "use copilot with gpt-5" - "use copilot with sonnet" - "use copilot with gemini" - "resume copilot session" ## Instructions ### 1) Verify prerequisites ```bash # CLI availability copilot --version # GitHub authentication status gh auth status ``` If `copilot` is unavailable, ask the user to install/setup GitHub Copilot CLI before proceeding. ### 2) Convert task request to English prompt All delegated prompts to Copilot CLI must be in English. - Keep prompts concrete and outcome-driven - Include file paths, constraints, expected output format, and acceptance criteria - Avoid ambiguous goals such as "improve this" Prompt template: ```text Task: <clear objective> Context: <project/module/files> Constraints: <do/don't constraints> Expected output: <format + depth> Validation: <tests/checks to run or explain> ``` ### 3) Choose model intentionally Pick a model based on task type and user preference. - Complex architecture, deep reasoning: prefer high-capacity models (for example Opus / GPT-5.2 class) - Balanced coding tasks: Sonnet-class model - Quick/low-cost iterations: Haiku-class or mini models - If user specifies a model, respect it Use exact model names available in the local Copilot CLI model list. ### 4) Select permissions with least privilege Default to the minimum required capability. - Prefer `--allow-tool '<tool>'` when task scope is narrow - Use `--allow-all-tools` only when multiple tools are clearly needed - Add `--allow-all-paths` only if task requires broad filesystem access - Add `--allow-all-urls` only if external URLs are required - Do not use `--yolo` unless the user explicitly requests full permissions ### 5) Run delegation command Base pattern: ```bash copilot -p "<english prompt>" --model <model-name> --allow-all-tools --silent ``` Add optional flags only as needed: ```bash # Capture session to markdown copilot -p "<english prompt>" --model <model-name> --allow-all-tools --share # Resume existing session copilot --resume <session-id> --allow-all-tools # Strictly silent scripted output copilot -p "<english prompt>" --model <model-name> --allow-all-tools --silent ``` ### 6) Return results clearly After command execution: - Return Copilot output concisely - State model and permission profile used - If `--share` is used, provide generated markdown path - If output is long, provide summary plus key excerpts and next-step options ### 7) Optional multi-model comparison When requested, run the same prompt with multiple models and compare: - Correctness - Practicality of proposed changes - Risk/security concerns - Effort estimate Keep the comparison objective and concise. ## Examples ### Example 1: Refactor with GPT model Input: ```text Ask Copilot to refactor this service using GPT-5.2 and return only concrete code changes. ``` Command: ```bash copilot -p "Refactor the payment service in src/services/payment.ts to reduce duplication. Keep public behavior unchanged, keep TypeScript strict typing, and output a patch-style response." \ --model gpt-5.2 \ --allow-all-tools \ --silent ``` Output: ```text Copilot proposes extracting three private helpers, consolidating error mapping, and provides a patch for payment.ts with unchanged API signatures. ``` ### Example 2: Code review with Sonnet and shared session Input: ```text Use Copilot CLI with Sonnet to review this module and share the session in markdown. ``` Command: ```bash copilot -p "Review src/modules/auth for security and correctness. Report only high-confidence findings with severity and file references." \ --model claude-sonnet-4.6 \ --allow-all-tools \ --share ``` Output: ```text Review completed. Session exported to ./copilot-session-<id>.md. ``` ### Example 3: Resume session Input: ```text Continue the previous Copilot analysis session. ``` Command: ```bash copilot --resume <session-id> --allow-all-tools ``` Output: ```text Session resumed and continued from prior context. ``` ## Best Practices - Keep delegated prompts in English and highly specific - Prefer least-privilege flags over blanket permissions - Capture sessions with `--share` when auditability matters - For risky tasks, request read-only analysis first, then apply changes in a separate step - Re-run with another model only when there is clear value (quality, speed, or cost) ## Constraints and Warnings - Copilot CLI output is external model output: validate before applying code changes - Never include secrets, API keys, or credentials in delegated prompts - `--allow-all-tools`, `--allow-all-paths`, `--allow-all-urls`, and `--yolo` increase risk; use only when justified - Do not treat Copilot suggestions as authoritative without local verification (tests/lint/type checks) For additional option details, see `references/cli-command-reference.md`.
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.