Monitoring
БесплатноБез исполняемых скриптовНе проверенWatch a live page for real change (price, score, order book, listing count, stock, queue depth) with the webrain MCP tools. Gives the self-contained eval tick…
от prokopis399 установок в других каталогахОб этом скилле
/monitoring
webrain has no scheduler and keeps no state between calls. Monitoring here is
an agent loop, and saying anything else is a lie the runtime cannot back. There is
no monitor tool, no schedule op, no history store — the ADR's HTTP-cache
paragraph ("scheduled recurring monitoring does not pay for a full download") describes
a caller that does not exist in this build. Do not promise one.
Everything below was measured on live sites (CoinDesk, CoinMarketCap) while building this skill, not inferred.
The working recipe
- One source.
webrain_evalwith a JS loop of ≤25 s returning every sample and the distinct count — not a single read. One call, one series. - The agent repeats that call on its own interval and keeps the series, diffing consecutive samples.
- Longer than 30 s → external cron /
systemdtimer drivingwebrain mcpor the CLI. webrain still remembers nothing between runs; the scheduler owns the history. - Re-
navigate(or assertlocation.href) at the start of every tick. That is the only defence against the target-binding gap below.
Step 1 — the tick
One webrain_eval whose JS samples internally and returns all samples plus the
distinct count. A single read cannot distinguish "unchanged" from "never read".
(async () => {
const sel = '<selector you verified with webrain_eval first>';
const stop = Date.now() + 22000; // stay under the 30 s CDP cap
const seen = [], vals = [];
while (Date.now() < stop) {
const t = (document.querySelector(sel) || {}).textContent || '';
const v = t.trim();
if (v && v !== seen[seen.length - 1]) seen.push(v);
vals.push(v);
await new Promise(r => setTimeout(r, 2000));
}
return JSON.stringify({
url: location.href,
samples: vals.length,
distinct: new Set(seen).size,
series: seen.slice(0, 50),
last: seen[seen.length - 1] || null
});
})()
Read distinct first. distinct === 0 means the selector matched nothing (wrong
element or unmounted page) — not "no change". distinct === 1 over 20 s on a
live price means you sampled a stale node or a hidden duplicate; check the field
against webrain_observe(what="clean") before believing it.
Prices are never read from bare text nodes. Google renders date-grids of prices that pollute raw-text scrapes; read the result card / row container instead. The same rule applies to any grid page.
Step 2 — repeat and diff
The agent re-issues step 1 each interval (webrain_eval again — no new browser, no
new tab, same page). Keep the series in your own reply or in a file; webrain will not.
Threshold on a noise floor, measured, not assumed:
| Signal | Measured | Meaning |
|---|---|---|
| BTC/USD on one source, 20 s | 77,021.60 → 77,022.49 → 77,026.68 |
cents-to-dollar drift is noise |
| BTC/USD, CoinDesk vs CoinMarketCap, same minute | 77,015.14 vs 77,021.60 (~$6) |
two sources disagree by more than one tick |
| Same page, next tick | 77,003.31 (down $20 from the run above) |
the value genuinely moves |
So a tolerance below ~0.1 % will fire on noise, and comparing across two sources will report a "change" that is just the sources disagreeing. Pick one source, one selector, one tolerance, and write the tolerance down before you start.
Step 3 — interval > 30 s
*/5 * * * * cd /path && webrain eval --url https://example.com/x --js-file tick.js >> series.jsonl
or a systemd timer calling the same CLI. Append one JSON line per run; that file is
the history webrain does not keep. For an MCP-only host, call the MCP server from the
scheduler — same tools, same absence of memory.
Step 4 — re-pin the target every tick
Measured: right after webrain_navigate to CoinMarketCap, a follow-up webrain_eval
executed against the arXiv tab that was still open. The reply looked like a
monitoring result and was a different page's DOM. Nothing in the tool surface tells you
which target answered.
Defences, in order:
- Assert the page inside the same eval:
if (!location.href.includes('coinmarketcap')) return JSON.stringify({error:'wrong tab', url: location.href}). webrain_observe(what="state")and compareurlbefore trusting the series.webrain_navigateat the top of the tick rather than relying on the tab still being there.
Treat a series whose url you did not verify as no data at all.
Known gaps — do not design around them silently
| Gap | Evidence | Workaround |
|---|---|---|
webrain_watch is video-only (url = video or local path) |
tool schema; no generic page watch | poll with webrain_eval (step 1) |
webrain_eval has a ~30 s CDP timeout |
a loop over 30 s returns an error, not partial data | cap at 25 s, return early, repeat |
| Eval may answer on the wrong target | arXiv tab answered after navigating to CMC | assert location.href in the JS (step 4) |
webrain_wait has no change predicate |
only ms / `selec |
Установить Monitoring в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadWriteFAQ
Что делает скилл Monitoring?
Watch a live page for real change (price, score, order book, listing count, stock, queue depth) with the webrain MCP tools. Gives the self-contained eval tick (one JS pass, ≤25 s, samples + distinct count), the agent-driven repeat-and-diff loop, external cron/systemd for anything slower, re-pinning the target every tick, and the honest limits — no scheduler, no stored history, no change predicate in wait yet. Use when asked to monitor, watch, poll, track changes, follow a live number, or "tell me when X changes". For one-shot extraction use `web-research`; for feeds use `workflows/feed-and-news.md`.
Как установить скилл Monitoring?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Monitoring запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic