← 返回
未分类 中文

Copilot CLI

Reference knowledge base for GitHub Copilot CLI. Use when answering questions about Copilot CLI features, commands, configuration, plugins, hooks, skills, MC...
GitHub Copilot CLI 参考知识库。用于回答 Copilot CLI 功能、命令、配置、插件、钩子、技能、MC... 相关问题。
awalesagar
未分类 clawhub v1.1.1 1 版本 100000 Key: 无需
★ 1
Stars
📥 394
下载
💾 0
安装
1
版本
#latest

概述

Copilot CLI Reference Skill

GitHub Copilot CLI is a terminal-native AI coding agent. This skill provides reference docs for all features, commands, and operational patterns.

When to Use

USE this skill when:

  • Answering questions about Copilot CLI features, commands, or configuration
  • Setting up CI/CD automation with Copilot CLI or GitHub Actions
  • Troubleshooting Copilot CLI errors, auth, or rate limits
  • Creating custom agents, plugins, hooks, or MCP server integrations
  • Writing prompts for programmatic/autopilot execution
  • Comparing Copilot CLI vs Claude Code for a specific use case

DON'T use this skill when:

  • General Git or GitHub questions unrelated to Copilot CLI (→ use git CLI / GitHub skill)
  • VS Code Copilot Chat or Copilot Edits features (→ IDE-specific docs)
  • GitHub Actions workflows that don't involve Copilot (→ Actions docs)
  • Copilot Workspace or other non-CLI Copilot products

Setup

Install: npm install -g @github/copilot (or via GitHub CLI extension)

Auth: copilot → trust directory → /login

Config: edit ~/.copilot/config.json directly (no copilot config set command)

See references/getting-started.md for full installation, authentication, and configuration details.

Quick Reference

Interactive: copilot → trust directory → /login → prompt

Programmatic: copilot -p "PROMPT" --yolo --no-ask-user -s

With permissions: copilot -p "PROMPT" --allow-tool='shell(git:*), write' --no-ask-user

Autopilot: copilot --autopilot --yolo --max-autopilot-continues 10 -p "PROMPT"

Custom agent: copilot -p "PROMPT" --agent=my-agent

Model override: copilot -p "PROMPT" --model claude-opus-4.6

Plan mode: Shift+Tab to cycle modes (standard/plan/autopilot)

Research: /research TOPIC → deep report with citations

Fleet: /fleet PROMPT → parallel subagent execution

Chronicle: /chronicle standup · tips · improve · reindex

Copilot CLI vs Claude Code

NeedCopilot CLIClaude Code
--------------------------------
Rate-limited on Claude Code✅ Use as fallback
CI/CD automation✅ Built-in Actions supportLimited
Clean stdout (no PTY/ANSI)✅ Better
Long iterative reviews✅ Better for many iterations

See references/patterns-and-best-practices.md for the full decision matrix.

Key Gotchas

Automation:

  • Always use -p (not -i) for automation — -i hangs
  • Always set --max-autopilot-continues=N in CI/CD to prevent runaway loops
  • Size timeouts by complexity: 120s (simple) → 1800s (large)
  • Background servers die between exec spawns — restart each time

OpenClaw Integration (programmatic exec):

  • Copilot requires a real TTY — pipe/stdout redirection causes EPIPE crashes
  • Use pty: true on exec calls to avoid output fragmentation
  • Set timeout: 120 minimum (MCP startup ~3s + inference ~25s+)
  • Use --allow-all (or --yolo) for file write permissions in --no-ask-user mode
  • Working formula:

```bash

copilot -p "" --no-ask-user --allow-all --max-autopilot-continues 3

# + exec options: pty=true, timeout=120

```

  • The --add-dir flag grants access to specific directories without full --allow-all

Configuration:

  • --yolo does NOT skip folder trust — pre-trust in ~/.copilot/config.json
  • No copilot config set — edit config JSON manually
  • Custom instructions now combine (not cascade) — avoid conflicting instructions

Experimental features:

  • /chronicle and history queries require --experimental or /experimental on
  • Premium requests vary by model multiplier — check with /model

See references/troubleshooting.md for all issues and fixes.

Quick Responses

QuestionAnswer
------------------
How do I start Copilot CLI?copilot (interactive)
How do I use it in CI/CD?copilot -p "PROMPT" --yolo --no-ask-user -s
How do I create a custom agent?See references/automation-and-delegation.md
How do I add an MCP server?See references/customization.md
How do I research a topic?/research TOPIC in interactive mode

Reference Documents

Full index: references/index.md

FileContents
----------------
getting-started.mdInstallation, auth, config, permissions, env vars, plan mode overview
usage.mdInteractive & programmatic modes, 40+ slash commands, shortcuts, model selection, config settings, built-in agents
automation-and-delegation.mdCI/CD, GitHub Actions, autopilot, delegate, fleet, custom agent creation
customization.mdCustom instructions (combining), plugins, MCP servers, enterprise governance
hooks.mdHook types (command + prompt), config, denial responses, PowerShell support
integrations.mdVS Code integration (diffs, sessions, selection), ACP server
research.md/research reports with citations, /chronicle session history & insights
troubleshooting.mdAuth, rate limits, autopilot runaway, enterprise access, diagnostics
patterns-and-best-practices.mdDecision matrix, prompt engineering, anti-patterns

All files in references/ directory.

版本历史

共 1 个版本

  • v1.1.1 当前
    2026-05-03 08:08 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

code-with-claude

awalesagar
全面的 Claude Code CLI 参考,涵盖交互模式、CLI 参数、命令、环境变量、钩子、通道、检查点、插件等。
★ 0 📥 407

Axi Send File

awalesagar
将工作区文件转换为可在Telegram下载的附件(PDF/ZIP)。用于用户请求接收、下载或发送已生成的文件。
★ 0 📥 306

Lean Context

awalesagar
通过上下文压缩、选择性加载等方式,降低AI代理系统(Claude Code、OpenClaw、GPT Codex、Cursor、Windsurf、Aider等)的token使用量。
★ 0 📥 297