Skip to content
Back to skills

Copilot Cli Agent

ASecurity

Copilot CLI sub-agent system for persona-based analysis. Use when piping large contexts to GitHub Copilot models for security audits, architecture reviews, QA analysis, or any specialized analysis requiring a fresh model context.

  • 5 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 6, 2026
developmentpythongoshellbashreactcode-reviewgitapifrontendbackend

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned June 6, 2026

npx -y skills add richfrem/Project_Sanctuary --skill copilot-cli-agent --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Copilot Cli Agent?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Copilot Cli Agent
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/richfrem-copilot-cli-agent/badge)](https://www.skillsdirectory.com/skills/richfrem-copilot-cli-agent)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: copilot-cli-agent
description: >
  Copilot CLI sub-agent system for persona-based analysis. Use when piping
  large contexts to GitHub Copilot models for security audits, architecture reviews,
  QA analysis, or any specialized analysis requiring a fresh model context.
allowed-tools: Bash, Read, Write
---

## Ecosystem Role: Inner Loop Specialist

This skill provides specialized **Inner Loop Execution** for the [`dual-loop`](../../../agent-loops/skills/dual-loop/SKILL.md).

- **Orchestrated by**: [`agent-orchestrator`](../../agent-orchestrator/skills/orchestrator-agent/SKILL.md)
- **Use Case**: When "generic coding" is insufficient and specialized expertise (Security, QA, Architecture) is required.
- **Why**: The CLI context is naturally isolated (no git, no tools), making it the perfect "Safe Inner Loop".

## Identity: The Sub-Agent Dispatcher 🎭

You, the Antigravity agent, dispatch specialized analysis tasks to Copilot CLI sub-agents.

## πŸ› οΈ Core Pattern
```bash
cat <PERSONA_PROMPT> | copilot -p "<INSTRUCTION>" <INPUT> > <OUTPUT>
```
*Note: Copilot uses `-p` or `--prompt` for non-interactive scripting runs.*

## ⚠️ CLI Best Practices

### 1. Token Efficiency β€” PIPE, Don't Load
**Bad** β€” loads file into agent memory just to pass it:
```python
content = read_file("large.log")
run_command(f"copilot -p 'Analyze: {content}'")
```
**Good** β€” direct shell piping:
```bash
copilot -p "Analyze this log" < large.log > analysis.md
```

### 2. Self-Contained Prompts
The CLI runs in a **separate context** β€” no access to agent tools or memory.
- **Add**: "Do NOT use tools. Do NOT search filesystem."
- Ensure prompt + piped input contain 100% of necessary context.
- **Security Check**: Copilot CLI has explicit permission flags (e.g. `--allow-all-tools`, `--allow-all-paths`). For isolated sub-agents, do **not** provide these flags to ensure safe headless execution.

### 3. Output to File
Always redirect output to a file (`> output.md`), then review with `view_file`.

### 4. Severity-Stratified Constraints
When dispatching code-review, architecture, or security analysis, explicitly instruct the CLI sub-agent to use the **Severity-Stratified Output Schema**. This ensures the Outer Loop can parse the results deterministically:
> "Format all findings using the strict Severity taxonomy: πŸ”΄ CRITICAL, 🟑 MODERATE, 🟒 MINOR."

## βœ… Smoke Test (Copilot CLI)

Use this minimal command to verify the CLI is callable and returns output:

```bash
copilot -p "Reply with exactly: COPILOT_CLI_OK"
```

Expected result:
- CLI prints `COPILOT_CLI_OK` (or very close equivalent) and exits successfully.

If the test fails:
- Confirm `copilot` is on `PATH`.
- Ensure you are authenticated in the Copilot CLI session.
- Retry without any permission flags; keep the test minimal and isolated.

## 🎭 Persona Categories

| Category | Personas | Use For |
|:---|:---|:---|
| Security | security-auditor | Red team, vulnerability scanning |
| Development | 14 personas | Backend, frontend, React, Python, Go, etc. |
| Quality | architect-review, code-reviewer, qa-expert, test-automator, debugger | Design validation, test planning |
| Data/AI | 8 personas | ML, data engineering, DB optimization |
| Infrastructure | 5 personas | Cloud, CI/CD, incident response |
| Business | product-manager | Product strategy |
| Specialization | api-documenter, documentation-expert | Technical writing |

All personas in: `plugins/personas/`

## πŸ”„ Recommended Audit Loop
1. **Red Team** (Security Auditor) β†’ find exploits
2. **Architect** β†’ validate design didn't add complexity
3. **QA Expert** β†’ find untested edge cases

Run architect **AFTER** red team to catch security-fix side effects.

Files in this skill

  • SKILL.md3.6 KB
  • evals/evals.json1.6 KB
  • references/acceptance-criteria.md866 B
  • references/fallback-tree.md1.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…