AGENT SKILL

phargus-diagnose

Investigate slow requests, event-loop stalls, GC pressure, and stream backpressure using Phargus data. Use for a runtime incident or alert that needs evidence-backed hypotheses and a next experiment.

License 许可
Apache-2.0
最近更新
2026-11-13
Stars
★ 0
Forks
0

01 前言 Front Matter

name
phargus-diagnose
license
Apache-2.0
description
Investigate slow requests, event-loop stalls, GC pressure, and stream backpressure using Phargus data. Use for a runtime incident or alert that needs evidence-backed hypotheses and a next experiment.
compatibility
Node.js >=22.18.0; Phargus NDJSON or a reachable Phargus SSE dashboard.

02 资源文件 12

03 SKILL.md 正文

Phargus Diagnose

Explain the observed incident and choose a measurement that can distinguish its causes. Read data semantics and diagnosis. Use tools to capture or summarize the available source.

  1. Establish the affected process, symptom, interval and workload. Resolve the absolute directory containing this SKILL.md before invoking its scripts/phargus.mjs.
  2. Capture bounded SSE or read the supplied NDJSON. Run summarize and check invalid records, gaps, loss, resets and truncation before drawing conclusions. Live capture stops at 10,000 events by default (raise --max-events or shorten --duration-ms for a high-rate service); summarize reads files without an event-count cap.
  3. Compare affected and normal periods. Correlate request duration with event loop, GC, memory and backpressure. Retrieve raw data if SSE lacks necessary details.
  4. Separate measured observations from hypotheses. Inspect plausible application code only when evidence points there; preserve alternatives and uncertainty.
  5. Propose the smallest next experiment. When a fix is part of the user's request, check its prediction against a comparable before/after measurement.

Return values with units and timestamps, source/quality limits, ranked hypotheses and the next reproducible measurement. No data means insufficient evidence and a capture recipe. Read compatibility before assuming an Phargus capability.

Example request: "Requests became slow this morning; investigate this Phargus recording."

04 同仓库更多 Skills

pharn-dev
pharn-dev/pharn-cli

broken

暂无简介

★ 0
pharn-dev
pharn-dev/pharn-cli

example

暂无简介

★ 0
pharn-dev
pharn-dev/pharn-cli

pharn-cli

Operate the PHARN CLI (@pharn-dev/pharn 0.10.0+, best on 0.16.0, with a fallback for 0.9.x) on a project that has PHARN installed. Use when the person asks whether PHARN is up to date, what an update would change, to update it, what is installed, or to add or remove a capability (griller or lens), or when pharn.config.json exists and they mention updating PHARN. When they ask to set up or uninstall PHARN, it tells them how to do it themselves. Read-only checks and a dry-run preview first; never overwrites their edits.

★ 0
pharn-dev
pharn-dev/pharn-cli

pharn-ci-install

Add the pharn-ci pull request check (the pharn-dev/pharn-ci GitHub Action) to a repository, writing pharn-ci 0.9.1 (Report v2, with the test-integrity check and dependency safety) and recognising an existing 0.1.x to 0.9.x setup and what upgrading it changes - lcov or Cobertura coverage output from the project's own test run, checked locally the way pharn-ci reads it, a .pharn/ci.yml with the threshold, and a workflow pinned to a full commit SHA with the test-integrity input. Asks before writing a workflow for a repository on a private registry, because dependency safety flags off-registry sources (D05). Use when the person asks to set up, add, install, update or wire in pharn-ci, a diff coverage gate or test integrity for pull requests, including on fork PRs or in an existing CI job. Never uses pull_request_target, never writes a tag pin, asks before installing anything, never creates or applies the accept label, never switches dependency safety off on its own, never commits. Not for explaining a pharn-ci result (pharn-ci-explain), covering reported lines (pharn-ci-cover) or the PHARN CLI (pharn-cli).

★ 0
pharn-dev
pharn-dev/pharn-cli

pharn-ci-explain

Explain a pharn-ci result (the pharn-dev/pharn-ci GitHub Action or the `pharn-ci check` CLI, 0.1.x to 0.9.x) - why a pull request's pharn-ci check failed or warned, what a message code such as COVERAGE_PATHS_UNMATCHED, TEST_INTEGRITY_TI03, POLICY_P13, AGENT_CONFIG_SECRET_S01, INJECTION_PI01 or DEPENDENCY_D05 means, what its diff coverage number covers, what a test-integrity, org policy, prompt-injection, dependency or stale-instruction finding asks a reviewer to look at, and what to change in this repository. Use when the person asks about a pharn-ci comment, verdict, report.json, diff coverage gate, test integrity, policy, secret, injection, dependency or flaky-test finding or agent setup message, or asks to loosen a policy, add or apply the pharn/accepted accept label or otherwise get past a block. Read-only unless asked; never applies the accept label, changes a policy, turns dependency safety off or quarantines a test to get a PR through, and never repeats a secret or the text of an injection finding. Not for adding pharn-ci (pharn-ci-install), writing a policy (pharn-ci-policy), acting on fix hints (pharn-ci-fix) or the PHARN CLI (`pharn`, pharn.config.json), which is the pharn-cli skill.

★ 0
pharn-dev
pharn-dev/pharn-cli

pharn-ci-cover

Write tests for the added lines that a pharn-ci report (the pharn-dev/pharn-ci GitHub Action or the `pharn-ci check` CLI, 0.1.x with Report v1 or 0.2.x to 0.9.x with Report v2) lists as uncovered, so a pull request's diff coverage meets its threshold. Use when pharn-ci fails with DIFF_COVERAGE_BELOW_THRESHOLD, or the person asks to cover the lines pharn-ci reports, raise diff coverage, get the pharn-ci coverage check passing, or exclude a file from, lower or switch off the pharn-ci coverage gate (it explains what that changes and asks first). Adds tests only - never lowers the threshold, excludes files, edits the pharn-ci config or workflow (including the test-integrity, dependencies and accept-label inputs), adds coverage-ignore comments, skips or focuses tests, weakens test scripts, adds a dependency or edits a lockfile to satisfy a test, adds a test to a quarantine list, imports a changed file into an unrelated test, or applies the accept label. From a 0.9.x report it acts only on fix hints of kind add-test. Not for adding pharn-ci to a repository (pharn-ci-install) or the PHARN CLI (pharn-cli).

★ 0