agentop: Skill for Claude Code

.github/skills/copilot-sdk/SKILL.md

copilot-sdk is a skill for Claude Code, Codex from macromania/agentop. It costs 64 tokens per session (4,261 once invoked), scanned A, original, MIT.

A set of instructions for integrating GitHub Copilot into an application through its software development kit, or SDK. It covers AI chat sessions, streamed responses, tool calls, conversation state, and approval steps.

In plain words
What is it for?
Use it when adding Copilot chat, streaming output, function-calling tools, conversation management, or user approval to an application.
Why use it?
It provides patterns for connecting an app to Copilot and handling responses and actions without designing the integration from scratch.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

This is macromania/agentop's own configuration. It tells Claude Code and Codex how to work on agentop itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agentop configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { db } from '../database';.

Reuse

Borrowing it

Nothing to install: this file belongs to macromania/agentop. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/macromania/agentop/main/.github/skills/copilot-sdk/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/macromania/agentop

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for copilot-sdk

README.md
[![agentmods](https://agentmods.dev/badge/skills/macromania/agentop/copilot-sdk/github.svg)](https://agentmods.dev/skills/macromania/agentop/copilot-sdk)
Your own site
<a href="https://agentmods.dev/skills/macromania/agentop/copilot-sdk"><img src="https://agentmods.dev/badge/skills/macromania/agentop/copilot-sdk/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for copilot-sdk

Your own site · 80×15
<a href="https://agentmods.dev/skills/macromania/agentop/copilot-sdk"><img src="https://agentmods.dev/badge/skills/macromania/agentop/copilot-sdk.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,261 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00064 $0.04261
Opus 5.5 $0.00026 $0.01704
Sonnet 5.5 $0.00013 $0.00852
Haiku 4.5 $0.00006 $0.00426

Measured 2mo ago against content hash 4c5370ce7914, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 2mo 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';
.github/skills/copilot-sdk/SKILL.md · 730 lines

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'],
    },
  },
];

Read the full file on GitHub · 730 lines

Changes

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.

  1. 2mo ago First seen · 730 lines · 64 tokens per session scan A 4c5370ce7914

Subscribe to this mod's changes

copilot-sdk is a skill published in the GitHub repository macromania/agentop (11 stars, last pushed 7mo ago), licensed MIT. It adds 64 tokens to every session and 4,261 once invoked, about $0.0003 per session on Opus 5.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.

Related

copilot-sdk compared with skills from other repositories

copilot-sdk next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
copilot-sdkmacromania/agentopSkill117mo agoMITA64Claude Code, Codex
eval-dataset-designbojieli/ai-agent-bookSkill57k29d agoApache-2.0A138Claude Code, Codex
aatmf-t10-confidentiality-breachPurpleAILAB/DecepticonSkill6.5k8d agoApache-2.0A39Claude Code, Codex
mochi-remindkirodotdev/KiroCrewSkill4.8kyesterdayApache-2.0A20Claude Code, Codex
ensembl-databasesynthetic-sciences/openscienceSkill4.3k2d agoApache-2.0A45Claude Code, Codex
ai-musicZJU-REAL/EaselSkill4.5k4d agoApache-2.0A161Claude Code, Codex
skill-news-intelligenceZJU-REAL/EaselSkill4.5k4d agoApache-2.0A104Claude Code, Codex