.cursor/skills/add-tool/SKILL.md
Add a new tool to DGX Lab end-to-end: backend router, frontend page, sidebar entry, and main.py registration. Use when creating a new tool, adding a new dashboard page, or extending the tool inventory.
npx skillsauth add jxtngx/dgx-lab add-toolInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A DGX Lab tool is a vertical slice: one backend router + one frontend page + one sidebar entry. This skill walks through the full pattern.
Copy and track progress:
- [ ] 1. Create backend router
- [ ] 2. Register router in main.py
- [ ] 3. Create frontend page
- [ ] 4. Add sidebar entry
- [ ] 5. Add to tools layout name map
- [ ] 6. Verify build
Create backend/app/routers/<tool>.py:
from __future__ import annotations
from fastapi import APIRouter
from app import config
router = APIRouter()
@router.get("")
async def list_items():
return []
config for paths and hardware constants.control.py, datasets.py).threading.Thread(daemon=True) for background work.Add to backend/app/main.py:
from app.routers import newtool
app.include_router(newtool.router, prefix="/api/newtool", tags=["newtool"])
Place it with the other include_router calls. Prefix is always /api/<tool-name>.
Create frontend/apps/web/app/(tools)/<tool>/page.tsx:
"use client"
import { useFetch } from "@/lib/use-fetch"
export default function NewToolPage() {
const { data, loading } = useFetch<unknown[]>("/newtool")
return (
<div className="flex h-full flex-col" style={{ background: "var(--background)" }}>
<header
className="flex shrink-0 items-center px-4 py-3"
style={{ borderBottom: "1px solid var(--border-subtle)" }}
>
<h1 className="text-[15px] font-semibold tracking-tight">New Tool</h1>
</header>
<div className="flex-1 overflow-auto px-4 py-3">
{loading && <div style={{ color: "var(--text-tertiary)" }}>Loading…</div>}
</div>
</div>
)
}
useFetch for one-shot data, usePoll for live data.font-mono) for data values, sans for structure.In frontend/apps/web/components/app-sidebar.tsx, add to the items array inside the "Tools" section:
{ href: "/newtool", label: "New Tool", icon: "◇" }
Pick an icon glyph that isn't already used. For optional tools, add optional: true and settingsKey: "newtool".
In frontend/apps/web/app/(tools)/layout.tsx, add to the toolNames record:
"/newtool": "New Tool",
This controls the title shown in the top bar.
cd backend && uv run uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
cd frontend && bun run dev
Confirm:
http://localhost:8000/api/newtool returns datahttp://localhost:3000/newtool renders the pagetools
INVOKE THIS SKILL when working with LangSmith tracing OR querying traces. Covers adding tracing to applications and querying/exporting trace data. Uses the langsmith CLI tool.
tools
INVOKE THIS SKILL when building evaluation pipelines for LangSmith. Covers three core components: (1) Creating Evaluators - LLM-as-Judge, custom code; (2) Defining Run Functions - how to capture outputs and trajectories from your agent; (3) Running Evaluations - locally with evaluate() or auto-run via LangSmith. Uses the langsmith CLI tool.
tools
INVOKE THIS SKILL when creating evaluation datasets, uploading datasets to LangSmith, or managing existing datasets. Covers dataset types (final_response, single_step, trajectory, RAG), CLI management commands, SDK-based creation, and example management. Uses the langsmith CLI tool.
testing
INVOKE THIS SKILL when your LangGraph needs to persist state, remember conversations, travel through history, or configure subgraph checkpointer scoping. Covers checkpointers, thread_id, time travel, Store, and subgraph persistence modes.