Agent skill
dqmc-dev
Workflow for modifying DQMC C code, adding new measurements, and running tests. Use when editing source code, implementing new observables, debugging, or validating code changes.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/dqmc-dev
SKILL.md
Code Development
Build & Test
# Build
make # -> build/dqmc
make clean # remove build/
# Test
cd test && make && ./test_greens
Smoke Test
After any code change:
dqmc-util gen Nx=4 Ny=4 U=4 dt=0.1 L=20 n_sweep_warm=50 n_sweep_meas=100
build/dqmc sim_0.h5
dqmc-util summary sim_0.h5
Adding New Measurements
-
Add to X-macro list in
src/rc/sim_types.h:c// Add to MEAS_EQLT_LIST (or MEAS_UNEQLT_LIST for unequal-time) #define MEAS_EQLT_LIST \ /* ... */ \ X(my_meas, num_ij) // pick an appropriate size expression -
Implement measurement kernel in
src/rc/meas.c -
Add analysis function in
dqmc_util/analyze_hub.py(and update reshaping/symmetrization if needed):python@observable( description="my new observable", requires=("meas_eqlt/n_sample", "meas_eqlt/sign", "meas_eqlt/my_meas"), ) def _my_meas(ctx): return core.jackknife_noniid( ctx.data["meas_eqlt/n_sample"], ctx.data["meas_eqlt/sign"], ctx.data["meas_eqlt/my_meas"], )
Key Code Patterns
Dual compilation: Files in src/rc/ compile twice. Use RC(name) macro for real/complex dispatch.
Memory: Use my_calloc() for 64-byte aligned allocations.
Profiling: Wrap with profile_begin(name) / profile_end(name).
Definition of Done
-
makesucceeds without warnings -
cd test && make && ./test_greenspasses - Smoke run completes
- If touching measurements: verify via
dqmc-util summary
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?