Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Linkly

ASecurity

`iii-stream` is for **real-time data transmission**: pushing data to a client the moment it changes, like a live feed of clicks for a dashboard. A stream is bidirectional (subscribers can send messages back as well as receive them), but here you only need to broadcast clicks outward. You'll move the live-broadcast concern into its own `click-streamer` worker so the `link` worker stays focused on links.

18,691 stars
0 votes
0 copies
0 views
Added 9/20/2026
developmenttypescriptbashsqldatabaseperformance

Works with

cli

Security Analysis

A96/100
mediumInstalls packages at runtime which could introduce malicious dependencies

Scanned 9/20/2026

Install to Claude Code

$npx -y skills add iii-hq/iii --skill linkly --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Linkly?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Linkly
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/iii-hq-linkly-04340c4a/badge)](https://www.skillsdirectory.com/skills/iii-hq-linkly-04340c4a)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
channels.mdx
<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/tutorials/linkly/streaming.mdx. -->

# Ch. 5: Stream live clicks


`iii-stream` is for **real-time data transmission**: pushing data to a client the moment it changes,
like a live feed of clicks for a dashboard. A stream is bidirectional (subscribers can send messages
back as well as receive them), but here you only need to broadcast clicks outward. You'll move the
live-broadcast concern into its own `click-streamer` worker so the `link` worker stays focused on
links.

## Add the workers

`iii-stream` is how we will send clicks to clients in Chapter 7. We'll make a new `click-streamer`
worker to manage the streaming, so create it the same way you created `link` in Chapter 1 and
`analytics` in Chapter 4. `iii-stream` must start with the engine, so declare it in the Compose
engine configuration:

```yaml worker-compose.yaml
engine:
  workers:
    iii-stream: {}
```

```bash
mkdir -p click-streamer/src
```

Create the worker manifest and package metadata:

```yaml click-streamer/iii.worker.yaml
name: click-streamer
scripts:
  start: pnpm start
```

```json click-streamer/package.json
{
  "name": "click-streamer",
  "version": "0.1.0",
  "private": true,
  "type": "module",
  "scripts": {
    "start": "tsx watch src/index.ts"
  },
  "dependencies": {
    "iii-sdk": "0.21.4",
    "@iii-dev/helpers": "0.21.4",
    "tsx": "^4.22.3"
  }
}
```

```bash
cd click-streamer && pnpm install && cd ..
```

## Broadcast clicks in real time

Have `link` announce each click with a `pubsub` event. Then, have `click-streamer` push the event
onto the live feed.

### Add a `link.clicked` event to the `link` worker

First, publish a `link.clicked` event from `link::record_click`:

```typescript link/src/index.ts {12-16}
worker.registerFunction(
  "link::record_click",
  async (payload: { code: string; clicked_at: string }) => {
    await worker.trigger({
      function_id: "database::execute",
      payload: {
        db: DB,
        sql: "INSERT INTO clicks (code, clicked_at) VALUES (?, ?)",
        params: [payload.code, payload.clicked_at],
      },
    });
    worker.trigger({
      function_id: "publish",
      payload: { topic: "link.clicked", data: payload },
      action: TriggerAction.Void(),
    });
    return { recorded: true };
  },
);
```

<Info>
  In the new code above we didn't use `await` and set the `action` to `TriggerAction.Void()`. This
  causes the function to return immediately before it completes. This is a simple performance
  enhancement with things like pubsub where we don't need guaranteed execution.
</Info>

### Setup the `click-streamer` worker

Now write the `click-streamer` worker. It subscribes to `link.clicked` and broadcasts each click to
a `clicks` stream with `stream::set`. A `stream::set` both stores the item and pushes it to every
WebSocket subscribed to that stream and group. Create `click-streamer/src/index.ts`:

```typescript click-streamer/src/index.ts
import { registerWorker } from "iii-sdk";
import { Logger } from "@iii-dev/helpers/observability";

const worker = registerWorker(process.env.III_URL ?? "ws://localhost:49134", {
  workerName: "click-streamer",
});
const logger = new Logger();

worker.registerFunction(
  "click-streamer::broadcast",
  async (data: { code: string; clicked_at: string }) => {
    await worker.trigger({
      function_id: "stream::set",
      payload: {
        stream_name: "clicks",
        group_id: "all",
        item_id: `${data.code}-${data.clicked_at}`,
        data,
      },
    });
    return { streamed: true };
  },
);

worker.registerTrigger({
  type: "subscribe",
  function_id: "click-streamer::broadcast",
  config: { topic: "link.clicked" },
});

logger.info("click-streamer ready");
```

Register it with your project:

```bash
iii trigger -n linkly compose::add worker=./click-streamer
```

The browser you build in Chapter 7 subscribes to `clicks`/`all` and counts those broadcasts live.

## See it work

With the engine running, create and follow a link a few times:

```bash
curl -s -X POST http://127.0.0.1:3111/links \
  -H 'Content-Type: application/json' -d '{"url":"https://iii.dev","code":"stream-me"}'
for n in $(seq 1 3); do curl -s -o /dev/null http://127.0.0.1:3111/s/stream-me; done
```

Then read the live `clicks` stream:

```bash
iii trigger stream::list stream_name=clicks group_id=all
```

Each redirect lands in the stream as the `click-streamer` worker broadcasts it.

## Conclusion

Linkly now streams every click to subscribers in real time through a dedicated `click-streamer`
worker. Next, in [Ch. 6: Move bulk data with channels](/tutorials/linkly/channels), you bulk-load
links from a CSV in a single streamed upload.

Attribution

iii-hqiii-hq
View sourceMore from iii-hq →
SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

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 (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

281612 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2132 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

9881 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →