SkillAgentSearch skills...

Restrict

A command-line tool to restrict resource usage of other programs.

Install / Use

/learn @frelon/Restrict
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Restrict

This is a small wrapper program to restrict a commands resource usage.

It wraps an arbitrary subcommand in a new shell with stdin, stdout and stderr inherited and adds the child pid to a cgroup with the specified resource restrictions.

$ cargo build --release
$ sudo ./target/release/restrict -d -m 100M -c 10 -- 'echo test1 && sleep 1 && echo test2'
run command /bin/bash -c 'echo test1 && sleep 1 && echo test2'
        cgroup restrict-7415
        cpu    restricted to  10 shares
        memory restricted to  100.0 MB
test1
test2
command exited with status exit status: 0
View on GitHub
GitHub Stars4
CategoryDevelopment
Updated4mo ago
Forks0

Languages

Rust

Security Score

87/100

Audited on Nov 10, 2025

No findings