lsdyna-kfile

lsdyna-kfile is a skill for Claude Code from LLK-LL/K-agent. It costs 106 tokens per session (3,211 once invoked), scanned A, original, MIT.

A workflow for creating, changing, debugging, testing, parsing, and validating LS-DYNA input files, called K, KEY, or DYN decks, for explicit dynamics simulations.

In plain words
What is it for?
Use it for collision, drop, penetration, forming, ALE, or SPH simulations, including repairing an existing deck or preparing a reusable template.
Why use it?
It turns an unclear simulation request into a checked model and requires the resulting file to be tested with the local solver before delivery.

Skill for Claude Code

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

Part of the lsdyna-kagent plugin — 1 skill, 1 agent shipped together

Good fit Use it for collision, drop, penetration, forming, ALE, or SPH simulations, including repairing an existing deck or preparing a reusable template.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/llk-ll/k-agent/lsdyna-kfile
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 LLK-LL/K-agent --skill lsdyna-kfile
Clone the repo
git clone --depth 1 https://github.com/LLK-LL/K-agent

Made for: Claude Code.

Or install lsdyna-kagent, the plugin that ships this one along with the rest of its 1 skill, 1 agent.

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 lsdyna-kfile

README.md
[![agentmods](https://agentmods.dev/badge/skills/llk-ll/k-agent/lsdyna-kfile.svg)](https://agentmods.dev/skills/llk-ll/k-agent/lsdyna-kfile)
Your own site
<a href="https://agentmods.dev/skills/llk-ll/k-agent/lsdyna-kfile"><img src="https://agentmods.dev/badge/skills/llk-ll/k-agent/lsdyna-kfile.svg" alt="Measured on agentmods" height="20"></a>
Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,211 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.
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.00106 $0.03211
Opus 5 $0.00053 $0.01605
Sonnet 5 $0.00021 $0.00642
Haiku 4.5 $0.00011 $0.00321

Measured 7d ago against content hash 0a5a2c94307f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

lsdyna-kfile 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 7d ago.

The scan reads SKILL.md. This mod also ships 26 executable files (scripts/check_kfile.py, scripts/fetch_manuals.py, scripts/gen_mesh.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/lsdyna-kfile/SKILL.md · 139 lines

How it starts

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

LS-DYNA K 文件编写与自动验证

交付物只能是经本机求解器实际计算验证的完整 k 文件和验证报告,不可“写完就交”。 以下把本文件所在目录称为 SKILL_DIR;脚本、知识、协议和模板分别位于 SKILL_DIR/scripts/SKILL_DIR/knowledge/SKILL_DIR/references/SKILL_DIR/templates/

1. 路由与环境

  • 模板制作模式:用户上传主 .k/.key/.dyn,明确说明其要作为某类模板,并要求抽象、整理、 参数化或沉淀。优先执行 references/template-authoring-protocol.md;先运行 python "SKILL_DIR/scripts/prepare_existing_deck.py" user_model.k --outdir template_build/<模板名称> --objective "制作 <模板用途> 模板", 将源文件和 include 闭包置于只读 source/,只在独立 working/(候选模板)与 validation/ 目录工作。 该模式必须先完成结构化分析和模板适用性判断;会影响模板物理、参数接口或验收结论的问题,整个请求 最多集中询问 5 个关键问题。问题未回答前不得抽象最终模板或进行最终 L2 验证;用户确认后才写入 template_spec.mdNOTES.md 和模板文件。来源 deck 的验证结果不可直接替代模板候选的重新验证。
  • 已有 deck 模式:用户提供主 .k/.key/.dyn 并要求修改、调试、运行或修复。跳过 §1 需求头脑风暴、 spec.md 确认、模板/基准/学术门和新建流程,执行 references/existing-deck-repair.md;仍须做 环境检查、knowledge/errors.md 预检、L0/L1/L2、§5 交付报告和经验追加。无 spec.md 时保持 原 deck 的物理意图,仅解决用户目标范围的问题。先运行 python "SKILL_DIR/scripts/prepare_existing_deck.py" user_model.k --objective "用户目标",不得直接修改原文件。
  • 新建 deck 模式:无可用主 deck 或要求重新建模,执行 §2-§5。

会话首次运行:

python "SKILL_DIR/scripts/kagent_config.py"

默认求解器为 C:\Program Files\ANSYS Inc\v242\ansys\bin\winx64(LS-DYNA R14.1.1);用 LSDYNA_BINLSDYNA_MPIEXEC~/.lsdyna-kagent.json 覆盖。不得使用 R14 之后才支持的关键字或字段。 凡标注 R15 及以上的功能一律回避。手册缺失时运行 python "SKILL_DIR/scripts/fetch_manuals.py"

2. 新建 deck:任务书与基准门

读取 references/brainstorm-protocol.md。它是 12 项收敛清单、6 类工况问题库、spec.md 模板、 模板适用性和文献/官方基准门的唯一细则。

  1. 缺 7 项关键输入(工况、目的/输出、几何/尺寸、材料、边界、初始条件、单位制)时,最多 5 轮、 每轮最多 4 个问题,按工况→物理→数值提问;给 2-4 个推荐选项。用户说“你定”时采用推荐值并标 [默认]。用户未指定单位制时默认 mm-ton-s 并声明;每轮做量级检查和收敛面板。
  2. 在选模板、生成网格、写任何卡前读取 knowledge/errors.md,将命中项写为预防检查;无命中也记录。 L0 前逐项核对;仅在新症状或预检未覆盖时重查。
  3. 完成模板适用性判断和基准方案。模板目录存在不等于模板可用:只有物理机制、建模方法、主要载荷/ 边界、关注输出均能支撑当前骨架时可用;否则是无适用模板。 无适用模板时,必须先完成 LS-DYNA 官方资料/官方算例检索和学术文献检索, 不得用普通网页搜索、既有经验或相邻模板直接替代该双链路; 触发学术检索时必须有 research/literature-evidence.json 和任务书文献摘要。爆炸焊接、界面波、飞板碰撞、爆轰耦合、 热-塑性-失效耦合且无专用模板时默认无适用模板。
  4. 模板速查:跌落 templates/drop/(mm-ton-s)、碰撞/压溃 templates/crash/(mm-ton-s)、侵彻 templates/penetration/(cm-g-us)、成形 templates/forming/(mm-ton-s)、ALE templates/ale/ (m-kg-s)、SPH templates/sph/(mm-kg-ms)。无相似案例时标 no-similar-case,按任务书的 M0~M3 阶梯:M0 最小模型→M1 材料→M2 相互作用→M3 完整模型逐步验证。M0 先过 L0/L1 并核对单位、时间步和运动 方向;M1 用单单元/简化试件核对本构、失效/EOS、趋势或标定点;M2 检查穿透、初始间隙、反力、 能量传递和约束;M3 每次只增加一类复杂度并重跑 L0/L1,全部集成后才做 L2。关键无证据参数需给出 范围并做敏感性分析,报告参数区间、响应区间和结论稳定性。
  5. 将完整任务书写为工作目录 spec.md,状态“待用户确认”,展示内容和路径并问“按此任务书执行?”。 在收到用户明确同意前停止:不得生成、复制、修改或运行任何最终 .k 文件、网格 include 或写卡脚本, 也不得进入资料补全或生成阶段。 修改请求只更新 spec.md 后重新确认;同意后标“已确认(日期)”。 这是全流程唯一一次强制确认。无人值守才可不阻塞,所有缺项标 [假设] 并在最终报告显著提示。

Read the full file on GitHub · 139 lines

Files

What ships with it

60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago First seen · 139 lines · 106 tokens per session scan A 0a5a2c94307f

Subscribe to this mod's changes

lsdyna-kfile is a skill published in the GitHub repository LLK-LL/K-agent (10 stars, last pushed 1mo ago), licensed MIT. It adds 106 tokens to every session and 3,211 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-31.