agentleFS
aldisfaldisf/sg-stay-where/skills/schedule-polls/SKILL.md

schedule-polls

Skill2 starsChanged 14 days agoMITView on GitHub

Set up, check, change or remove the scheduled job that polls sg-stay-where every 2 hours without a chat session open. Use after the first poll when the user wants automatic polls, when polls look stalled, or to switch the agent that polls.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask before creating, changing or removing a job, and tell the user what it does: it starts their coding agent by itself, two runs per poll …

    line 12
  2. Very specific:

    Stop any npm start first, then systemctl --user enable --now sg-stay-where.service.

    line 37

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Schedule polls

A poll started in a chat stops when the chat ends. The scheduled job runs npm run poll (node src/cli.js poll), which starts a fresh agent each time. It survives closed laptops, reboots and forgotten sessions, and runs a missed poll once on wake.

Ask before creating, changing or removing a job, and tell the user what it does: it starts their coding agent by itself, two runs per poll (listing sites and Google Maps), up to 12 polls a day, and those runs use their agent plan's usage (README "What scheduled polls cost"). Run one poll by hand first (npm run poll) and check its log in data/poll-logs/.

  1. Pick the agent: SSW_AGENT=claude (default) or codex. Only Claude Code's poll has its shell limited to the tracker's own CLI (docs/polling.md, "What stops a poll from sending").
  2. macOS: SSW_AGENT=<agent> scripts/install-macos.sh poll (both also runs the server). Check it with launchctl print gui/$(id -u)/sg-stay-where.poll | grep -E 'state|last exit'.
  3. Linux: first run the server as a service too; one started in a chat stops with the chat, and every poll after that finds no tracker. ~/.config/systemd/user/sg-stay-where.service:
    [Unit]
    Description=sg-stay-where server
    [Service]
    WorkingDirectory=<repo>
    ExecStart=/usr/bin/env node --no-warnings=ExperimentalWarning <repo>/src/cli.js serve
    Restart=on-failure
    [Install]
    WantedBy=default.target
    Stop any npm start first, then systemctl --user enable --now sg-stay-where.service. Then write ~/.config/systemd/user/sg-stay-where-poll.service:
    [Unit]
    Description=sg-stay-where poll
    [Service]
    Type=oneshot
    WorkingDirectory=<repo>
    Environment=SSW_AGENT=claude
    ExecStart=/usr/bin/env node --no-warnings=ExperimentalWarning <repo>/src/cli.js poll
    and ~/.config/systemd/user/sg-stay-where-poll.timer:
    [Unit]
    Description=sg-stay-where poll every 2 hours
    [Timer]
    OnCalendar=0/2:00
    Persistent=true
    [Install]
    WantedBy=timers.target
    Then systemctl --user daemon-reload && systemctl --user enable --now sg-stay-where-poll.timer, and check systemctl --user list-timers. It runs in the user's desktop session, where Chrome is.
  4. Windows (PowerShell): $env:SSW_AGENT = "<agent>", then powershell -ExecutionPolicy Bypass -File scripts\install-windows.ps1 poll (both also runs the server, at sign-in, restarted if it stops). Check it with Get-ScheduledTaskInfo sg-stay-where-poll (LastRunTime, LastTaskResult). The tasks keep the agent and the Node and agent folders found at install time; re-run the installer after changing either. Tasks run only while the user is signed in, where Chrome is.
  5. Check it in the app. The header shows "Polled 2h ago". An amber "Polls stalled" means a job exists but nothing ran for 4 hours: look at the newest log in data/poll-logs/, and check the computer was on and Chrome open.
  6. Change the agent: re-run step 2 or 4, or edit the Linux service and restart the timer.
  7. Remove: macOS launchctl bootout gui/$(id -u)/sg-stay-where.poll and rm ~/Library/LaunchAgents/sg-stay-where.poll.plist; Linux systemctl --user disable --now sg-stay-where-poll.timer and delete the poll unit files (sg-stay-where.service is the server; remove it only when uninstalling); Windows Unregister-ScheduledTask sg-stay-where-poll -Confirm:$false.

Polls on demand only: no job. The header's Poll now button starts one poll in the background; the user doesn't need a chat open.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.