Agent skill

Pid Controller

by benchflow-ai in benchflow-ai/skillsbench

A skill your agent uses when implementing PID control loops for adaptive cruise control, vehicle speed regulation, throttle/brake management, or any feedback control system requiring…

Apache-2.0Auto-check passed

Install Pid Controller

skills CLI
$ npx skills add benchflow-ai/skillsbench --skill pid-controller -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install benchflow-ai/skillsbench pid-controller --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .claude/skills && cp -r skills-src/tasks/adaptive-cruise-control/environment/skills/pid-controller .claude/skills/pid-controller && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pid-controller
GitHub stars
1.8k
Token cost
~673 tokens
SKILL.md length
153 words
Files
1
Skills in repo
180
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses when implementing PID control loops for adaptive cruise control, vehicle speed regulation, throttle/brake management, or any feedback control system requiring…

  • Works in 3 steps: Clamping: Limit integral term magnitude → Conditional Integration: Only integrate… → Back-calculation: Reduce integral when…
  • Implementing PID control loops for adaptive cruise control
  • SKILL.md covers Overview, Control Law, Discrete-Time Implementation and Anti-Windup, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Pid Controller is an agent skill from benchflow-ai/skillsbench. Use this skill when implementing PID control loops for adaptive cruise control, vehicle speed regulation, throttle/brake management, or any feedback control system requiring proportional-integral-derivative control.

Its SKILL.md is about 670 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: SkillsBench evaluates how well skills work and how effective agents are at using them. The licence is Apache-2.0.

When your agent uses it

  • Implementing PID control loops for adaptive cruise control
  • Vehicle speed regulation
  • Throttle/brake management
  • Any feedback control system requiring proportional-integral-derivative control

Example prompts

  • “/pid-controller”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Clamping: Limit integral term magnitude
  2. Conditional Integration: Only integrate when not saturated
  3. Back-calculation: Reduce integral when output is clamped

What it can do on your machine

Read from SKILL.md and the folder at commit 9a1f4dd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pid Controller loads about 673 tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 153 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~673

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from benchflow-ai/skillsbench at commit 9a1f4dd, republished under its Apache-2.0 licence (© benchflow-ai). 153 words, ~673 tokens.

Download SKILL.mdSave it as .claude/skills/pid-controller/SKILL.md (or your agent's skills folder).
name
pid-controller
description
Use this skill when implementing PID control loops for adaptive cruise control, vehicle speed regulation, throttle/brake management, or any feedback control system requiring proportional-integral-derivative control.

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_value
  • Kp = proportional gain (reacts to current error)
  • Ki = integral gain (reacts to accumulated error)
  • Kd = derivative gain (reacts to rate of change)

Discrete-Time Implementation

python
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:

  1. Clamping: Limit integral term magnitude
  2. Conditional Integration: Only integrate when not saturated
  3. Back-calculation: Reduce integral when output is clamped

Tuning Guidelines

Manual Tuning:

  1. Set Ki = Kd = 0
  2. Increase Kp until acceptable response speed
  3. Add Ki to eliminate steady-state error
  4. Add Kd to reduce overshoot

Effect of Each Gain:

  • Higher Kp -> faster response, more overshoot
  • Higher Ki -> eliminates steady-state error, can cause oscillation
  • Higher Kd -> reduces overshoot, sensitive to noise

© benchflow-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in tasks/adaptive-cruise-control/environment/skills/pid-controller of benchflow-ai/skillsbench.

Open the folder on GitHubat commit 9a1f4dd

Compare with similar skills

Pid Controller next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pid Controller compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pid Controller this skillbenchflow-ai/skillsbench1.8k—~673Automated safety check: PassApache-2.0
Loopalirezarezvani/claude-skills28k2 repos~1.1kAutomated safety check: PassMIT
Autonomous Loopsaffaan-m/ECC274k4 repos~5.8kAutomated safety check: PassMIT
Loopasgeirtj/system_prompts_leaks69k—~2.2kAutomated safety check: WarnCC0-1.0
Loop Design Checkaffaan-m/ECC274k1 repos~2.9kAutomated safety check: PassMIT
Loop Libraryalirezarezvani/claude-skills28k—~2.9kAutomated safety check: PassMIT

Similar skills

  • Loop

    alirezarezvani/claude-skills

    Start an autonomous experiment loop with user-selected interval (10min, 1h, daily, weekly, monthly).

    28k GitHub starsUsed in 2 repos~1.1k tokens
    Agent WorkflowsAuto-check passed
  • Autonomous Loops

    affaan-m/ECC

    Patterns and architectures for autonomous Claude Code loops — from simple sequential pipelines to RFC-driven multi-agent DAG systems.

    274k GitHub starsUsed in 4 repos~5.8k tokens
    Agent WorkflowsAuto-check passed
  • Loop

    asgeirtj/system_prompts_leaks

    Run a prompt or slash command on a recurring interval (e.g. An agent skill from asgeirtj/system_prompts_leaks.

    69k GitHub stars~2.2k tokensUpdated yesterday
    Agent WorkflowsAuto-check: warnings
  • Loop Design Check

    affaan-m/ECC

    Design a goal-oriented agent loop or review one for failure modes: spinning, Goodhart-gaming the verifier, or running a wrong answer to completion.

    274k GitHub starsUsed in 1 repo~2.9k tokens
    Agent WorkflowsAuto-check passed
  • Loop Library

    alirezarezvani/claude-skills

    Discover, find, compare, audit, repair, adapt, and design repeatable AI-agent loops with explicit triggers, actions, verification, stopping conditions, guardrails, and handoffs.

    28k GitHub stars~2.9k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Recurring Prompt Loop

    QwenLM/qwen-code

    Runs a prompt now and repeats it on a fixed interval or through self-paced wakeups, with subcommands to list or clear scheduled loop jobs.

    28k GitHub stars~2.5k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from benchflow-ai/skillsbench

All 180 skills in this repo
  • Lean4 Memories

    benchflow-ai/skillsbench

    This skill should be used when working on Lean 4 formalization projects to maintain persistent memory of successful proof patterns, failed approaches, project conventions, and user preferences…

    1.8k GitHub stars~3.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Senior Data Engineer

    benchflow-ai/skillsbench

    World-class data engineering skill for building scalable data pipelines, ETL/ELT systems, real-time streaming, and data infrastructure.

    1.8k GitHub stars~5.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Ac Branch Pi Model

    benchflow-ai/skillsbench

    AC branch pi-model power flow equations (P/Q and |S|) with transformer tap ratio and phase shift, matching acopf-math-model.md and MATPOWER branch fields.

    1.8k GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Civ6lib

    benchflow-ai/skillsbench

    Civilization 6 district mechanics library. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed
  • D3 Visualization

    benchflow-ai/skillsbench

    Build deterministic, verifiable data visualizations with D3.js (v6).

    1.8k GitHub stars~1.5k tokensUpdated 2 mo ago
    Auto-check passed
  • Dc Power Flow

    benchflow-ai/skillsbench

    DC power flow analysis for power systems. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~717 tokensUpdated 2 mo ago
    Auto-check passed

Questions about Pid Controller

What does Pid Controller do?

A skill your agent uses when implementing PID control loops for adaptive cruise control, vehicle speed regulation, throttle/brake management, or any feedback control system requiring…. Pid Controller is an agent skill from benchflow-ai/skillsbench. Use this skill when implementing PID control loops for adaptive cruise control, vehicle speed regulation, throttle/brake management, or any feedback control system requiring proportional-integral-derivative control.

When should I use Pid Controller?

Pid Controller fits situations like: implementing PID control loops for adaptive cruise control; vehicle speed regulation; throttle/brake management; any feedback control system requiring proportional-integral-derivative control.

How do I install Pid Controller in Claude Code?

Run `npx skills add benchflow-ai/skillsbench --skill pid-controller -a claude-code`. Or copy the skill folder (tasks/adaptive-cruise-control/environment/skills/pid-controller in benchflow-ai/skillsbench) into .claude/skills/pid-controller in your project. Claude Code loads it when a task matches its description.

How do I install Pid Controller in Codex?

Run `npx skills add benchflow-ai/skillsbench --skill pid-controller -a codex`. Or copy the skill folder (tasks/adaptive-cruise-control/environment/skills/pid-controller in benchflow-ai/skillsbench) into .agents/skills/pid-controller in your project. Codex loads it when a task matches its description.

Can I use Pid Controller in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add benchflow-ai/skillsbench --skill pid-controller -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pid-controller, .gemini/skills/pid-controller, .github/skills/pid-controller and .opencode/skills/pid-controller in your project.

What does Pid Controller need to run?

SKILL.md names no scripts, command-line tools or credentials: Pid Controller is instructions for the agent only. Our summary lists: Python 3.

Does Pid Controller access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Pid Controller safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pid Controller use?

Pid Controller is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pid Controller use?

About 673 tokens (SKILL.md is roughly 2.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Pid Controller?

Skills that share tags, products or a category with Pid Controller: Loop (alirezarezvani/claude-skills, 28k stars), Autonomous Loops (affaan-m/ECC, 274k stars), Loop (asgeirtj/system_prompts_leaks, 69k stars) and Loop Design Check (affaan-m/ECC, 274k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pid Controller?

benchflow-ai (a GitHub organization) maintains it in benchflow-ai/skillsbench, which has 1,832 GitHub stars. The repository holds 180 skills in this directory. The repository was last updated on July 23, 2026.

Source: benchflow-ai/skillsbench on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.