first-order-model-fitting

first-order-model-fitting is a skill for Claude Code, Codex from xuansenpa1/skillrevise. It costs 29 tokens per session (717 once invoked), scanned A, a copy of first-order-model-fitting, MIT.

A method for fitting a first-order dynamic model to step-response measurements and finding its gain and time constant. A step response records how a system changes after its input suddenly changes.

In plain words
What is it for?
It is for estimating parameters from thermal, electrical, or mechanical experiments and preparing a model for control design.
Why use it?
It turns experimental measurements into a simple model that describes how strongly and how quickly a system responds.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for estimating parameters from thermal, electrical, or mechanical experiments and preparing a model for control design.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xuansenpa1/skillrevise/first-order-model-fitting
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 xuansenpa1/skillrevise --skill first-order-model-fitting
Clone the repo
git clone --depth 1 https://github.com/xuansenpa1/skillrevise

Made for: Claude Code, Codex.

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 first-order-model-fitting

README.md
[![agentmods](https://agentmods.dev/badge/skills/xuansenpa1/skillrevise/first-order-model-fitting/github.svg)](https://agentmods.dev/skills/xuansenpa1/skillrevise/first-order-model-fitting)
Your own site
<a href="https://agentmods.dev/skills/xuansenpa1/skillrevise/first-order-model-fitting"><img src="https://agentmods.dev/badge/skills/xuansenpa1/skillrevise/first-order-model-fitting/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 first-order-model-fitting

Your own site · 80×15
<a href="https://agentmods.dev/skills/xuansenpa1/skillrevise/first-order-model-fitting"><img src="https://agentmods.dev/badge/skills/xuansenpa1/skillrevise/first-order-model-fitting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 717 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 100% copy Near-identical to another mod 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.00029 $0.00717
Opus 5.5 $0.00012 $0.00287
Sonnet 5.5 $0.00006 $0.00143
Haiku 4.5 $0.00003 $0.00072

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

Security

Grade A, and why

first-order-model-fitting 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 2mo 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.

Origin

This is a copy

100% identical to first-order-model-fitting — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

data/skillsbench/tasks/hvac-control/environment/skills/first-order-model-fitting/SKILL.md · 100 lines

How it starts

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

First-Order System Model Fitting

Overview

Many physical systems (thermal, electrical, mechanical) exhibit first-order dynamics. This skill explains the mathematical model and how to extract parameters from experimental data.

The First-Order Model

The dynamics are described by:

tau * dy/dt + y = y_ambient + K * u

Where:

  • y = output variable (e.g., temperature, voltage, position)
  • u = input variable (e.g., power, current, force)
  • K = process gain (output change per unit input at steady state)
  • tau = time constant (seconds) - characterizes response speed
  • y_ambient = baseline/ambient value

Step Response Formula

When you apply a step input from 0 to u, the output follows:

y(t) = y_ambient + K * u * (1 - exp(-t/tau))

This is the key equation for fitting.

Extracting Parameters

Process Gain (K)

At steady state (t -> infinity), the exponential term goes to zero:

y_steady = y_ambient + K * u

Therefore:

K = (y_steady - y_ambient) / u

Time Constant (tau)

The time constant can be found from the 63.2% rise point:

At t = tau:

y(tau) = y_ambient + K*u*(1 - exp(-1))
       = y_ambient + 0.632 * (y_steady - y_ambient)

So tau is the time to reach 63.2% of the final output change.

Model Function for Curve Fitting

def step_response(t, K, tau, y_ambient, u):
    """First-order step response model."""
    return y_ambient + K * u * (1 - np.exp(-t / tau))

When fitting, you typically fix y_ambient (from initial reading) and u (known input), leaving only K and tau as unknowns:

def model(t, K, tau):
    return y_ambient + K * u * (1 - np.exp(-t / tau))

Practical Tips

  1. Use rising portion data: The step response formula applies during the transient phase
  2. Exclude initial flat region: Start your fit from when the input changes
  3. Handle noisy data: Fitting naturally averages out measurement noise
  4. Check units: Ensure K has correct units (output units / input units)

Read the full file on GitHub · 100 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. 2mo ago First seen · 100 lines · 29 tokens per session scan A 96c792fe902e

Subscribe to this mod's changes

first-order-model-fitting is a skill published in the GitHub repository xuansenpa1/skillrevise (58 stars, last pushed 2mo ago), licensed MIT. It adds 29 tokens to every session and 717 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to first-order-model-fitting, differing in 0 lines, and is treated as a copy.

Related

first-order-model-fitting compared with skills from other repositories

first-order-model-fitting next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
first-order-model-fittingxuansenpa1/skillreviseSkill582mo agoMITA29Claude Code, Codex
instrument-data-to-allotropeanthropics/knowledge-work-pluginsSkill37k4d agoApache-2.0A123Claude Code
matlabK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA44Claude Code
exploratory-data-analysisK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA83Claude Code
phylogeneticsK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA71Claude Code, Codex
research-engineerdavila7/claude-code-templatesSkill34ktodayMITA43Claude Code, Codex
mapping-to-snomedmaziyarpanahi/openmedSkill5.9ktodayApache-2.0A205Claude Code