بنقرة واحدة
visual-debug
Diagnostic plots/visualizations — shared utilities, output paths, plot style conventions
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Diagnostic plots/visualizations — shared utilities, output paths, plot style conventions
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Before writing new code — search existing implementations, topical audits, READMEs, file-header caveats
After implementing — update file headers, README, topical audits; note duplication
Navigate and debug OrbitalWar / SpaceCraft — design, truss sim, combat, radiosity, orbits; hub to docs and tests
Dedicated documentation work — OKF format, topical audits, extract-overview and inline-doc workflows
Writing new code — inventory-first, module-vs-script placement, no-new-files, STOP triggers for duplication
Building C++ (FireCore/SPFF) — build dirs, cmake targets, ASAN vs opt modes
استنادا إلى تصنيف SOC المهني
| name | visual-debug |
| description | Diagnostic plots/visualizations — shared utilities, output paths, plot style conventions |
| trigger | {"glob":["**/tests/**/*","**/*test*.py","**/*debug*.py","**/test_*.sh","**/run_*.sh","**/*benchmark*.py"]} |
Before writing ad-hoc debugging/plotting code, check these existing modules:
Python Visualization:
pyBall/plotUtils.py - matplotlib utilities: 1D/2D function plots, geometry visualization, field slices, scan profiles, derivative plotspyBall/VispyUtils.py - GPU-accelerated 3D visualization: AtomScene class for interactive molecular viewing, bond visualization, force vectorsPython Testing/Diagnostics:
pyBall/DFTB/TestUtils.py - RMS error computation, checkpoint management (save/load/compare), grid generation, eigenvec printingpyBall/atomicUtils.py - Atomic utilities: normalize, findAllBonds, graph preprocessing, adjacency listsC++ Testing/Diagnostics:
cpp/common/testUtils.h - Print arrays/vectors/matrices, compareVecs, derivative checking (checkDeriv, checkDeriv3d), timing (StopWatch), error macros (TEST_ERROR_PROC_N, SPEED_TEST_FUNC)cpp/apps/MeshViewer/MeshFileFormats.h - writeSVG() / writeSVGMulti() for headless 2D SVG export from CMesh objects. Supports faces (with opacity, backface culling), edges, points, vertex/edge number labels, face normals, multi-mesh composition, tight bbox fit. Use for fast topology verification without GUI. See test_svg_export.cpp for batch usage. The interactive meshViewer app provides 3D rendering + SVG export with live toggles.debug/<script_name>/ (e.g., debug/plot_fdbm_relax/). The <script_name> is the generating script's name without .py. Subfolders are allowed for organization. Never write to /tmp/ or the repository root. This keeps artifacts persistent and easy to find.tests/003_case_name/). Do not clutter root directories. Explicitly report their location.&, | tail, | head, or silent redirects). Full stdout must be visible.matplotlib saved as .png files. Use shared helpers like plotUtils.py (e.g., plot_scan_profile, plot_field_slice, plotGeometryWithForces).--noPlot, --saveFig). Isolate plt.show() strictly to the CLI/main entry point.NaN, infinity, or unexpected zeros.pyBall/DFTB/TestUtils.py checkpoint functions (save_checkpoint, load_checkpoint, compare_checkpoint) for parity testing and reproducible debugging.compute_rms_error from TestUtils.py for array comparisons.np.ctypeslib.as_array pattern (see python_native_bindings skill) instead of copying data.When creating diagnostic comparison plots (e.g., reference vs model curves):
dc = mean(model - ref) and subtract it from the model so curves overlap. Center reference by subtracting its own mean for display. The residual difference after this shift reveals true numerical error.ls=':', lw=1.5 (dotted, thick — clearly visible as the reference)ls='-', lw=0.5 (solid, thin — the thing being tested)(model_shifted - ref) * 100 on a secondary y-axis (twinx) so small residual errors are visible. Label it diff x100.