Claude Code plugin marketplace with baloo: skills, an agent that verifies changes against the project's decisions, guidelines, checks, an output style and a status line.
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
The bunderlog marketplace of Claude Code plugins. It holds one plugin, baloo, described in
its plugin.json.
Why things are the way they are is in .about/adr/.查看完整 README ↗The bunderlog marketplace of Claude Code plugins. It holds one plugin, baloo, described in
its plugin.json.
It is for developers who work with Claude Code across several projects and want the same
discipline in each: decisions, terms and requirements recorded in the project's .about/, commits
checked by Git hooks and CI, and one set of working rules and one reply style for Claude.
claude plugin marketplace add bunderlog/claude-plugins
claude plugin install baloo@bunderlog
Its Hooks and Git hooks run its Python code, so they need python3 3.9 or later, which a Mac gets
with the Command Line Tools and most Linux distributions have; nothing else is installed.
Why things are the way they are is in .about/adr/.
At session start the plugin writes the Git hooks pre-commit, commit-msg and pre-push
where .claude/baloo.yml turns on one of their Checks under git-hooks, and takes its own out
where it turns them all off. A Git hook already there that the plugin didn't write is left alone,
and session start names the Checks it keeps from running. With husky 9, the plugin's Git hooks go
into .git/baloo-hooks/, and a line first in .husky/<hook> runs each: commit that line.
A Git hook also runs the project's own command, once its Checks pass, where .claude/baloo.yml
sets one under git-hook-commands, so a repo needs no husky just for its tests:
git-hook-commands:
pre-commit: mise run test
The command runs with sh in the repo, with git's arguments as $1 on (commit-msg: npx commitlint --edit $1) and, for pre-push, the pushed refs on stdin; the commit or push fails
when it does. Only people with the plugin run it: CI should run it too.
With format-on-edit: <command> in .claude/baloo.yml, such as format-on-edit: npx prettier --write, the plugin runs the command in the repo's root with the path of each file Claude edits,
and says nothing of how it went.
/baloo:doctor, or asking Claude what baloo has on or why a Check didn't run, shows the plugin's
state in the repo: its problems first, each with what fixes it, then the plugin's version and the
link the Git hooks run, the Config's settings, each Check on or off, the Git hooks and the
Guidelines. It changes nothing.
The Checks that Git hooks run can run in a project's CI too, for commits made where the Git
hooks didn't: without the plugin, or in GitHub's web editor. Download a Release's source, pinned
by its commit, run its run.py with python3 3.9 or later, and give each Check the input its Git hook would,
with $BASE the commit the checked commits start from and $BRANCH the branch they go to:
set -e
commit=d06ee370b42a35b0c22babfb05c507b184d12a32 # v0.29.1
dir=$(mktemp -d)
curl -fsSL "https://github.com/bunderlog/claude-plugins/archive/$commit.tar.gz" | tar -xz -C "$dir"
baloo() { python3 -E -s "$dir/claude-plugins-$commit/plugins/baloo/scripts/run.py" "$@"; }
for sha in $(git rev-list "$BASE"..HEAD); do
git log -1 --format=%B "$sha" > "$dir/msg"
baloo check conventional-commits "$dir/msg"
baloo check no-ai-coauthor "$dir/msg"
done
echo "refs/heads/ci $(git rev-parse HEAD) refs/heads/$BRANCH $BASE" | baloo check linear-history
git reset -q --soft "$BASE" # the checked commits' changes, staged
baloo check no-secrets-in-commits
baloo check no-conflict-markers
baloo check no-large-files
fetch-depth: 0, and on a pull request ref: ${{ github.event.pull_request.head.sha }} with
BASE=$(git merge-base <the base's sha> HEAD); on a push, BASE is github.event.before.
BRANCH is github.base_ref on a pull request and github.ref_name on a push..claude/baloo.yml, as in its Git hook, and one
the Config turns off passes.no-stale-adr-date is left out: it compares an ADR's Date with today, so a change checked on a
later day than it was made would fail.git ls-remote https://github.com/bunderlog/claude-plugins v<version>.This repo uses its own plugin: .claude/settings.json installs baloo from GitHub, so a session
here runs its last Release. To try an edit to a skill, the agent, a Guideline or a Hook before a
Release, start a session with claude --plugin-dir plugins/baloo: its Hooks, and the Git hooks
and Status line from then on, run this checkout's code. The code is in plugins/baloo/scripts/,
its tests in tests/, and mise run check runs them on Python 3.9, lints the Python and the Hooks'
sh, and spell-checks the repo. To make a Release and push it, run mise run release.