loopx-performance-diagnosis
Skill này làm gì
Skill này giúp tìm nguyên nhân khiến chương trình chạy chậm hoặc nặng bất thường trong một tiến trình mà bạn sở hữu. Nó dành cho nhà phát triển thấy một chậm chạp rõ ràng và muốn có bằng chứng trước khi sửa code.
Khi nào nên dùng
- ✓Khi một lệnh, chương trình hoặc tiến trình rõ ràng chậm hơn hoặc nặng hơn mức đáng lẽ.
- ✓Khi bạn cần đo CPU, bộ nhớ hoặc vào ra file của một chương trình bạn sở hữu.
- ✓Khi một chậm chạp xuất hiện sau một thay đổi và bạn cần bằng chứng profiling trước khi sửa.
Liên kết skill
https://github.com/loopx-project/loopx/blob/main/skills/loopx-performance-diagnosis/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Script Python của tôi mất 30 giây để khởi động, giúp tôi tìm vì sao.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill hướng dẫn agent xác định thao tác thật và kết quả mong đợi, đo bằng các công cụ profiling phù hợp trên một bản sao an toàn, rồi tóm tắt bằng chứng mà không lộ đường dẫn hoặc dữ liệu riêng tư.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
LoopX performance diagnosis
First identify the question. For a LoopX-managed benchmark's outcome quality, score growth, useful progress per time/token, or agent trajectory, use loopx-benchmark. A flatter score curve, repeated reads or more tokens alone do not establish a process-performance regression. Keep that analysis with the benchmark owner; use this skill as a focused subtask only when evidence identifies a slow owned command or resource cost. Do not require a profiler before analyzing effectiveness or interaction overhead.
Read the current Goal/Todo contract and repository optimization evidence rules. State the real user operation, observed failure and owning acceptance. Preserve the exact source, runtime/interpreter, backend/history, inputs and concurrency. Use an owned disposable target for writes. Do not attach to a production process, elevate privileges, weaken OS policy, or start paid/remote workloads without the existing authorization. Raw stacks, paths, arguments and profiles stay ignored and local-private; public summaries contain only generalized evidence.
Read loopx/capabilities/performance_diagnosis/README.md for tool selection and
blind spots. On installed copies use loopx capability show performance-diagnosis
to locate its canonical documentation. Python waits/startup: Pyinstrument; Python
threads/native on Linux: py-spy; allocations: Memray; Node/TS: V8 CPU/heap.
Go/JVM/kernel costs need their native tools. Research official sources when the
installed runtime or missing evidence makes the documented choice uncertain.
Do not choose a tool from popularity or claim one profiler covers every layer.
- Run the uninstrumented target and record ordinary elapsed time. Use repeated controlled samples for comparisons; profiling time is not a baseline or p95.
- Verify the optional tool version locally. Preserve the selected interpreter; install optional tools in an isolated environment when authorized. Do not silently install them into product dependencies or fall back on permissions.
- Write the exact target argv to an ignored JSON array. Run
loopx performance-diagnosis plan --tool TOOL --command-json FILE --output-directory FRESH_IGNORED_DIRECTORY --format json. Read the whole plan. A plan has not executed or verified tool readiness. - Execute
profile_argvthrough the Host executor as an argv array without shell interpolation. Capture only the owned process; record failures and coverage gaps. Profile a separate Node worker instead of inferring its CPU from Python transport waits. Do not collect locals or automatically profile unrelated children. - Require actual successful target exit and nonempty artifact. Read Speedscope
or V8 CPU using
loopx performance-diagnosis inspect --profile-json FILE --format json; Memray/heap use their own reporters. Keep threads independent and self/inclusive time distinct. Never sum inclusive rows to obtain latency. - Turn the hotspot into a falsifiable hypothesis. Use a controlled intervention to distinguish caller/transport, shared semantics and backend cost. Reuse the owning contract; do not skip freshness, authority checks or decision inputs.
- Repeat the original uninstrumented workload and semantic checks after a fix. Preserve passed, failed and untested results and update the existing checkpoint. Readback of a stack does not prove root cause, improvement or provider admission.
Do not add a new receipt/approval requirement or automatically mutate scheduling, Goal state or telemetry. Stop invoking the workflow to disable it; remove optional tools/captures from their owned local environment when no longer needed.
Câu hỏi thường gặp
Skill này có đo được một mô hình trả lời tốt không?
Không. Chất lượng benchmark và hiệu quả của agent do một skill benchmark riêng bao quát.
Nó có thể profile một máy chủ production đang chạy không?
Không. Skill nói không được gắn vào tiến trình production hoặc nâng quyền.
Nó dùng những công cụ nào?
Nó chọn profiler theo ngôn ngữ, chẳng hạn Pyinstrument cho thời gian khởi động và thời gian chờ của Python.
Chi tiết
Mô tả gốc của tác giả
Diagnose demonstrated CPU, command latency, allocation or IO regressions in an owned process with controlled measurements and language-appropriate profilers. Route benchmark effectiveness, score growth and trajectory efficiency to loopx-benchmark; profiling does not qualify a budget or grant execution authority.
repo: loopx-project/loopx
Độ phổ biến
- Sao GitHub
- 6.5k
- Vị trí xếp hạng
- #13875
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
loopx
6.5kDạy agent thiết lập và chạy LoopX, một công cụ cục bộ giữ các mục tiêu, nhiệm vụ và bằng chứng dài hạn đi đúng hướng qua các phiên trò chuyện.
loopx-change-quality
6.5kHướng dẫn agent review đúng bản thay đổi code cuối cùng của một mục tiêu LoopX, kiểm tra chất lượng trước khi merge và ghi biên nhận chất lượng.
loopx-doc-registry
6.5kDạy agent ghi lại và lập chỉ mục các tài liệu dự án lâu dài, như tài liệu thiết kế và ghi chú nghiên cứu, để các agent sau có thể tìm thấy.
loopx-material
6.5kHướng dẫn agent quản lý kho tài liệu nghiên cứu của dự án, gồm kiểm kê, chuyển mục giữa các giai đoạn, xếp hạng và thay đổi có chủ sở hữu phê duyệt.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.