sync-from-template

sync-from-template is a command for Claude Code from terrene-foundation/kailash-coc-claude-py. It costs 24 tokens per session (2,343 once invoked), scanned A, original, Apache-2.0.

A command that brings the latest shared development files from an upstream template into the current repository while keeping local project files. An upstream template is a source project whose reusable setup is inherited by another project.

In plain words
What is it for?
Use it to merge updated shared configuration, rules, and other template artifacts into a downstream consumer repository.
Why use it?
It keeps a template-based repository up to date without replacing project-specific work or applying the sync process to the wrong repository type.

Command for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: reads .claude/ paths; names the NotebookEdit tool; mentions Claude Code.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node .claude/bin/reconcile-settings-deny.mjs --write .claude/settings.json.

Good fit Use it to merge updated shared configuration, rules, and other template artifacts into a downstream consumer repository.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/terrene-foundation/kailash-coc-claude-py
agentmods
npx agentmods add commands/terrene-foundation/kailash-coc-claude-py/sync-from-template

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-from-template

README.md
[![agentmods](https://agentmods.dev/badge/commands/terrene-foundation/kailash-coc-claude-py/sync-from-template/github.svg)](https://agentmods.dev/commands/terrene-foundation/kailash-coc-claude-py/sync-from-template)
Your own site
<a href="https://agentmods.dev/commands/terrene-foundation/kailash-coc-claude-py/sync-from-template"><img src="https://agentmods.dev/badge/commands/terrene-foundation/kailash-coc-claude-py/sync-from-template/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-from-template

Your own site · 80×15
<a href="https://agentmods.dev/commands/terrene-foundation/kailash-coc-claude-py/sync-from-template"><img src="https://agentmods.dev/badge/commands/terrene-foundation/kailash-coc-claude-py/sync-from-template.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 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,343 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00024 $0.02343
Opus 5 $0.00012 $0.01171
Sonnet 5 $0.00005 $0.00469
Haiku 4.5 $0.00002 $0.00234

Measured 9d ago against content hash aa90c9bfc61b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

sync-from-template scanned grade A with 0 findings 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 9d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/sync-from-template.md · 63 lines

How it starts

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

Pull the latest CO/COC artifacts from the upstream USE template and merge them INBOUND into this consumer repo, preserving project-specific artifacts. /sync-from-template is the downstream-consumer half of the inbound sync family (mirroring loom's /sync-from-build + /sync-from-use and the template's /sync-from-downstream).

loom (source) → USE template → THIS REPO
                                   ↑ you are here

Detailed protocol: skills/30-claude-code-patterns/sync-flow.md § Downstream Sync.

Usage: /sync-from-template — no target.

Step 0: Verify Repo Class (this verb is for downstream consumers)

Read .claude/VERSIONtype. /sync-from-template is valid at a downstream consumer (type: coc-project). This repo inherits its .claude/ from a USE template (recorded in .claude/.coc-sync-marker; auto-detected at first run).

Evaluate these in order and take the FIRST match — the credibility arms are deliberately ahead of the plain-type arms. A template-derived repo carries type: coc-use-template verbatim (it is a byte copy), so a plain-type arm placed first would match it and route to /sync-from-downstream — the wrong verb, on a declaration this step is about to disbelieve.

  • coc-project → proceed below.
  • coc-use-template / coc-build whose declaration is NOT credible (.claude/VERSION::repo names a different repo than this one's git remote get-url origin — the "Use this template" byte-copy case) → STOP and report; do NOT proceed on a class you just decided to disbelieve. Correcting it is an EXPLICIT, reviewable edit the operator approves: set type: coc-project and populate upstream.template / upstream.template_repo (.claude/hooks/lib/version-utils.js::computeTemplateDerivedCorrection returns the suggested object — it is PURE and writes nothing). Re-run /sync-from-template after the edit lands. NEVER rewrite .claude/VERSION silently or as a side effect: it is the repo-CLASS root of trust (bin/lib/manifest-source.mjs::readRepoClass trusts type verbatim), which is exactly why validate-bash-command.js BLOCKS agent writes to it at the Bash boundary.
  • coc-use-template / coc-build whose declaration is UNDETERMINED (no .claude/VERSION::repo, and no legacy-allowlist match) → report the ambiguity and ask; do not guess a class and do not re-route on the guess. This is the expected shape of an unstamped byte-copy during the migration window, so it must not fall through to the plain-type arm below.
  • coc-source (loom) → STOP: "this is loom — ingest the upstream streams with /sync-from-build + /sync-from-use."
  • coc-use-template (credible) → STOP: "this is a USE template — ingest the downstream inbox with /sync-from-downstream."
  • coc-build (credible) → STOP: "BUILD repos receive artifacts via /sync-to-build run at loom."
  • Missing → ask the user what class this repo is.

Read the full file on GitHub · 63 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. 9d ago First seen · 63 lines · 24 tokens per session scan A aa90c9bfc61b

Subscribe to this mod's changes

sync-from-template is a command published in the GitHub repository terrene-foundation/kailash-coc-claude-py (12 stars, last pushed 24d ago), licensed Apache-2.0. It adds 24 tokens to every session and 2,343 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.