extension-authoring

extension-authoring is a skill for Claude Code, Codex from HaseebKhalid1507/SynapsCLI. It costs 34 tokens per session (1,609 once invoked), scanned A, original, Apache-2.0.

A step-by-step guide for building a SynapsCLI extension, a separate program that communicates with the SynapsCLI command-line tool.

In plain words
What is it for?
It helps create extensions with tools that the model can call and hooks that react to events such as a tool call.
Why use it?
It explains the required manifest, communication format, permissions, installation, and testing so an extension can be connected correctly.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/haseebkhalid1507/synapscli/extension-authoring
Any agent
npx skills add HaseebKhalid1507/SynapsCLI --skill extension-authoring
Clone the repo
git clone --depth 1 https://github.com/HaseebKhalid1507/SynapsCLI

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 extension-authoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/haseebkhalid1507/synapscli/extension-authoring.svg)](https://agentmods.dev/skills/haseebkhalid1507/synapscli/extension-authoring)
Your own site
<a href="https://agentmods.dev/skills/haseebkhalid1507/synapscli/extension-authoring"><img src="https://agentmods.dev/badge/skills/haseebkhalid1507/synapscli/extension-authoring.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,609 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00034 $0.01609
Opus 5 $0.00017 $0.00805
Sonnet 5 $0.00007 $0.00322
Haiku 4.5 $0.00003 $0.00161

Measured 4d ago against content hash 61f39a30e4ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

extension-authoring 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 4d 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.

proc = subprocess.Popen(["python3", "main.py"],
.synaps-cli/skills/extension-authoring/SKILL.md · 240 lines

How it starts

The opening of the file, as written. The whole thing — 240 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Build a SynapsCLI Extension

Source of truth: {baseDir}/../../../docs/extensions/tutorial.md Read that file for the complete worked example. This skill is a structured summary + checklist you can keep in context while authoring.


What you are building

A separate process SynapsCLI spawns and talks to over stdin/stdout using JSON-RPC 2.0 with Content-Length framing. The runtime calls methods on you; you only respond. Any language works — Python 3 (no deps) is the tutorial language.

Two capabilities:

  • Tool — callable by the model (tools.register permission required).
  • Hook — reacts to lifecycle events, optionally blocks/modifies them (hook.* permission required per hook type).

Step 1 — Manifest (plugin.json)

Create .synaps-plugin/plugin.json in your extension root:

{
  "name": "hello-ext",
  "version": "0.1.0",
  "description": "Hello-world extension",
  "extension": {
    "entry_point": "python3 main.py",
    "extension_protocol_version": 1,
    "permissions": [
      "tools.register",
      "hooks.before_tool_call"
    ]
  }
}

Key fields:

  • entry_point — shell command to start your process (resolved from plugin root).
  • extension_protocol_version — must be 1.
  • permissions — declare every capability you use; undeclared calls are rejected.

Step 2 — Framing helpers

Every message is a Content-Length: N\r\n\r\n header followed by N bytes of JSON. Write helpers once:

import sys, json

def send(obj):
    body = json.dumps(obj).encode()
    sys.stdout.buffer.write(b"Content-Length: " + str(len(body)).encode() + b"\r\n\r\n" + body)
    sys.stdout.buffer.flush()

def recv():
    header = b""
    while not header.endswith(b"\r\n\r\n"):
        header += sys.stdin.buffer.read(1)
    n = int(header.split(b"Content-Length:")[1].strip().split()[0])
    return json.loads(sys.stdin.buffer.read(n))

Step 3 — Handshake (initialize)

The runtime sends initialize first. You must respond with your capabilities:

Read the full file on GitHub · 240 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. 4d ago First seen · 240 lines · 34 tokens per session scan A 61f39a30e4ed

Subscribe to this mod's changes

extension-authoring is a skill published in the GitHub repository HaseebKhalid1507/SynapsCLI (40 stars, last pushed today), licensed Apache-2.0. It adds 34 tokens to every session and 1,609 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

hive.browser-automation

Required before any hive-browser CLI command. The browser is driven from the terminal by running hive-browser ... --json via terminalexec — not via MCP tools. Teaches the browser lifecycle rules (the bridge attaches to the USER'S running Chrome — never kill or launch browser processes; timeouts are transport issues…

aden-hive/hive · 142 tokens

hive.linkedin-automation

Read before automating LinkedIn with browser tools. LinkedIn combines shadow DOM (#interop-outlet), strict Trusted Types CSP that silently drops innerHTML, Lexical composer, native beforeunload dialogs that hang the bridge, and aggressive spam filters — each has bitten us at least once. Verified flows for profile…

aden-hive/hive · 99 tokens

hive.worker-delegation

Concrete patterns for breaking colony work into parallel worker jobs via runplaybook — when fan-out helps, how to model the goal as a tracker table, write the worker skill, author the playbook, pilot, and let convergence retry/resume the gap.

aden-hive/hive · 58 tokens

hive.x-automation

Read before automating X / Twitter with browser tools. Verified flows for post, reply, delete, search-and-engage, plus the Draft.js compose quirks that silently disable the send button. Includes the daily-reply and job-market-reply playbooks. Requires hive.browser-automation for the underlying screenshot + coordinate…

aden-hive/hive · 81 tokens

test-reporting

Run the Level 2 dummy agent integration test suite and produce a detailed HTML report with per-test input → outcome analysis.

aden-hive/hive · 0 tokens

hive.slack-notifications-setup

Set up a Slack notification channel (Sentinel) for a colony by driving the browser — reuse or create the "Hive Sentinel" Slack app from a JSON manifest, install it, capture the bot + app tokens, create/select the channel via the Slack API, and turn Sentinel on so the colony can ping the user on Slack and accept…

aden-hive/hive · 136 tokens