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.
npx agentmods add skills/xuansenpa1/skillrevise/pid-controllernpx skills add xuansenpa1/skillrevise --skill pid-controllergit clone --depth 1 https://github.com/xuansenpa1/skillreviseWrote 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.
[](https://agentmods.dev/skills/xuansenpa1/skillrevise/pid-controller)<a href="https://agentmods.dev/skills/xuansenpa1/skillrevise/pid-controller"><img src="https://agentmods.dev/badge/skills/xuansenpa1/skillrevise/pid-controller.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00039 | $0.00640 |
| Opus 5 | $0.00019 | $0.00320 |
| Sonnet 5 | $0.00008 | $0.00128 |
| Haiku 4.5 | $0.00004 | $0.00064 |
Grade A, and why
pid-controller 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 5d 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.
This is a copy
100% identical to pid-controller — 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.
How it starts
The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PID Controller Implementation
Overview
A PID (Proportional-Integral-Derivative) controller is a feedback control mechanism used in industrial control systems. It continuously calculates an error value and applies a correction based on proportional, integral, and derivative terms.
Control Law
output = Kp * error + Ki * integral(error) + Kd * derivative(error)
Where:
error= setpoint - measured_valueKp= proportional gain (reacts to current error)Ki= integral gain (reacts to accumulated error)Kd= derivative gain (reacts to rate of change)
Discrete-Time Implementation
class PIDController:
def __init__(self, kp, ki, kd, output_min=None, output_max=None):
self.kp = kp
self.ki = ki
self.kd = kd
self.output_min = output_min
self.output_max = output_max
self.integral = 0.0
self.prev_error = 0.0
def reset(self):
"""Clear controller state."""
self.integral = 0.0
self.prev_error = 0.0
def compute(self, error, dt):
"""Compute control output given error and timestep."""
# Proportional term
p_term = self.kp * error
# Integral term
self.integral += error * dt
i_term = self.ki * self.integral
# Derivative term
derivative = (error - self.prev_error) / dt if dt > 0 else 0.0
d_term = self.kd * derivative
self.prev_error = error
# Total output
output = p_term + i_term + d_term
# Output clamping (optional)
if self.output_min is not None:
output = max(output, self.output_min)
if self.output_max is not None:
output = min(output, self.output_max)
return output
Anti-Windup
Integral windup occurs when output saturates but integral keeps accumulating. Solutions:
- Clamping: Limit integral term magnitude
- Conditional Integration: Only integrate when not saturated
- Back-calculation: Reduce integral when output is clamped
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.
- 5d ago First seen · 88 lines · 39 tokens per session scan A d274422849bf
pid-controller is a skill published in the GitHub repository xuansenpa1/skillrevise (55 stars, last pushed 2mo ago), licensed MIT. It adds 39 tokens to every session and 640 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to pid-controller, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
jupyter-notebook
Iterative Python via live Jupyter kernel (hamelnb).
bioservices
Unified Python interface to 40+ bioinformatics services. Use when querying multiple databases (UniProt, KEGG, ChEMBL, Reactome) in a single workflow with consistent API. Best for cross-database analysis, ID mapping across services. For quick single-database lookups use gget; for sequence/file manipulation use…
biology-biopython
Bioinformatics with Biopython for sequence manipulation, file parsing, BLAST, and phylogenetics. Use when working with DNA/RNA/protein sequences or biological databases.
cuopt-numerical-optimization-api
LP, MILP, and QP (beta) with cuOpt — Python, C, and CLI. Use when the user is solving LP, MILP, or QP with any cuOpt interface.
rocm-kernels
Provides guidance for writing and benchmarking optimized Triton kernels for AMD GPUs (MI355X, R9700) on ROCm, targeting HuggingFace diffusers (LTX-Video, SD3, FLUX) and transformers. Core kernels: RMSNorm, RoPE 3D, GEGLU, AdaLN. Includes XCD swizzle, autotune, diffusers integration patterns, and LTX-Video pipeline…
flydsl-kernel-code-cleanup
Modernize FlyDSL kernels: replace raw MLIR dialects (arith, scf, vector, llvm, memref, math), ArithValue, redundant fx. wrapping, fx.Index, bufferops, SmemPtr/SmemAllocator, copyatomcall/mmaatomcall (loop or single atom), and raw rocdl.mfma with the current fx. surface (fx types, Python control flow, makebuffertensor…