Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →RBAC, permissions, access control.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | -41% | 0% |
| case-01 | ✗→✓ | ▲ Improved | -32% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -26% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -36% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -10% | 0% |
php<?php enum Role: string { case ADMIN = 'admin'; case USER = 'user'; case GUEST = 'guest'; } class User extends Entity { public function hasRole(Role $role): bool { return $this->role === $role->value; } public function can(string $permission): bool { return in_array($permission, $this->permissions ?? []); } }
php<?php class PermissionFilter implements FilterInterface { public function before(RequestInterface $request, $arguments = null) { $permission = $arguments[0] ?? null; $user = auth()->user(); if (!$user || !$user->can($permission)) { return Services::response() ->setJSON(['error' => 'Forbidden']) ->setStatusCode(403); } } }
Other measured skills in the registry, with their headline benchmark lift.