alizainx/intelligence-systems-skills/control-barrier-functions-qp-shield
Claude Code and agent skill by alizainx/intelligence-systems-skills
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Control Barrier Functions (CBF), Exponential/High-Order CBFs (HOCBF) for relative degree $r \ge 2$, CLF-CBF-QP runtime safety shields, and reachability sets.
Install
npx vskill@latest install alizainx/intelligence-systems-skills/control-barrier-functions-qp-shieldSKILL.md
The same SKILL.md was published earlier as alizainx/intelligence-systems-skills/control-barrier-functions-qp-shield.
control-barrier-functions-qp-shield (ISS-159)
1. First-Principles Invariant
- Ames Forward-Invariance Safety-Shield Law: Given safe set $\mathcal{C} = \{x \in \mathbb{R}^n : h(x) \ge 0\}$ and control-affine dynamics $\dot{x} = f(x) + g(x)u$, any Lipschitz control $u^*(x) = \arg\min_{u \in \mathcal{U}} \|u - u_{\text{nom}}(x)\|_2^2$ subject to the linear inequality $L_f h(x) + L_g h(x) u + \alpha(h(x)) \ge 0$ renders $\mathcal{C}$ strictly forward-invariant ($x(0) \in \mathcal{C} \implies x(t) \in \mathcal{C}\; \forall t \ge 0$) while modifying nominal/RL commands $u_{\text{nom}}$ minimally.
2. Fast-Pass Low-Token Protocol (Web & Coding Agents)
- For position obstacles with acceleration/force inputs (relative degree $r = 2$, where $L_g h(x) = 0$), use an Exponential Control Barrier Function (
ECBF/HOCBF): $\psi_1(x) = \dot{h}(x) + \gamma_1 h(x) \ge 0$ and $\dot{\psi}_1(x, u) + \gamma_2 \psi_1(x) = L_f^2 h + L_g L_f h u + (\gamma_1 + \gamma_2) L_f h + \gamma_1 \gamma_2 h \ge 0$.
3. Zero-Bug & Zero-Vulnerability Guards
- Keep the CBF barrier constraint strictly hard while relaxing the Control Lyapunov Function (
CLF: $L_f V + L_g V u + c V \le \delta$) with a slack variable $\delta$ so safety ($h(x) \ge 0$) NEVER loses a conflict against goal tracking ($V(x) \to 0$). - Account for bounded actuator limits $u \in [u_{\min}, u_{\max}]$ inside the barrier function design (e.g., braking-distance barrier $h(x) = d - \frac{v_{\text{rel}}^2}{2 a_{\max}}$) so the CBF-QP stays feasible inside $\mathcal{U}$.
- In discrete-time digital controllers ($x_{k+1} = F(x_k, u_k)$), enforce the discrete CBF condition $\Delta h(x_k, u_k) = h(x_{k+1}) - h(x_k) \ge -\gamma h(x_k)$ with $0 < \gamma \le 1$.
- Provide an explicit emergency braking fallback ($u_{\text{brake}}$) if multiple simultaneous obstacle CBF half-spaces become mutually infeasible under actuator saturation.
- Verify $h(x_k) \ge 0$ across 100% of simulated steps when shielding adversarial or random nominal inputs $u_{\text{nom}}$.
4. Verification Gate
python3 -c 'import numpy as np; ...'
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/control-barrier-functions-qp-shield/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/alizainx/intelligence-systems-skills/control-barrier-functions-qp-shield)