Record concise ADRs that preserve the user's decisions without conversational noise. Use for "adr-verbatim", "new ADR", "document that as an ADR", "record this decision", or supplied ADR wording.
日本語の概要は準備中です。原文の説明を表示しています。
Set up read-only PostgreSQL access for agents. Use only when the user explicitly invokes /create-readonly-db-role.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Prepare a SELECT-only role and protected connection. The SQL, role name, grants, denylist, RLS setting, timeouts, and connection steps are examples to adapt to your system, not live production configuration.
public, including future tables through default privileges, then revoke denylisted tables. Never grant the auth schema. New sensitive tables need a manual revoke.default_transaction_read_only = on and a short statement_timeout suited to the workload.RLS: tables may return no rows when the role has no applicable policy. Consider bypassrls only if it fits your security model: it skips row filtering, while grants and the denylist still apply.
select rolname from pg_roles where rolname = 'agent_reader';. Use your chosen name; if it exists, update rather than recreate it.docs/database/create-agent-reader-role.sql. Comment what changes, why, and how to apply, verify, and revert. Chat-only SQL is insufficient.<role>.<project-ref> on port 5432. Install psql if missing (Homebrew libpq on macOS).-- Example only. Rename the role, timeout, and denylist for your system.
-- 1. role + soft guardrails
create role agent_reader with login password 'REPLACE_ME';
alter role agent_reader set default_transaction_read_only = on;
alter role agent_reader set statement_timeout = '10s'; -- example timeout; change as needed
-- 2. SELECT-only grants, denylist model
grant usage on schema public to agent_reader;
grant select on all tables in schema public to agent_reader;
alter default privileges for role postgres in schema public
grant select on tables to agent_reader; -- future tables auto-readable
-- 3. denylist: keep secrets and PII invisible (replace with your own tables)
revoke select on table public.secrets from agent_reader;
revoke select on table public.private_events from agent_reader;
-- 4. only if RLS is enabled, no policy covers this role, and bypass fits your model
alter role agent_reader bypassrls;
Revert: drop owned by agent_reader; drop role agent_reader;
All checks must pass before declaring done:
# Load the connection URL from your secret manager or local environment configuration.
psql "<readonly-connection-url>" -X -c "select current_user;" # -> agent_reader
psql "<readonly-connection-url>" -X -c "show statement_timeout;" # -> matches your chosen timeout
psql "<readonly-connection-url>" -X -c "select count(*) from public.<big_table>;" # -> real number, NOT 0
psql "<readonly-connection-url>" -X -c "delete from public.<any_table> where false;"
# -> ERROR: read-only transaction (soft guardrail)
psql "<readonly-connection-url>" -X -c "begin; set transaction read write; delete from public.<any_table> where false; rollback;"
# -> ERROR: permission denied (the hard wall)
psql "<readonly-connection-url>" -X -c "select * from public.<denylisted> limit 1;" # -> ERROR: permission denied
psql "<readonly-connection-url>" -X -c "select * from auth.<identity_table> limit 1;" # -> ERROR: permission denied
Verify both protections: writes fail under the read-only guardrail, and fail with permission denied when it is off. If any check fails, correct the configuration through the human and rerun all checks.
bypassrls only if appropriate.<role>.<project-ref>.revoke select to the denylist.alter role agent_reader with password '...' and update the stored connection secret.まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Record concise ADRs that preserve the user's decisions without conversational noise. Use for "adr-verbatim", "new ADR", "document that as an ADR", "record this decision", or supplied ADR wording.
日本語の概要は準備中です。原文の説明を表示しています。
Keep a Mac awake for a set duration or while a process runs. Use only when the user explicitly invokes /anti-sleep.
日本語の概要は準備中です。原文の説明を表示しています。
Clarify a feature, change, or refactor through questions, then write a build prompt for another agent. Use for /ask-then-build or requests to ask questions before producing an implementation prompt.
日本語の概要は準備中です。原文の説明を表示しています。
Use this when controlling bb. The bb CLI inspects and manages threads, environments, projects, machines, providers, skills, plugins, settings, terminals, and other BB services.
日本語の概要は準備中です。原文の説明を表示しています。
Build, install, and debug bb plugins. Use when the user wants a bb plugin, a sidebar panel, a bb CLI subcommand, an agent tool, a theme, a provider, or to extend bb itself. For running threads and the core bb CLI, use bb-cli instead.
日本語の概要は準備中です。原文の説明を表示しています。
Fire the moment the user proposes a build. Instantly surface the 1-3 consequential choices hidden in their idea. Can also be invoked with /before-building.
日本語の概要は準備中です。原文の説明を表示しています。