Agent skill

Simulation Dev

by spiriMirror in spiriMirror/libuipc

General simulation development best practices for correctness, stability, and debuggability.

Apache-2.0Auto-check passedDevelopment

Install Simulation Dev

skills CLI
$ npx skills add spiriMirror/libuipc --skill simulation-dev -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install spiriMirror/libuipc simulation-dev --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/spiriMirror/libuipc.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/simulation-dev .claude/skills/simulation-dev && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
simulation-dev
GitHub stars
335
Token cost
~1.4k tokens
SKILL.md length
710 words
Files
1
Skills in repo
16
Repo updated
First seen
Licence
Apache-2.0

At a glance

General simulation development best practices for correctness, stability, and debuggability.

  • Works in 6 steps: Correctness before performance. → Fail fast on invalid states. → Prefer deterministic behavior during… → …
  • Modifying simulation systems
  • SKILL.md covers When to Use, Core Principles, Safety Rules (Always Apply) and Assertion Best Practices, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Simulation Dev is an agent skill from spiriMirror/libuipc. General simulation development best practices for correctness, stability, and debuggability. Use when implementing or modifying simulation systems, solvers, constraints, or GPU kernels, especially for index safety, NaN/Inf issues, and diagnostics.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. The repository describes itself as: A Modern Python and C++20 Library of Unified Incremental Potential Contact. The licence is Apache-2.0.

When your agent uses it

  • Modifying simulation systems
  • Especially for index safety

Example prompts

  • “/simulation-dev”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Correctness before performance.
  2. Fail fast on invalid states.
  3. Prefer deterministic behavior during debugging.
  4. Prefer MUDA-native diagnostics for GPU paths whenever possible.
  5. Validate data at subsystem boundaries.
  6. Instrument first, optimize after evidence.

What it can do on your machine

Read from SKILL.md and the folder at commit 9c748a7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Simulation Dev loads about 1.4k tokens when it runs. Until then it costs about 66 tokens; SKILL.md has 710 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~66
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from spiriMirror/libuipc at commit 9c748a7, republished under its Apache-2.0 licence (© spiriMirror). 710 words, ~1,379 tokens.

Download SKILL.mdSave it as .claude/skills/simulation-dev/SKILL.md (or your agent's skills folder).
name
simulation-dev
description
General simulation development best practices for correctness, stability, and debuggability. Use when implementing or modifying simulation systems, solvers, constraints, or GPU kernels, especially for index safety, NaN/Inf issues, and diagnostics.

Simulation Development Best Practices

General rules for building simulation code that is correct first, debuggable second, and fast third.

When to Use

Use this skill when:

  • adding or modifying simulation systems, solvers, integrators, constraints, or contact logic,
  • touching CPU/GPU compute paths that can fail from invalid indices or unstable numerics,
  • debugging crashes, divergence, NaN/Inf, or non-deterministic behavior,
  • improving diagnostics, assertions, and reproducibility.

Core Principles

  1. Correctness before performance.
  2. Fail fast on invalid states.
  3. Prefer deterministic behavior during debugging.
  4. Prefer MUDA-native diagnostics for GPU paths whenever possible.
  5. Validate data at subsystem boundaries.
  6. Instrument first, optimize after evidence.

Safety Rules (Always Apply)

Input and shape validation
  • Validate counts, offsets, dimensions, and index ranges before compute.
  • Verify assumptions at boundaries (API input, scene load, assembly, solver entry).
  • Use clear sentinel conventions and assert them (-1, empty, null, etc.).
Index safety for GPU/parallel code
  • Guard every computed index before read/write.
  • Return early on invalid thread work instead of continuing with partial writes.
  • Prefer host-side prevalidation to avoid propagating bad mappings into kernels.
Numerical robustness
  • Check for finite values (isfinite) at key checkpoints.
  • Assert on first invalid scalar near source (residuals, energies, step sizes, norms).
  • Add conservative guards for divide-by-near-zero and invalid square roots/logs.

Assertion Best Practices

Every assertion should answer:

  1. What failed?
  2. Where in the pipeline?
  3. With what values?
  4. What is the likely cause?

Checklist for high-quality assert messages:

  • include stage/iteration/frame context,
  • include offending value and expected range/invariant,
  • include at least one hint for root-cause direction,
  • keep wording short and actionable.

Diagnostics and Observability

  • Use MUDA diagnostics as the default for GPU debugging:
    • attach file/line metadata on launches,
    • assign explicit names to views/buffers,
    • prefer MUDA launch wrappers over raw CUDA launch sites when practical.
  • Attach source location metadata to kernel/parallel launches when available.
  • Name critical buffers/views to make reports readable.
  • Keep optional debug dumps for important intermediates (vectors, matrices, topology maps).
  • Use scoped timers around major phases and hot sub-phases.
  • Make debug instrumentation easy to toggle with config flags.

MUDA Debug Checklist

For each touched GPU code path:

  • Do: add launch source mapping (for example, file_line(__FILE__, __LINE__)).
  • Do: name captured views/buffers (for example, viewer().name("x")) for readable diagnostics.
  • Do: use MUDA launch/parallel wrappers as first choice for new or modified kernels.
  • Do: use muda::debug_sync_all() as a fast-fail barrier while debugging broken kernels.
  • Do: keep index guards at the top of kernel bodies before any memory access.
  • Do: preserve a low-overhead path when debug flags are off.
  • Don't: add raw CUDA launch sites unless there is a clear, documented need.
  • Don't: leave anonymous captures for critical buffers in hot or unstable paths.
  • Don't: rely on post-mortem logs only; add immediate context at the failure point.
Show full SKILL.md (262 more words)Show less

Deterministic Debug Workflow

  1. Reproduce on the smallest case that still fails.
  2. Freeze nondeterminism where possible:
    • fixed seeds,
    • stable ordering,
    • reduced parallel variability.
  3. Enable strict checks and diagnostic output.
  4. Bisect by pipeline stage (assemble -> solve -> update).
  5. Narrow to first bad value and assert there.

Simulation Debug Loop (Iterative)

Use this loop as the default process for debugging simulation issues:

  1. Build a minimal reproducible scene/case that is easy to debug.
  2. Use diagnostics to understand behavior, form a concrete assumption, then add debug code to validate that assumption.
  3. After validating the assumption, implement the fix in the minimal case first.
  4. Re-run the original scene/case to verify the real issue is resolved.
  5. Add a regression test for the confirmed fix.

If any step fails or new evidence contradicts the assumption, return to step 1 or 2 and iterate until root cause and fix are both confirmed.

During active GPU debugging, insert muda::debug_sync_all() at key boundaries to stop immediately when a kernel fails, then remove or gate it once diagnosis is complete.

Convergence and Stability Guidelines

  • Separate stopping criteria from failure criteria.
  • Distinguish "did not converge yet" from "invalid state".
  • Track monotonic indicators where expected (energy, residual envelopes).
  • For iterative methods, sample/check periodically to limit synchronization overhead.
  • Provide explicit fallback or abort policy for non-convergence in strict mode.

Change Workflow

  1. Write/modify logic with invariants first.
  2. Add assertions at boundaries and first-use sites.
  3. Add diagnostics (timers, buffer names, optional dumps).
  4. Verify on:
    • minimal case,
    • representative case,
    • stress case.
  5. Only then profile and optimize.

© spiriMirror, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .cursor/skills/simulation-dev of spiriMirror/libuipc.

Open the folder on GitHubat commit 9c748a7

Compare with similar skills

Simulation Dev next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Simulation Dev compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Simulation Dev this skillspiriMirror/libuipc335—~1.4kAutomated safety check: PassApache-2.0
Vercel Composition Patternssupabase/supabase111k59 repos~726Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 59 repos~726 tokens
    DevelopmentAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed

More from spiriMirror/libuipc

All 16 skills in this repo
  • GPU Optimization

    spiriMirror/libuipc

    GPU optimization workflow using uipc.profile, uipc.profile.nsight, and Nsight Compute CLI.

    335 GitHub stars~3.6k tokensUpdated 5 days ago
    Auto-check passed
  • Review PR

    spiriMirror/libuipc

    Review a libuipc pull request end-to-end: checkout the PR, summarize changes, list files for the human reviewer, and perform a domain-aware AI review covering physics correctness, backend…

    335 GitHub stars~1.7k tokensUpdated 5 days ago
    Auto-check passed
  • Xmake Workflow

    spiriMirror/libuipc

    Build and test the libuipc project using XMake. An agent skill from spiriMirror/libuipc.

    335 GitHub stars~588 tokensUpdated 5 days ago
    Auto-check passed
  • Cmake Workflow

    spiriMirror/libuipc

    Build and test the libuipc project using CMake. An agent skill from spiriMirror/libuipc.

    335 GitHub stars~321 tokensUpdated 5 days ago
    Auto-check passed
  • Document

    spiriMirror/libuipc

    Documentation style guide and rules for creating documentation

    335 GitHub stars~930 tokensUpdated 5 days ago
    Auto-check passed
  • Fix Issue

    spiriMirror/libuipc

    Fix a GitHub issue with proper branch, testing, and PR workflow

    335 GitHub stars~421 tokensUpdated 5 days ago
    Auto-check passed

Categories

Questions about Simulation Dev

What does Simulation Dev do?

General simulation development best practices for correctness, stability, and debuggability. Simulation Dev is an agent skill from spiriMirror/libuipc. General simulation development best practices for correctness, stability, and debuggability.

When should I use Simulation Dev?

Simulation Dev fits situations like: modifying simulation systems; especially for index safety.

How do I install Simulation Dev in Claude Code?

Run `npx skills add spiriMirror/libuipc --skill simulation-dev -a claude-code`. Or copy the skill folder (.cursor/skills/simulation-dev in spiriMirror/libuipc) into .claude/skills/simulation-dev in your project. Claude Code loads it when a task matches its description.

How do I install Simulation Dev in Codex?

Run `npx skills add spiriMirror/libuipc --skill simulation-dev -a codex`. Or copy the skill folder (.cursor/skills/simulation-dev in spiriMirror/libuipc) into .agents/skills/simulation-dev in your project. Codex loads it when a task matches its description.

Can I use Simulation Dev in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add spiriMirror/libuipc --skill simulation-dev -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/simulation-dev, .gemini/skills/simulation-dev, .github/skills/simulation-dev and .opencode/skills/simulation-dev in your project.

What does Simulation Dev need to run?

SKILL.md names no scripts, command-line tools or credentials: Simulation Dev is instructions for the agent only.

Does Simulation Dev access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Simulation Dev safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Simulation Dev use?

Simulation Dev is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Simulation Dev use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Simulation Dev?

Skills that share tags, products or a category with Simulation Dev: Vercel Composition Patterns (supabase/supabase, 111k stars), Finishing a Development Branch (obra/superpowers, 296k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and PR Babysitter (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Simulation Dev?

spiriMirror (a GitHub organization) maintains it in spiriMirror/libuipc, which has 335 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on October 3, 2026.

Source: spiriMirror/libuipc on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.