How the gate works
Before every tool call, Claude Code runs the hook and passes it the call as JSON. paws reads every rule in scope fresh, so an edit to a rule applies to the next call. It keeps the rules whose event, matcher and when conditions match, and checks the session transcript for each rule's skill.
- Every skill already loaded: the call goes through.
- Some missing: paws denies the call with one message naming every missing skill, so one load and retry clears them all.
- No rule matches: the call goes through and the log records no rule.
paws never gates the Skill tool, even under a rule that matches every tool. Gating it would block the call that loads the skill.
When a skill counts as loaded
A skill counts as loaded when Claude invoked it with the Skill tool, the tool reported success, and that happened within the last 20 agent turns of the main conversation. These don't count:
- loading a different skill;
- a Skill call that failed;
- command output that prints text like "Launching skill: humanizer";
- a load inside a subagent, for calls in the main conversation.
Compaction and resume
A compaction drops the skill's text from Claude's context, so paws starts over. The next gated call is denied once more and Claude reloads the skill. Resuming a session where the skill was loaded doesn't cause a new deny.
Subagents
paws gates a subagent's own tool calls like any other, and the audit log records the subagent's id. The agent-count>N condition can also hold a call back once the main agent has spawned more than N subagents since your last prompt.
Fail open, fail closed
| Situation | What paws does |
|---|---|
| A rule file doesn't parse | Skips that file and Claude Code shows a one-line notice. Other rules still apply. |
| paws hits an internal error, or can't read the hook input | Allows the call. |
| The portal is down, or you're offline | Nothing changes. The gate never uses the network. |
| The session has no transcript | Treats every skill as not loaded, so a matching rule denies. |
| A rule names a skill that isn't installed | Keeps denying, because the skill may come from a plugin paws can't see. Install the skill or remove the rule. |