analyze-diffusion-dynamics

analyze-diffusion-dynamics is a skill for Claude Code from pjt222/agent-almanac. It costs 80 tokens per session (5,450 once invoked), scanned A, original, MIT.

A scientific analysis workflow for diffusion processes, which describe systems changing randomly over time. It uses equations for probability distributions, boundary-crossing times, parameter sensitivity, and simulation checks.

In plain words
What is it for?
Use it to study stochastic differential equations, derive or solve Fokker–Planck equations, calculate first-passage times, and examine how parameters affect diffusion.
Why use it?
It helps connect a mathematical model to how its probabilities evolve and how quickly it reaches a boundary. This makes it easier to test analytical results against random simulations.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the agent-almanac plugin — 122 skills, 77 agents shipped together

Good fit Use it to study stochastic differential equations, derive or solve Fokker–Planck equations, calculate first-passage times, and examine how parameters affect diffusion.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pjt222/agent-almanac/analyze-diffusion-dynamics
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pjt222/agent-almanac --skill analyze-diffusion-dynamics
Clone the repo
git clone --depth 1 https://github.com/pjt222/agent-almanac

Made for: Claude Code.

Or install agent-almanac, the plugin that ships this one along with the rest of its 122 skills, 77 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for analyze-diffusion-dynamics

README.md
[![agentmods](https://agentmods.dev/badge/skills/pjt222/agent-almanac/analyze-diffusion-dynamics/github.svg)](https://agentmods.dev/skills/pjt222/agent-almanac/analyze-diffusion-dynamics)
Your own site
<a href="https://agentmods.dev/skills/pjt222/agent-almanac/analyze-diffusion-dynamics"><img src="https://agentmods.dev/badge/skills/pjt222/agent-almanac/analyze-diffusion-dynamics/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for analyze-diffusion-dynamics

Your own site · 80×15
<a href="https://agentmods.dev/skills/pjt222/agent-almanac/analyze-diffusion-dynamics"><img src="https://agentmods.dev/badge/skills/pjt222/agent-almanac/analyze-diffusion-dynamics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,450 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00080 $0.05450
Opus 5.5 $0.00032 $0.02180
Sonnet 5.5 $0.00016 $0.01090
Haiku 4.5 $0.00008 $0.00545

Measured 1mo ago against content hash 21c5724bd97e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

analyze-diffusion-dynamics scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

i18n/caveman-lite/skills/analyze-diffusion-dynamics/SKILL.md · 500 lines

How it starts

The opening of the file, as written. The whole thing — 500 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Analyze Diffusion Dynamics

Characterize the behavior of diffusion processes by specifying their stochastic differential equations, deriving the corresponding Fokker-Planck equation, computing first-passage time distributions analytically or numerically, performing parameter sensitivity analysis, and validating analytical results against Monte Carlo simulation.

When to Use

  • Deriving the probability density evolution of a continuous-time diffusion process
  • Computing mean first-passage times or full first-passage time distributions for bounded diffusion
  • Analyzing how drift, diffusion coefficient, and boundary parameters affect process behavior
  • Validating closed-form solutions against stochastic simulation
  • Building intuition for the dynamics underlying drift-diffusion models or generative diffusion processes

Inputs

  • Required: SDE specification (drift function, diffusion coefficient, domain/boundaries)
  • Required: Parameter values or ranges for the drift and diffusion functions
  • Required: Boundary conditions (absorbing, reflecting, or mixed)
  • Optional: Time horizon for transient analysis (default: auto-detect from dynamics)
  • Optional: Spatial discretization resolution for numerical PDE solvers (default: dx=0.001)
  • Optional: Number of Monte Carlo trajectories for simulation validation (default: 10000)

Procedure

Step 1: Specify the SDE Model

Define the drift function, diffusion coefficient, and boundary conditions for the process.

  1. Write the SDE in standard Ito form:
dX(t) = mu(X, t) dt + sigma(X, t) dW(t)

where mu is the drift function, sigma is the diffusion coefficient, and W(t) is a standard Wiener process.

  1. Implement the SDE components in code:
import numpy as np

class DiffusionProcess:
    """A one-dimensional diffusion process specified by drift and diffusion functions."""

    def __init__(self, drift_fn, diffusion_fn, lower_bound=None, upper_bound=None,
                 boundary_type="absorbing"):
        self.drift = drift_fn
        self.diffusion = diffusion_fn
        self.lower_bound = lower_bound
        self.upper_bound = upper_bound
        self.boundary_type = boundary_type

# Example: Ornstein-Uhlenbeck process on [0, a]
ou_process = DiffusionProcess(
    drift_fn=lambda x, t: 2.0 * (0.5 - x),     # mean-reverting drift
    diffusion_fn=lambda x, t: 0.1,               # constant diffusion
    lower_bound=0.0,
    upper_bound=1.0,
    boundary_type="absorbing"
)

# Example: Standard DDM (constant drift and diffusion)
ddm_process = DiffusionProcess(
    drift_fn=lambda x, t: 0.5,        # drift rate v
    diffusion_fn=lambda x, t: 1.0,    # unit diffusion (s=1, convention)
    lower_bound=0.0,                   # lower absorbing boundary
    upper_bound=1.5,                   # upper absorbing boundary (a)
    boundary_type="absorbing"
)

Read the full file on GitHub · 500 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 500 lines · 80 tokens per session scan A 21c5724bd97e

Subscribe to this mod's changes

analyze-diffusion-dynamics is a skill published in the GitHub repository pjt222/agent-almanac (42 stars, last pushed 2d ago), licensed MIT. It adds 80 tokens to every session and 5,450 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

post-processing

Extract, analyze, and summarize simulation output data — pull spatial fields at specific timesteps, compute time-series trends and detect steady state, extract line profiles through the domain, generate statistical summaries and distributions, calculate derived quantities (gradients, fluxes, volume fractions…

HeshamFS/materials-simulation-skills · 130 tokens

nonlinear-solvers

Select and configure nonlinear solvers for root-finding f(x)=0, optimization min F(x), and least-squares problems — choose among Newton, Newton-Krylov, quasi-Newton (BFGS, L-BFGS), Broyden, Anderson acceleration, and Levenberg-Marquardt methods, configure line search or trust-region globalization, diagnose convergence…

HeshamFS/materials-simulation-skills · 153 tokens

numerical-stability

Analyze numerical stability for time-dependent PDE simulations — check CFL and Fourier criteria, perform von Neumann stability analysis, detect stiffness, evaluate matrix conditioning, and recommend explicit vs implicit time-stepping schemes. Use when selecting time steps, diagnosing numerical blow-up or solver…

HeshamFS/materials-simulation-skills · 92 tokens

slurm-job-script-generator

Generate correct, copy-pasteable SLURM sbatch job scripts and sanity-check HPC resource requests — configure nodes, MPI tasks, OpenMP threads, memory (per-node or per-cpu), GPUs, walltime, partitions, modules, and environment variables, with automatic detection of conflicting directives and oversubscription. Use when…

HeshamFS/materials-simulation-skills · 145 tokens

ontology-explorer

Parse, navigate, and query materials science ontology structures — browse class hierarchies, inspect individual classes and their properties, look up object and data property definitions with domain/range, search for ontology terms by keyword, and parse or summarize raw OWL/XML files. Currently supports CMSO and ASMO…

HeshamFS/materials-simulation-skills · 151 tokens

performance-profiling

Identify computational bottlenecks, analyze parallel scaling, estimate memory requirements, and generate optimization recommendations for materials simulations — parse timing logs to find dominant phases (solver, assembly, I/O), evaluate strong and weak scaling efficiency, profile memory from mesh and field…

HeshamFS/materials-simulation-skills · 133 tokens