Skip to main content

Set up Shaka for your team

Set up shared settings so people working in the same repository use the same checks, reviewers, and merge choices. Use one Shaka installation across projects; each repository keeps its own settings.

To try Shaka on your own first, choose Just for me in Start here.

Examples use /shaka. In Codex, use $shaka instead.

Required checks​

Shaka uses the checks GitHub requires for the branch a PR targets. If GitHub requires none, the agent can suggest checks to require in Shaka settings. Shaka waits for those checks on tasks using those settings, including an explicit preview. GitHub does not enforce that separate list when you merge there yourself.

You can use Ask without a required check. auto needs at least one. See required-check settings and what happens if a check already fails.

Set up​

Ask your agent:

/shaka Set up Shaka for my team in this repository

The agent finds your existing checks, explains reviewer choices, and prepares a separate setup PR. The handoff includes a prompt you can paste into a fresh chat to try the open PR on a separate task. Each trial uses Ask. Edit the setup PR and reuse the prompt on a new task to try the updated settings. Trials use commands available on the task branch. Hosted workflows added by the setup PR become available when the task branch includes them.

Review and merge the first setup PR yourself on GitHub under the existing branch protection. After it merges, ordinary new tasks use the shared settings.

For later changes, use Choose your settings. See the built-in defaults and Shaka's own overrides for a working example.

Files the agent prepares​

FilePurpose
.agents/shaka/config.ymlYour team's checks, reviewer choices, and merge settings
.agents/shaka/bin/Scripts that connect Shaka to your existing setup and checks
.agents/shaka.mdA pointer to the settings for people browsing the repository

Review the setup PR to see which files were added or updated. See the settings reference for optional files and exact settings.

For an optional GitHub review job, see hosted Claude review.

If your CI uses a container, see standard command scripts for checkout ownership and script setup.

Show where validation time goes​

A PR's timings can split each validation run into its phases, such as tests and lint, so you can see which one to speed up. When Shaka runs a script, SHAKA_PHASE_LOG names a file. Have the script append one JSON line per phase:

start=$(date +%s)
status=0
bundle exec rspec || status=$?
echo "{\"phase\":\"tests\",\"duration_ms\":$(( ($(date +%s) - start) * 1000 ))}" >> "${SHAKA_PHASE_LOG:-/dev/null}"
[ "$status" -eq 0 ] || exit "$status"

The script records the phase even when the tests fail, then exits with their status.

Shaka keeps up to eight phases per run. A name starts with a lowercase letter, then lowercase letters, digits, -, or _, up to 24 characters; Shaka skips a line it cannot use. Shaka's own bin/validate reports its four phases this way.

Your test runner can also name the test classes that failed, so you can tell a flaky test from a real failure. Append one line such as {"failed_tests":["CheckoutTest","Billing::InvoiceTest"]}. Each name is a class name of up to 64 characters. A run that names more than three classes records none, because that many failures usually mean a broken change, not a flaky test. When you ask your agent for a retrospective of PR timings, its report ranks the classes named most often. A failed run counts there only when the PR later committed the tree it tested, which is what happens when a rerun passes without changes, the usual sign of a flaky test. Shaka's bin/run-tests reports its failing classes this way.