claude-harness
Central agentic harness for the portfolio. One repo holds the skills, the hooks, the
reusable CI workflows and the project skeleton; the 8 consuming repos install it as a
Claude Code plugin instead of duplicating it.
- Marketplace: this repo (
.claude-plugin/marketplace.json)
- Plugin:
plugins/claude-harness/
- Conventions master:
CONVENTIONS.md
- Plan:
dev-plan.md
Prerequisites
The repo is private. Claude Code clones it with your git credential helper, so
authenticate once:
gh auth login # choose HTTPS, and accept "configure git with your credentials"
gh auth setup-git
Without this, the marketplace add and the background auto-update both fail with a
credential prompt that never reaches you.
Installation
Always pin the ref to main. The default branch of this repo is develop, so a
declaration without a ref would make every merge to develop immediately active in
all consuming repos.
Interactive
/plugin marketplace add SelimLBOURAYA/claude-harness@main
/plugin install claude-harness@claude-harness
User level (~/.claude/settings.json)
Recommended: the git guard then also covers sessions opened at
~/ENV/projets and from the IDEs.
{
"extraKnownMarketplaces": {
"claude-harness": {
"source": {
"source": "github",
"repo": "SelimLBOURAYA/claude-harness",
"ref": "main"
},
"autoUpdate": true
}
},
"enabledPlugins": {
"claude-harness@claude-harness": true
}
}
autoUpdate keeps the marketplace clone on main and updates the installed
plugin; the freshness check of the SessionStart hook reads that clone.
The conventions reach every session through a symlink to that same clone
(CONVENTIONS.md DOC-7):
ln -sfn ~/.claude/plugins/marketplaces/claude-harness/CONVENTIONS.md ~/.claude/coding-conventions.md
Project level (.claude/settings.json)
Same block, committed in each repo, for traceability and so a fresh clone is
harnessed without user-level setup.
The same file carries the harness's permission rules (lot 33), a second layer
behind the git guard that does not depend on its reading of the shell: deny
for pushes to main, force pushes, --mirror, --all, --branches and
--prune, and ask for the gh api requests on pulls/*/merge and
git/refs. Claude Code matches a rule against the command its hooks rewrote, and
the rtk hook rewrites every git and gh command, so each rule exists bare and
behind rtk and rtk proxy. The master is templates/project/.claude/settings.json;
sync-projects sets the permissions key of every project from it, and
harness-invariants fails a project whose key differs. Like the guard, the rules
are not a sandbox: git -C dir push, a variable or an eval escape them.
What stays in the owner's hands (~/.claude/settings*.json)
The harness never edits the user-level settings. Their allow list decides what
runs without a prompt, and four entries reach further than their name:
Bash(rtk *) also allows rtk proxy <any command>: allow the rtk
subcommands you use instead (Bash(rtk git *), Bash(rtk gh *), ...).
Bash(docker *), Bash(cp *) and Bash(mv *) write anywhere, the lot lock
.claude/current-lot included: narrow them to what you need, or let them
prompt.
Update
With autoUpdate, Claude Code refreshes the marketplace and updates the installed
plugin during a session; the next session loads the new version. By hand:
/plugin marketplace update claude-harness
or, from a shell, claude plugin update claude-harness@claude-harness --scope user,
then --scope project in each project that installs it. Only commits promoted to
main are picked up; the promotion develop → main is manual and done by the
repo owner.
After a promotion: the owner's runbook
A promotion on GitHub changes nothing in a session that is already open. The
harness is loaded from the copy Claude Code installed, and only a refresh brings
the new one in.