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 skills add ag2ai/ag2-claude-plugins --skill connector-toolgit clone --depth 1 https://github.com/ag2ai/ag2-claude-pluginsWrote 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.
[](https://agentmods.dev/skills/ag2ai/ag2-claude-plugins/connector-tool)<a href="https://agentmods.dev/skills/ag2ai/ag2-claude-plugins/connector-tool"><img src="https://agentmods.dev/badge/skills/ag2ai/ag2-claude-plugins/connector-tool/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.
<a href="https://agentmods.dev/skills/ag2ai/ag2-claude-plugins/connector-tool"><img src="https://agentmods.dev/badge/skills/ag2ai/ag2-claude-plugins/connector-tool.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00032 | $0.01098 |
| Opus 5.5 | $0.00013 | $0.00439 |
| Sonnet 5.5 | $0.00006 | $0.00220 |
| Haiku 4.5 | $0.00003 | $0.00110 |
Grade A, and why
connector-tool scanned grade A with 0 findings 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 3mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are creating connector-integrated tool functions for AG2 agents that call external APIs.
Instructions
-
Ask the user for:
- Which service/API to integrate with
- What operations are needed (list, get, create, update, delete)
- Authentication method (API key, OAuth token, service account)
- Rate limiting concerns
-
Generate connector tools following this pattern:
Connector Tool Pattern
import json
import os
import httpx
from autogen.tools import tool
# --- Configuration ---
BASE_URL = "https://api.service.com/v1"
def _get_headers() -> dict:
"""Build auth headers from environment."""
token = os.environ.get("SERVICE_API_TOKEN")
if not token:
raise ValueError("connector_setup_required:service_name")
return {
"Authorization": f"Bearer {token}",
"Content-Type": "application/json",
}
def _make_request(method: str, path: str, **kwargs) -> dict:
"""Centralized HTTP request handler with error mapping."""
try:
headers = _get_headers()
except ValueError as e:
return {"success": False, "error": str(e)}
url = f"{BASE_URL}/{path.lstrip('/')}"
try:
response = httpx.request(method, url, headers=headers, timeout=30.0, **kwargs)
response.raise_for_status()
return {"success": True, "data": response.json()}
except httpx.HTTPStatusError as e:
status = e.response.status_code
if status == 401:
return {"success": False, "error": "connector_setup_required:service_name"}
elif status == 403:
return {"success": False, "error": f"Permission denied: {e.response.text}"}
elif status == 404:
return {"success": False, "error": f"Resource not found: {path}"}
elif status == 429:
return {"success": False, "error": "Rate limit exceeded. Try again in a few seconds."}
else:
return {"success": False, "error": f"API error {status}: {e.response.text}"}
except httpx.RequestError as e:
return {"success": False, "error": f"Connection error: {e}"}
# --- Tool Functions ---
@tool()
def list_items(limit: int = 20, offset: int = 0, filter_query: str = "") -> str:
"""List items from the service with optional filtering.
Args:
limit: Maximum items to return (default: 20, max: 100)
offset: Pagination offset (default: 0)
filter_query: Optional search/filter string
"""
params = {"limit": min(limit, 100), "offset": offset}
if filter_query:
params["q"] = filter_query
result = _make_request("GET", "/items", params=params)
return json.dumps(result)
@tool()
def get_item(item_id: str) -> str:
"""Get detailed information about a specific item.
Args:
item_id: The unique identifier of the item
"""
if not item_id.strip():
return json.dumps({"success": False, "error": "item_id is required"})
result = _make_request("GET", f"/items/{item_id}")
return json.dumps(result)
@tool()
def create_item(name: str, description: str = "", metadata_json: str = "{}") -> str:
"""Create a new item in the service.
Args:
name: Name for the new item (required)
description: Optional description
metadata_json: Optional JSON string with additional fields
"""
try:
metadata = json.loads(metadata_json) if metadata_json else {}
except json.JSONDecodeError:
return json.dumps({"success": False, "error": "metadata_json must be valid JSON"})
payload = {"name": name, "description": description, **metadata}
result = _make_request("POST", "/items", json=payload)
return json.dumps(result)
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.
- 3mo ago First seen · 138 lines · 32 tokens per session scan A 2e74525c266b
connector-tool is a skill published in the GitHub repository ag2ai/ag2-claude-plugins (6 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 32 tokens to every session and 1,098 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
connector-tool compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| connector-toolag2ai/ag2-claude-plugins | Skill | 6 | 7mo ago | Apache-2.0 | A | 32 | Claude Code |
| mem0-oss-to-platformmem0ai/mem0 | Skill | 70k | today | Apache-2.0 | A | 217 | Claude Code, Codex |
| tao-run-inference-serviceNVIDIA/skills | Skill | 4.3k | today | Apache-2.0 | A | 92 | Claude Code |
| azure-mgmt-botservice-dotnetmicrosoft/skills | Skill | 3.3k | today | MIT | A | 78 | Claude Code |
| fastapi-router-pymicrosoft/skills | Skill | 3.3k | today | MIT | A | 46 | Claude Code |
| dev-runtimelangwatch/langwatch | Skill | 5.1k | today | Apache-2.0 | A | 172 | Claude Code |
| api-designericrisco/rsc-harness | Skill | 707 | 2d ago | MIT | A | 105 | Claude Code, Codex |