Local Command Filtering Tool 'stuntd' Released for Claude Code
Key point
A tool named 'stuntd' for Claude Code has been released, which determines command permissions locally without API calls.
Details
A local filtering tool named stuntd has been released to reduce paid API calls incurred with each tool use in Claude Code and to block dangerous commands (such as rm -rf). The tool consists of a 20-line PreToolUse hook and a local daemon, utilizing an open-weight decision-making model called Laya to determine whether to allow, ask, or deny a command.
Performance and Features
- Improved Accuracy: The rule matching rate of the Laya model was 45% in a zero-shot state, but rose to 97% after training on 3,000 labeled commands.
- Automation and Speed: The trained model handles 96% of commands autonomously, with a latency of approximately 20ms per decision on a laptop GPU.
- Limitations: Free text generation and cross-field operations are not supported; only word-based decision-making is possible.
Installation and Usage
It can be installed in a Python 3.10+ environment using pip install "stuntd[train]" and is released under the Apache-2.0 license. The daemon optimizes performance by training a small head based on the user's decisions.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.