LumericalFDTD-analysis

LumericalFDTD-analysis is a skill for Claude Code from Lex669/LumericalFDTD-skill. It costs 109 tokens per session (1,116 once invoked), scanned A, original, MIT.

A tool for analyzing saved Ansys Lumerical FDTD results, where FDTD means a computer method for simulating electromagnetic waves over time. It reads numerical data, calculates optical measures, creates PNG charts, and checks the results against stated requirements.

In plain words
What is it for?
Use it to calculate transmission, inspect field distributions, examine diffraction patterns, and create publication-quality plots from .npz result files.
Why use it?
It keeps result analysis separate from building and running the simulation. This makes it easier to repeatedly recalculate measures and regenerate charts from existing data.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the LumericalFDTD plugin — 5 skills, 4 commands shipped together

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.

agentmods
npx agentmods add skills/lex669/lumericalfdtd-skill/lumericalfdtd-analysis
Any agent
npx skills add Lex669/LumericalFDTD-skill --skill lumericalfdtd-analysis
Clone the repo
git clone --depth 1 https://github.com/Lex669/LumericalFDTD-skill

Made for: Claude Code.

Or install LumericalFDTD, the plugin that ships this one along with the rest of its 5 skills, 4 commands.

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 LumericalFDTD-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/lex669/lumericalfdtd-skill/lumericalfdtd-analysis.svg)](https://agentmods.dev/skills/lex669/lumericalfdtd-skill/lumericalfdtd-analysis)
Your own site
<a href="https://agentmods.dev/skills/lex669/lumericalfdtd-skill/lumericalfdtd-analysis"><img src="https://agentmods.dev/badge/skills/lex669/lumericalfdtd-skill/lumericalfdtd-analysis.svg" alt="Measured on agentmods" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,116 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00109 $0.01116
Opus 5 $0.00055 $0.00558
Sonnet 5 $0.00022 $0.00223
Haiku 4.5 $0.00011 $0.00112

Measured 6d ago against content hash 3e5b52a93cf0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

LumericalFDTD-analysis 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 6d 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.

skills/LumericalFDTD-analysis/SKILL.md · 126 lines

How it starts

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

FDTD 数据分析器

职责范围

本 skill 仅负责数据分析与可视化阶段:读取 .npz 数据、计算光学指标、绘制图表、验证验收条件。输出 .png 图表文件。

不负责:结构建模(→ LumericalFDTD-modeling)、仿真执行(→ LumericalFDTD-simulation)、端到端全流程(→ LumericalFDTD)。

前置条件

.npz 数据文件必须已存在于 data/ 目录。若不存在,先运行仿真。

工作流

1. 确认数据可用

ls path/to/project/data/
# 确认 results.npz 等文件存在

2. 编写分析脚本

按模板生成 *_analysis.py(纯数据分析,不调 lumapi.FDTD):

import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt

# 加载数据
data = np.load(os.path.join(data_dir, "results.npz"), allow_pickle=True)
E = data["E"]
T = data["T"]
wavelengths = data["wavelengths"]
# ...

# 计算指标
transmission = np.abs(T)**2
# ...

# 绘图
fig, ax = plt.subplots(figsize=(8, 5))
ax.plot(wavelengths * 1e6, transmission)
ax.set_xlabel("Wavelength (μm)")
ax.set_ylabel("Transmission")
ax.set_title("Transmission Spectrum")
fig.savefig(os.path.join(pic_dir, "transmission.png"), dpi=150)
plt.close()

3. 运行分析脚本

& 'PYTHON_PATH' 'path/to/project_analysis.py'

分析脚本秒级完成,可反复执行迭代图表样式。

4. 验证结果

检查生成的 .png 图表是否满足验收条件:

验收维度 检查项
透射率 峰值/谷值在预期波长?数值合理(0-1)?
场分布 模式图样是否符合物理预期?
衍射图案 Airy 环是否可见?中央亮斑尺寸是否符合 r₁ = 1.22λL/D
图表质量 坐标轴标注、单位、图例是否齐全?分辨率是否足够?

常用分析类型

透射/反射谱

T = fdtd.getresult("monitor", "T")
plt.plot(wavelengths * 1e6, np.abs(T)**2)
plt.xlabel("Wavelength (μm)")
plt.ylabel("Transmission")

近场/远场分布

E = np.abs(Ex**2 + Ey**2 + Ez**2)  # |E|^2 intensity
I_1d = np.sum(I, axis=1)           # Quasi-2D: 沿 y 求和 -> 1D profile
plt.plot(x * 1e6, I_1d / I_1d.max())

衍射效率

P_total = np.sum(I, axis=(0, 1, 2))
P_central = np.sum(I_central_region, axis=(0, 1, 2))
efficiency = P_central / P_total

宽带波长索引

# 频率线性递增 → 波长递减
wl_short_idx = n_freq - 1   # 最短波长(高频端)
wl_long_idx = 0              # 最长波长(低频端)

输出

  • *_analysis.py — 分析脚本(可反复迭代)
  • pic/*.png — 结果图表(dpi ≥ 150)
  • 可选:更新 REPORT.md — 结果摘要和图表说明

Read the full file on GitHub · 126 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. 6d ago First seen · 126 lines · 109 tokens per session scan A 3e5b52a93cf0

Subscribe to this mod's changes

LumericalFDTD-analysis is a skill published in the GitHub repository Lex669/LumericalFDTD-skill (23 stars, last pushed 16d ago), licensed MIT. It adds 109 tokens to every session and 1,116 once invoked, about $0.0005 per session on Opus 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-08-30.

Related

Other skills, from other repositories

instrument-data-to-allotrope

Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full…

anthropics/knowledge-work-plugins · 123 tokens

matlab

Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.

K-Dense-AI/scientific-agent-skills · 42 tokens

exploratory-data-analysis

Perform bounded, local exploratory analysis of explicitly supported scientific files. Use for redacted CSV/TSV/JSON profiles; optional NumPy, HDF5, FASTA/FASTQ, and basic image metadata inspection; missingness/leakage audits; outlier and transformation sensitivity; and rigorous EDA report scaffolds. Other domain…

K-Dense-AI/scientific-agent-skills · 83 tokens

phylogenetics

Build and analyze phylogenetic trees using MAFFT (multiple alignment), IQ-TREE 2 (maximum likelihood), and FastTree (fast NJ/ML). Visualize with ETE3 or FigTree. For evolutionary analysis, microbial genomics, viral phylodynamics, protein family analysis, and molecular clock studies.

K-Dense-AI/scientific-agent-skills · 68 tokens

research-engineer

An uncompromising Academic Research Engineer. Operates with absolute scientific rigor, objective criticism, and zero flair. Focuses on theoretical correctness, formal verification, and optimal implementation across any required technology.

davila7/claude-code-templates · 43 tokens

mapping-to-snomed

Maps clinical concept spans extracted by OpenMed to SNOMED CT concepts through a USER-SUPPLIED terminology server (the user's own Ontoserver, Snowstorm, or UMLS/UTS), never a bundled vocabulary. Use when the user wants to code findings, disorders, procedures, body structures, or substances to SNOMED CT, run an ECL…

maziyarpanahi/openmed · 205 tokens