Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/macromania/agentop/copilot-sdknpx skills add macromania/agentop --skill copilot-sdkgit clone --depth 1 https://github.com/macromania/agentopWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00064 | $0.04261 |
| Opus 5 | $0.00032 | $0.02131 |
| Sonnet 5 | $0.00013 | $0.00852 |
| Haiku 4.5 | $0.00006 | $0.00426 |
Grade A, and why
copilot-sdk scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
import { exec } from 'child_process'; How it starts
The opening of the file, as written. The whole thing — 730 lines — stays where its author put it; the contents beside it link to each section on GitHub.
GitHub Copilot SDK Integration
Integrate @github/copilot-sdk for AI-powered agent sessions with streaming responses and tool calling.
When to Use This Skill
- Setting up Copilot SDK in Electron main process
- Implementing streaming chat completions
- Defining tools for agent function calling
- Managing conversation context
- Handling tool execution results
- Building decision points with user approval
SDK Setup
Installation and Authentication
// src/main/copilot/client.ts
import { CopilotClient } from '@github/copilot-sdk';
let client: CopilotClient | null = null;
export async function initializeCopilotClient(): Promise<CopilotClient> {
if (client) return client;
// The SDK handles GitHub authentication automatically
// User must be authenticated with GitHub Copilot
client = new CopilotClient({
// Optional: Custom endpoint for GitHub Enterprise
// baseUrl: 'https://api.github.com',
});
return client;
}
export function getCopilotClient(): CopilotClient {
if (!client) {
throw new Error('Copilot client not initialized. Call initializeCopilotClient first.');
}
return client;
}
Tool Definitions
// src/main/copilot/tools.ts
import type { Tool, ToolResult } from '@github/copilot-sdk';
// Define tools the agent can use
export const agentTools: Tool[] = [
{
name: 'create_file',
description: 'Create a new file with the specified content',
parameters: {
type: 'object',
properties: {
path: {
type: 'string',
description: 'The file path relative to the project root',
},
content: {
type: 'string',
description: 'The content to write to the file',
},
},
required: ['path', 'content'],
},
},
{
name: 'edit_file',
description: 'Edit an existing file by replacing content',
parameters: {
type: 'object',
properties: {
path: {
type: 'string',
description: 'The file path relative to the project root',
},
search: {
type: 'string',
description: 'The exact text to find and replace',
},
replace: {
type: 'string',
description: 'The replacement text',
},
},
required: ['path', 'search', 'replace'],
},
},
{
name: 'run_command',
description: 'Execute a shell command in the project directory',
parameters: {
type: 'object',
properties: {
command: {
type: 'string',
description: 'The shell command to execute',
},
cwd: {
type: 'string',
description: 'Working directory (optional)',
},
},
required: ['command'],
},
},
{
name: 'read_file',
description: 'Read the contents of a file',
parameters: {
type: 'object',
properties: {
path: {
type: 'string',
description: 'The file path to read',
},
},
required: ['path'],
},
},
{
name: 'request_approval',
description: 'Request user approval before proceeding with a sensitive action',
parameters: {
type: 'object',
properties: {
action: {
type: 'string',
description: 'Description of the action requiring approval',
},
details: {
type: 'string',
description: 'Detailed explanation of what will happen',
},
risk_level: {
type: 'string',
enum: ['low', 'medium', 'high'],
description: 'Risk level of the action',
},
},
required: ['action', 'details'],
},
},
];
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 730 lines · 64 tokens per session scan A 4c5370ce7914
copilot-sdk is a skill published in the GitHub repository macromania/agentop (10 stars, last pushed 5mo ago), licensed MIT. It adds 64 tokens to every session and 4,261 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
aatmf-t10-confidentiality-breach
AATMF T10 — Integrity & Confidentiality Breach. System prompt extraction, training-data extraction, model-weight leakage, private-key recovery.
publish-registry
Publish @agentos-software/ registry packages from AgentOS. Use whenever the user asks to publish or release registry software/agent packages.
mochi-remind
Handle due reminders — notify the user with natural language and mark them done.
memory
Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.
lazarus-group
Adversary-emulation profile for Lazarus Group (G0032, aka Hidden Cobra / Diamond Sleet / Labyrinth Chollima), a North Korean RGB-linked actor conducting espionage, destructive, and financially motivated operations.
sidewinder-rattlesnake
Adversary-emulation profile for SideWinder (G0121 / Rattlesnake / T-APT-04 / Razor Tiger), India's suspected state-sponsored cyber-espionage actor.