Pollers logo

Pollers

Community
tkellogg
pollers

Create and manage pollers — lightweight monitoring scripts that check external services on a schedule. Use when the user wants to monitor something (Bluesky, GitHub, RSS, APIs), create a new poller, debug why a poller isn't firing, or manage pollers.json files in skills.

Overview

Publishertkellogg
Repositoryopen-strix
Skill namepollers
Stars
95
Forks
21
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by tkellogg on GitHub. Read the source before you install it.

Installation

Install the Pollers AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/tkellogg/open-strix/tree/main/open_strix/builtin_skills/pollers
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/tkellogg/open-strix.git /tmp/open-strix
mkdir -p .claude/skills
cp -r /tmp/open-strix/open_strix/builtin_skills/pollers .claude/skills/pollers
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pollers in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Pollers on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Pollers is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Pollers — Event-Driven Monitoring

Pollers are lightweight scripts that check external services on a schedule and report back when something needs attention. They live inside skills and are discovered automatically by the scheduler.

How It Works

  1. A skill includes a pollers.json file alongside its SKILL.md
  2. The scheduler discovers all pollers.json files at startup and when reload_pollers is called
  3. On each cron tick, the scheduler runs the poller command as a subprocess
  4. Each line of stdout is parsed as JSON and delivered to the agent as an event
  5. If there's nothing to report, the poller outputs nothing — silence is the filter

Creating a Poller

1. Write the poller script

The script runs in the skill directory. It receives these environment variables automatically:

VariableDescription
STATE_DIRThe skill directory (writable, for cursors/state)
POLLER_NAMEThe poller's name from pollers.json

Plus any custom env vars from the env field, plus the agent's existing environment.

Output contract:

  • stdout: JSONL (one JSON object per line). Each line must have poller (string) and prompt (string) fields.
  • stderr: Free-form logging. Not forwarded to the agent.
  • Exit 0: Success. Non-zero: Error, this cycle is skipped.

Example poller script:

python
#!/usr/bin/env python3
"""Check for new items since last poll."""
import json, os, sys
from pathlib import Path

STATE_DIR = Path(os.environ.get("STATE_DIR", "."))
CURSOR_FILE = STATE_DIR / "cursor.json"

def load_cursor():
    if CURSOR_FILE.exists():
        return json.loads(CURSOR_FILE.read_text())
    return {}

def save_cursor(cursor):
    CURSOR_FILE.write_text(json.dumps(cursor, indent=2))

def main():
    cursor = load_cursor()
    # ... check your service, compare against cursor ...

    new_items = []  # your logic here

    for item in new_items:
        event = {
            "poller": os.environ.get("POLLER_NAME", "my-poller"),
            "prompt": f"New item: {item['title']}"
        }
        print(json.dumps(event))

    # Update cursor so next run skips these items
    save_cursor(cursor)

if __name__ == "__main__":
    main()

2. Create pollers.json in the skill directory

json
{
  "pollers": [
    {
      "name": "my-service-check",
      "command": "python poller.py",
      "cron": "*/5 * * * *",
      "env": {
        "SERVICE_URL": "https://example.com/api"
      }
    }
  ]
}

Top-level must be a dict with a pollers key (not a bare array).

FieldRequiredDescription
nameyesUnique identifier. Used in logs and event routing.
commandyesShell command, relative to the skill directory.
cronyesCron expression (5-field, UTC).
envnoAdditional environment variables for the script.

3. Register the pollers

After creating or updating pollers.json, call the reload_pollers tool. This re-scans all skill directories and registers any new pollers with the scheduler.

reload_pollers()
# → "Reloaded. 2 poller(s) registered: bluesky-mentions, github-issues"

Pollers are also loaded automatically at startup.

File Layout

skills/my-monitor/
├── SKILL.md
├── pollers.json        ← declares pollers
├── poller.py           ← the script
├── cursor.json         ← poller state (managed by script)
└── events.jsonl        ← optional local event log

Design Patterns

See design-patterns.md for detailed guidance on:

  • State management — cursor pattern, timestamp vs URI cursors, external service state, recovery on first run
  • Filtering — selecting actionable notification types, avoiding shared is_read traps
  • Prompt quality — including URIs/CIDs so the agent can act, not just observe
  • Error handling — fail silently (exit non-zero), never emit on error
  • Anti-patterns — common mistakes and how to avoid them

Security & Privacy

See security.md for guidance on:

  • Trust tiers — the follow-gate pattern for sorting trusted vs unknown sources
  • Operator in the loop — keeping the human informed without locking everything down
  • Credential handling — env vars, per-agent accounts, what not to log
  • Prompt injection — honest reporting with context, not sanitization

Key Constraints

  • 60-second timeout. If a poller doesn't finish in 60s, it's killed and the cycle is skipped.
  • Silence means nothing to report. Only output lines when there's something actionable.
  • One JSON object per line. Each line must parse independently.
  • poller and prompt are required fields. Lines missing either are dropped.
  • Pollers are dumb. No LLM calls. Check a service, output what changed, exit. Keep them fast and pure.
  • State management is the poller's job. Use STATE_DIR to store cursors, history, or any persistent state. The scheduler doesn't track state for you.

Debugging

If a poller isn't working:

  1. Check it was discovered: reload_pollers reports the count and names
  2. Run it manually: cd skills/my-monitor && STATE_DIR=. POLLER_NAME=test python poller.py
  3. Check stderr: Poller stderr is logged as poller_stderr events
  4. Check exit code: Non-zero exits are logged as poller_nonzero_exit
  5. Check JSON format: Each stdout line must be valid JSON with poller and prompt keys

Available Tool

ToolDescription
reload_pollersRe-scan all skills/*/pollers.json and register pollers. Call after installing/updating skills.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Pollers AI skill do?

Create and manage pollers — lightweight monitoring scripts that check external services on a schedule. Use when the user wants to monitor something (Bluesky, GitHub, RSS, APIs), create a new poller, debug why a poller isn't firing, or manage pollers.json files in skills.

Why use Pollers on TypingMind?

Because you install it once and use it with any model. Pollers is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Pollers in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/tkellogg/open-strix/tree/main/open_strix/builtin_skills/pollers. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Pollers?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Pollers?

As many as you like. As long as a model supports skills, you can use Pollers with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Pollers AI skill free?

Yes. It is published on GitHub by tkellogg under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇