Set up Rolebook
The rolebook-setup agent skill.
Adds Rolebook authorization to a Next.js or Hono app in TypeScript: a policy file, a session-to-binding loader, trusted resource loaders, and server-side permission checks on routes. Use when the user asks to add Rolebook, add roles or permissions, protect routes or server actions, or check who may read or change a record.
Skill name: rolebook-setup. Ask your agent for the task in your own words, or invoke the skill by name where your tool supports it.
Packages it needs
| Requirement | Package and supported versions |
|---|---|
| Always | rolebook >=4.0.0 <5.0.0 |
The skill checks the installed versions against these ranges before it uses each part, and stops rather than up- or downgrading without your consent.
What it does
- Before you start
- Find the framework
- Agree the model with the user
- Write the policy
- Load assignments
- Load trusted resources
- Protect the routes
- Test it
- Check your work
Reference files
The skill loads these files from its references/ folder when a step needs them:
assignments.mdhono.mdnextjs.mdresources.mdsecurity-rules.md