본문으로 건너뛰기
cccskills
무료GitHub에 공개

backend-doctor

Diagnose and fix the CatGo backend. Use whenever the user asks to "check the backend", "diagnose the backend", "fix the backend", "why isn't X working", reports connection problems, a blank/failing UI, "router not loaded", "deps missing", or "can't reach the server". Reads GET /api/diagnostics, explains each issue from its fix_hint, auto-applies SAFE fixes (reconnect HPC, pip install a missing dep via the terminal), confirms risky actions first, and — if diagnostics itself is unreachable — tells the user how to start the backend instead of pretending to fix one that is down.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Hello-QM/catgo-LRG스타 208(GitHub 208 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md7.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Backend Doctor Skill

When to Use

Use this skill when the user reports that CatGo itself is misbehaving (as opposed to a specific DFT calculation):

  • "check / diagnose / fix the backend"
  • "why isn't X working", "the app is broken", "the page is blank"
  • "I can't connect", "connection problems", "nothing loads"
  • "a router is missing", "pymatgen / ase / asyncssh not installed"
  • "HPC won't connect"

Do NOT use this skill for DFT/calculation errors (ZBRENT, SCF, POTCAR for a specific job) — those route to the troubleshooting router.

The diagnostics contract

Everything in this skill is driven by one endpoint. Call it first, every time:

GET /api/diagnostics

(If that path 404s on an older build, fall back to GET /api/system/diagnostics.)

The response shape is fixed:

{
  "ok": true,
  "version": "<string>",
  "mode": "thin" | "full",
  "frontend_served": true,
  "routers": { "loaded": 42, "missing": ["<name>", ...] },
  "deps": { "pymatgen": true, "ase": true, "asyncssh": true, "numpy": true },
  "hpc": { "active_sessions": 0, "any_connected": false },
  "health": "ok" | "degraded",
  "issues": [
    { "id": "<slug>", "severity": "info"|"warn"|"error",
      "message": "<human>", "fix_hint": "<short how-to>" }
  ]
}

The issues array is the source of truth. Do not invent problems that are not in it. Read mode, deps, hpc, and health for context, then work the issues list one at a time.

Procedure

Step 1: Fetch diagnostics

GET /api/diagnostics
  • If you get a valid JSON body back → the backend is up. Continue to Step 2.
  • If the request fails to connect / times out / refuses → the backend is down. Jump to "Chicken-and-egg: diagnostics unreachable" below. Do NOT attempt any of the in-app fixes — none of them can work without the server.

Step 2: Summarize state for the user

In one short block, report:

  • health (ok / degraded) and version
  • mode (thin = optional heavy deps deliberately excluded; full = everything)
  • HPC: hpc.any_connected and hpc.active_sessions
  • count of issues by severity

Step 3: Work each issue

For every entry in issues, in error → warn → info order:

  1. Restate message plainly (what is wrong and why it matters).
  2. State the fix from fix_hint.
  3. Classify the fix as SAFE (auto-apply, Step 4) or RISKY (confirm first, Step 5).

Step 4: Auto-apply SAFE fixes

The backend already responded, so the terminal / pty endpoint and HPC routes are reachable. SAFE fixes you may apply without asking:

  • Missing optional dep (deps.pymatgen/ase/asyncssh/numpy is false, or a dep_* issue): install it in the backend's own environment via the terminal/pty endpoint, then re-run diagnostics to confirm.

    python -m pip install pymatgen      # or ase / asyncssh / numpy
    
    • If mode == "thin", a missing heavy dep may be expected (thin mode deliberately omits them). Say so; only install if the user actually needs that feature. Do not "fix" a thin-mode omission silently.
  • HPC not connected (hpc.any_connected == false while the user is trying to run jobs, or an hpc_* issue): guide a reconnect.

    catgo_system(action: "status")
    

    Then reconnect through the HPC settings panel, and verify the SSH config (host, user, key, OTP freshness). After reconnecting:

    GET /api/diagnostics
    

    and confirm hpc.any_connected flipped to true.

After any SAFE fix, re-fetch GET /api/diagnostics and confirm the corresponding issue is gone. Never claim it is fixed without the re-check.

Step 5: Confirm RISKY actions first

Ask before doing anything that changes the environment or state beyond a single optional-dep install or a reconnect. Examples that require explicit user confirmation:

  • restarting the backend process
  • upgrading/downgrading/uninstalling an already-present package, or pinning a version that differs from what is installed
  • editing ssh_config, credentials, or any settings file
  • clearing caches, deleting run directories, or resetting workflow state
  • installing system-level packages (anything beyond python -m pip install)

State exactly what you will run and what it affects, then wait for a yes.

Step 6: Re-verify and report

Re-run GET /api/diagnostics. Report which issues cleared, which remain, and the next concrete action for anything still red.

Issue id reference

Match on the id slug (the backend owns the exact set; these are the common ones). Always prefer the issue's own fix_hint over this table when they differ.

Issue id (typical)MeaningFix classAction
dep_pymatgen / deps.*An optional heavy dep failed to importSAFE*python -m pip install <dep>, then re-check. *Expected in thin mode.
dep_asyncsshasyncssh missing → no HPC/SSHSAFEpython -m pip install asyncssh; HPC is dead until this resolves.
router_missingA router in routers.missing didn't loadRISKYUsually a missing dep or import error upstream; surface the underlying dep issue, confirm before any restart.
hpc_no_sessionhpc.any_connected == falseSAFEGuide reconnect via HPC settings; verify ssh_config.
frontend_not_servedfrontend_served == falseRISKYSPA build (build-desktop) absent; rebuilding is a heavier action — confirm first.
thin_modemode == "thin"INFOInformational; some features intentionally off. Don't "fix".

Chicken-and-egg: diagnostics unreachable

If GET /api/diagnostics (and /api/system/diagnostics) cannot be reached at all, the backend is not running. None of the in-app fixes apply — do not pretend to fix a server that is down. Instead, instruct the user to start it:

  1. One-line installer / launcher:

    curl -sSL https://app.catgo-ucsd.org/install.sh | bash
    
  2. Or, from a checkout, run the server directly:

    python server/main.py
    

Also have them confirm the frontend is pointed at the right backend URL: the runtime backend-URL store (catgo-backend-url in localStorage, default http://localhost:8000). If the backend is up on a different host/port, set the backend URL to match rather than restarting anything.

Once the server is up, start over at Step 1.

Key Principle

Diagnose from /api/diagnostics before prescribing. Work only the issues the backend actually reports, auto-apply only the two SAFE classes (optional-dep install, HPC reconnect), confirm everything else, and re-verify with a second diagnostics call before claiming success. If diagnostics is unreachable, the job is to get the backend running — not to fake a fix.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

abinit

무료

Generate and manage ABINIT DFT calculations. Use when the user requests ABINIT, or needs DFPT phonons, GW calculations, or BSE optical spectra.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Hello-QM/catgo-LRG2082026년 10월 23일 업데이트

Use when the user asks to place an adsorbate molecule on a surface, find adsorption sites, or set up a surface+adsorbate model for DFT.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Hello-QM/catgo-LRG2082026년 10월 23일 업데이트

Use when the user asks for adsorption energy, binding energy, or wants to compare how strongly a molecule binds to a surface.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Hello-QM/catgo-LRG2082026년 10월 23일 업데이트

Use when the user asks to analyze computational results: Gibbs free energy, OER/HER/CO2RR overpotentials, adsorption energy, convergence tests, DOS/d-band analysis, or Bader charge analysis.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Hello-QM/catgo-LRG2082026년 10월 23일 업데이트

Use AmberTools antechamber for molecular force field parameterization. Generates GAFF/GAFF2 parameters and AM1-BCC or RESP charges for use in AMBER or LAMMPS classical MD simulations.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Hello-QM/catgo-LRG2082026년 10월 23일 업데이트

atom-ops

무료

One-shot recipes for adding, deleting, moving, and replacing individual atoms in the active CatGo viewer structure. Use whenever the user asks to "add an atom", "delete atoms", "remove this atom", "move atom N", "replace H with Li", or any single-atom edit — including "add a hydrogen on top of atom 12" / "delete atoms 5–9" / "swap the oxygen at site 3 for fluorine". Skips the discovery loop (no need to list structure tools or check adsorption sites first); goes straight to the matching `catgo_structure` action. Triggers in Chinese on 加原子, 删原子, 减原子, 移动原子, 替换原子, 增加氢, 删除氧, 把 ... 换成 ....

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Hello-QM/catgo-LRG2082026년 10월 23일 업데이트

Hello-QM의 스킬 모두 보기

이 스킬의 문제 신고