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/benchflow-ai/skillsbench/pid-controllernpx skills add benchflow-ai/skillsbench --skill pid-controllergit clone --depth 1 https://github.com/benchflow-ai/skillsbenchWrote 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/benchflow-ai/skillsbench/pid-controller)<a href="https://agentmods.dev/skills/benchflow-ai/skillsbench/pid-controller"><img src="https://agentmods.dev/badge/skills/benchflow-ai/skillsbench/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 4d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- pid-controller — 100% identical, 0 lines differ
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.
- 4d ago First seen · 88 lines · 39 tokens per session scan A d274422849bf
pid-controller is a skill published in the GitHub repository benchflow-ai/skillsbench (1,745 stars, last pushed 1mo ago), licensed Apache-2.0. 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. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
hotpath_init
Configure hotpath profiling in a Rust project. Adds the hotpath dependency with feature-gated setup, instruments main with hotpath::main, functions with measure/measureall, and wraps channels, mutexes, rwlocks, streams, futures, reqwest clients, axum routers and byte-level I/O with hotpath macros. Use when the user…
writing-bench-task-judge
Use when writing or modifying checkgoals() / getanswer() / App check methods in benchenv/task/, or when reviewing a draft task's judge correctness. Triggers include adding a new task, editing a judge method, or diagnosing a judge false-positive/negative.
portfolio
Cross-chain DeFi portfolio discovery, rebalancing suggestions, and NEAR Intent construction. Activates when the user pastes a wallet address or asks about yield/positions/rebalancing. Bootstraps a per-user "portfolio" project, aggregates positions across all the user's addresses inside one project, and offers a…
llm-council
Query multiple LLM models in parallel from CodeAct and cross-reference their responses.
environment-discovery
Systematic exploration of unknown environments before starting work.
benchflow-traj-upload
Find a local Claude Code or Codex session, open the BenchFlow trajectory viewer, and submit it after the user reviews it. Use this skill whenever someone pastes a BenchFlow eval prize line, wants to submit / share / contribute / upload a trajectory, set up traj upload, view a session, or pick a session to send. Also…