claude-sdk-rs: Command for Claude Code

.claude/commands/sync-downstream-harness.md

sync-downstream-harness is a command for Claude Code from bredmond1019/claude-sdk-rs. It costs 50 tokens per session (2,130 once invoked), scanned B, original, Apache-2.0.

A command that copies updated command and workflow files from a base template into repositories created from it. It normally previews the changes and can apply them when requested.

In plain words
What is it for?
Use it to review or apply shared harness updates to all eligible repositories, or to one selected repository.
Why use it?
It avoids repeating the same template updates manually across many repositories, without deleting each repository's custom files.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths.

This is bredmond1019/claude-sdk-rs's own configuration. It tells Claude Code how to work on claude-sdk-rs itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-sdk-rs configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/sync_downstream_harness.py <$ARGUMENTS minus --apply, if present>.

Reuse

Borrowing it

Nothing to install: this file belongs to bredmond1019/claude-sdk-rs. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/bredmond1019/claude-sdk-rs/main/.claude/commands/sync-downstream-harness.md
Clone the repo
git clone --depth 1 https://github.com/bredmond1019/claude-sdk-rs

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sync-downstream-harness

README.md
[![agentmods](https://agentmods.dev/badge/commands/bredmond1019/claude-sdk-rs/sync-downstream-harness/github.svg)](https://agentmods.dev/commands/bredmond1019/claude-sdk-rs/sync-downstream-harness)
Your own site
<a href="https://agentmods.dev/commands/bredmond1019/claude-sdk-rs/sync-downstream-harness"><img src="https://agentmods.dev/badge/commands/bredmond1019/claude-sdk-rs/sync-downstream-harness/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sync-downstream-harness

Your own site · 80×15
<a href="https://agentmods.dev/commands/bredmond1019/claude-sdk-rs/sync-downstream-harness"><img src="https://agentmods.dev/badge/commands/bredmond1019/claude-sdk-rs/sync-downstream-harness.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,130 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.02130
Opus 5.5 $0.00020 $0.00852
Sonnet 5.5 $0.00010 $0.00426
Haiku 4.5 $0.00005 $0.00213

Measured 11d ago against content hash fc57478e141f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

sync-downstream-harness scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

cd <repo_path> && git status --short | grep -v '\.claude/' | grep -v 'planning/\.template-version'
.claude/commands/sync-downstream-harness.md · 139 lines

How it starts

The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.

sync-downstream-harness — Pull the harness into every scaffolded repo

Automates the manual "update loop" docs/using-the-template.md §6 describes: copies base-template's current .claude/commands/*.md (flat root only — never .claude/commands/brain/) and .claude/workflows/ (the SDLC engines + templates/) into every repo discovered via brain.toml that already has its own .claude/workflows/ directory. Never deletes a repo's own customizations (e.g. feature.md). See planning/decisions/D48-downstream-harness-sync-script.md for why this exists — .claude/workflows/*.js has no equivalent of /sync-global-commands' global install path, so a harness fix here doesn't reach a downstream repo until this runs.

Variables

$ARGUMENTS — optional flags, space-separated:

  • --repo <slug> — limit to one repo (repeatable: --repo bastion --repo mev). Default: all eligible repos.
  • --apply — write changes. Default is dry-run (report only, nothing written).
  • --message "<text>" — description recorded in each synced repo's planning/.template-version. Default: "harness pull". Use something specific (e.g. the decision id driving the pull).

Instructions

  1. Guard — confirm you are in the base-template root.

    Run:

    test -f .claude/workflows/sdlc-flow.js && echo "Guard: OK — running from base-template root" || echo "ABORT: .claude/workflows/sdlc-flow.js not found. Run this command from the base-template root."
    
  2. Dry run first, always — even if $ARGUMENTS includes --apply, run once without it first so the report is visible before anything is written:

    python3 scripts/sync_downstream_harness.py <$ARGUMENTS minus --apply, if present>
    

    Read the per-repo file list. If a repo shows an unexpectedly large diff (e.g. hundreds of lines in one engine file), that's very likely just a stale repo catching up several pulls at once — confirmed harmless in practice (D48's provenance) via diff <target file> <base-template file> showing the sync produces a byte-identical copy, not corruption. Flag it in the report either way.

Read the full file on GitHub · 139 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 139 lines · 50 tokens per session scan B fc57478e141f

Subscribe to this mod's changes

sync-downstream-harness is a command published in the GitHub repository bredmond1019/claude-sdk-rs (23 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 50 tokens to every session and 2,130 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-26.

Related

sync-downstream-harness compared with commands from other repositories

sync-downstream-harness next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sync-downstream-harnessbredmond1019/claude-sdk-rsCommand231mo agoApache-2.0B50Claude Code
commitguanyang/open-agent-hubCommand986yesterdayMITA28Claude Code
commithowells/arcCommand252mo agoMITA18Claude Code
releasehowells/arcCommand252mo agoMITA23Claude Code
merge-conflict-analysisrjmurillo/ai-agentsCommand49yesterdayMITA0GitHub Copilot
release-notesOpenHands/extensionsCommand176yesterdayMITA44Claude Code
commitechoVic/blade-codeCommand18124d agoMITA8Claude Code