measure-before-you-fix
यह क्या करती है
यह स्किल आपके एजेंट को सिखाती है कि कुछ भी बदलने से पहले धीमे स्टेप को नापे। यह उन लोगों के लिए है जो ऑटोमेटेड डेटा जॉब चलाते हैं और ऐसे अलर्ट पाते हैं कि कुछ पुराना, टाइम-आउट या पीछे है।
कब इस्तेमाल करें
- ✓जब कोई अलर्ट बताए कि जॉब पुरानी, टाइम-आउट, धीमी या घंटों पीछे है।
- ✓जब कोई टाइमआउट बढ़ाना चाहे या अलर्ट के जवाब में पाइपलाइन दोबारा लिखना चाहे।
- ✓जब सिंक या शेड्यूल्ड जांच आपके सिस्टम में ताज़गी की समस्या बताए।
Skill का लिंक
https://github.com/garrytan/gbrain/blob/master/plugin-variants/gbrain-coding/skills/measure-before-you-fix/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“सिंक अलर्ट कहता है कि हम छह घंटे पीछे हैं। सेटिंग बदलने से पहले धीमे स्टेप का समय नापिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट शक वाले स्टेप को स्टॉपवॉच जैसी माप से एक बार नापता है। असली अवधि पता चलने के बाद ही सुधार का सुझाव देता है, जो अक्सर दिखाता है कि पहला अंदाज़ा गलत था।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Measure Before You Fix
Convention: see conventions/brain-first.md — before re-deriving a diagnosis,
searchthe brain for prior incidents of the same alert. A recurring alert usually has a recorded verdict already.
Route here on any alert whose claim is temporal — "X is stale", "step timed out", "pipeline wedged", "job is slow", "N hours behind". These alerts invite an immediate structural fix (raise the timeout, split the step, reorder the pipeline). Do the measurement first. It is almost always cheaper than the fix, and it frequently invalidates it. (Routing is a harness convention, not a mechanical guarantee — the contract below is the discipline that makes it stick.)
On gbrain surfaces this covers: gbrain doctor staleness checks (e.g. sync
freshness, cycle freshness), autopilot cycle alerts, the sync stall watchdog
(reason: 'stall_timeout'), and any cron monitor built on top of them.
The rule
One stopwatch measurement of the suspect step, before any code change.
If you cannot state the measured duration of the thing you claim is slow, you do not yet know the root cause, and any fix you write is a guess wearing a diff.
Contract
This skill guarantees:
- No structural fix (timeout raise, step split, pipeline reorder, wrapper rewrite) is proposed before a measured duration of the blamed step exists.
- The measurement targets the specific entity the alert named, not the
aggregate (
--allhides which member is slow). - The alert's threshold is compared against the authoritative one
(
gbrain doctor's warn/fail lines) before the system is declared unhealthy. - The verdict explicitly distinguishes "needs more time" from "is wedged" — they have opposite fixes.
- Read-only: this skill changes no timeouts, thresholds, or code. It produces a measurement verdict that sizes the fix; the fix itself is a separate, now-informed change.
Procedure
Read the alert's own numbers. They often contradict the theory already. (
Locks: nonemeans it isn't lock contention. Note it and drop that branch.)Time the suspect step directly. Isolate the smallest unit that the alert blames, and run it with a clock:
time gbrain sync --source source-a --no-embedRun it on the specific named entity, not the aggregate. A whole-brain run hides which member is slow;
--source source-aanswers the question. Cross-check state withgbrain sources status(per-source sync lag).Compare measured vs. budgeted. Grep every timeout in the wrapper, not just the default in the helper signature:
grep -n "timeoutMs\|timeout:" <the wrapper or cron script>A generous per-call override makes the helper's default irrelevant. Check the call site before blaming the default.
Check the alert threshold against the authoritative one. Before concluding the system is broken, confirm the alerter and the audit agree on what "bad" means.
gbrain doctor's sync-freshness check defaults to 24h warn / 72h fail (env-overridable viaGBRAIN_SYNC_FRESHNESS_WARN_HOURS/GBRAIN_SYNC_FRESHNESS_FAIL_HOURS); a cron monitor paging at 12h is speaking below the authoritative warn line. A monitor that acts early is correct; a monitor that speaks at its act-line is a false-positive generator.Only now design the fix — against the number you measured.
The threshold-mismatch failure mode
A cron monitor legitimately acts earlier than the doctor fails, to keep drift out of FAIL territory. That is good design. The bug is reusing the act-threshold as the alert-threshold: everything between "act" and "warn" becomes a recurring page about a healthy system.
Separate the two constants. Act at the aggressive line, speak at the authoritative one:
const ACT_HOURS = Number(env.MONITOR_ACT_HOURS || 12); // act early — fine
const ALERT_HOURS = Math.max(ACT_HOURS, DOCTOR_WARN_HOURS); // speak at the audit's line
Symptom to recognize instantly: a repeating alert whose numbers sit below the doctor's own warn line, while the underlying resource looks fine when queried directly.
Red flags that you are theorizing, not diagnosing
- You have a root cause but no measured duration.
- Your fix is a rewrite and you have not run the step once.
- You revise the theory twice without taking a new measurement between revisions.
- The alert says "no recovery in flig
अक्सर पूछे जाने वाले सवाल
क्या यह तुरंत मेरी टाइमआउट सेटिंग बदल देगी?
नहीं। यह पहले स्टेप को नापती है और असली अवधि मिलने तक कोई ढांचागत सुधार नहीं सुझाती।
क्या यह पिछली घटनाएँ देखती है?
हाँ। यह उसी अलर्ट पर पहले के नोट्स ब्रेन में खोजती है, क्योंकि बार-बार आने वाले अलर्ट की अक्सर दर्ज व्याख्या होती है।
क्या यह सिर्फ gbrain के लिए है?
यह gbrain अलर्ट जैसे doctor चेक और sync watchdog के लिए लिखी गई है।
जानकारी
लेखक का मूल विवरण
Before fixing a slow/stale/timeout alert, measure the step yourself. Kill the theory with a stopwatch, not a code change. Measure-first ops triage for temporal alerts (stale, timeout, freshness, wedged, N hours behind) from gbrain doctor, autopilot, sync, and cron monitors — runs BEFORE any timeout raise, threshold change, or pipeline rewrite.
repo: garrytan/gbrain
लोकप्रियता
- GitHub स्टार
- 31k
- रैंकिंग में स्थान
- #9263
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
gbrain
31kयह आपके एजेंट को लोगों, प्रोजेक्ट और फ़ैसलों के बारे में तथ्य खोजने के लिए साझा कंपनी ज्ञान ब्रेन में खोजने और उसमें स्थायी नोट सहेजने देती है।
brain-ingest-gate
31kयह आपके एजेंट को नई सामग्री जोड़ने से पहले मौजूदा ज्ञान ब्रेन से जाँचने देती है, ताकि डुप्लिकेट न बनें और नामित इकाइयाँ पहले सुलझें।
brain-link-discipline
31kयह सुनिश्चित करती है कि आपका एजेंट हर उस ब्रेन पेज का काम करने वाला लिंक उसी संदेश में दे, जिसकी वह रिपोर्ट करता है, ताकि आप उसे तुरंत खोल सकें।
brain-ops
31kयह आपके एजेंट को ज्ञान ब्रेन की मुख्य दिनचर्या देती है: पहले मौजूदा संदर्भ जाँचना, स्पष्ट नोट उनके स्रोत के साथ सहेजना, और संबंधित पेज जोड़ना।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।