Skip to content
Back to skills

Transport Split

ASecurity

Here's the proposed split, as a preview only — nothing has been changed. **File tree** ```diff src/ ├── commands/ │ └── send.ts -└── transport.ts +└── transport/ + ├── client.ts # request client: auth, post, get + └── event-stream.ts # SSE parsing, room to grow ``` **client.ts** — keeps everything unrelated to streaming: ```ts fragment export function setToken(value: string): void function headers(): Record<string, string> // stays private export async function post<T>(p...

  • 17 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 25, 2026
developmentgo

Works with

  • cli

Security analysis

A100/100

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

Scanned September 25, 2026

npx -y skills add bendrucker/claude --skill transport-split --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Transport Split?

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

Security grade badge for Transport Split
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bendrucker-transport-split/badge)](https://www.skillsdirectory.com/skills/bendrucker-transport-split)

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
Here's the proposed split, as a preview only — nothing has been changed.

**File tree**

```diff
 src/
 ├── commands/
 │   └── send.ts
-└── transport.ts
+└── transport/
+    ├── client.ts      # request client: auth, post, get
+    └── event-stream.ts # SSE parsing, room to grow
```

**client.ts** — keeps everything unrelated to streaming:

```ts fragment
export function setToken(value: string): void
function headers(): Record<string, string>          // stays private
export async function post<T>(path: string, body: unknown): Promise<T>
export async function get<T>(path: string): Promise<T>
```

`headers()` needs to be shared with the stream module (it sets `accept: text/event-stream` too), so it either gets exported from `client.ts` or moved to a small shared spot. Exporting it from `client.ts` is the smaller move:

```diff
- function headers(): Record<string, string> {
+ export function headers(): Record<string, string> {
```

**event-stream.ts** — owns SSE framing, with room for the parsing logic to grow beyond one generator:

```ts fragment
import { headers } from "./client"

export async function* stream(path: string): AsyncGenerator<string>

// natural next step as parsing grows:
function parseEvent(raw: string): { event?: string; data: string }
```

**Consumer update** — the only caller today:

```diff
- import { post, stream } from "../transport";
+ import { post } from "../transport/client";
+ import { stream } from "../transport/event-stream";
```

If you'd rather not touch the import site at all, `src/transport.ts` could stay as a barrel (`export * from "./transport/client"; export * from "./transport/event-stream";`) — but since there's only one consumer, the direct-import version above is less indirection.

Want me to go ahead with this (barrel or no barrel), or adjust the split first?

Files in this skill

  • sonnet-plain.md2.5 KB
  • sonnet-skill.md1.8 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…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.