Skip to content

[Resource]: shared-brain (brain guard) #727

@yurukusa

Description

@yurukusa

Display Name

shared-brain (brain guard)

Category

Tooling

Sub-Category

Tooling: Usage Monitors

Primary Link

https://github.com/yurukusa/shared-brain

Author Name

yurukusa

Author Link

https://github.com/yurukusa

License

MIT

Other License

No response

Description

shared-brain is a CLI tool that turns lessons into code and checks risky commands before execution.
It matches commands against a YAML lesson library and shows a checklist when a match is found. It can
be installed as a Claude Code PreToolUse hook to reduce repeated mistakes.

Validate Claims

  1. Install:
    pip install shared-brain

  2. Create a lesson file (YAML) and add a trigger for a risky operation, e.g. curl PUT:
    ~/.brain/lessons/api-put-safety.yaml

  3. Run a guard check:
    brain guard "curl -X PUT https://api.example.com/articles/123"

Expected result:

  • brain guard prints the lesson text + checklist, and asks for explicit confirmation before
    proceeding.

(Optional: Claude Code integration)

  • Install as a PreToolUse hook and run the same command inside Claude Code:
    brain hook install

Specific Task(s)

Install shared-brain, add a lesson that triggers on curl PUT, then run brain guard against a sample
PUT command and confirm it shows the checklist and requires acknowledgment.

Specific Prompt(s)

  1. Install shared-brain.
  2. Create a new lesson YAML in ~/.brain/lessons/ that triggers on "curl.*-X PUT" and includes a
    checklist "GET current state", "PUT full body", "verify result".
  3. Run: brain guard "curl -X PUT https://api.example.com/articles/123"
  4. Show the output and explain how this prevents repeating the same mistake.

Additional Comments

This tool does not perform network requests by itself; it only inspects the command string you are
about to run. Any network access depends on the user’s command (e.g., curl). It is designed to
prevent repeated operational mistakes by forcing a checklist at execution time.

Recommendation Checklist

  • I have checked that this resource hasn't already been submitted
  • My resource provides genuine value to Claude Code users, and any risks are clearly stated
  • All provided links are working and publicly accessible
  • I am submitting only ONE resource in this issue
  • I understand that low-quality or duplicate submissions may be rejected

Metadata

Metadata

Assignees

No one assigned

    Labels

    resource-submissionThis Issue submits a new resource to the listvalidation-passedResource has passed initial validation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions