sync-template

A configuration-sync tool that compares a project's Claude Code setup with the current dotforge template and proposes merged updates. It preserves local customizations instead of replacing them.

In plain words
What is it for?
Use it to update Claude Code configuration, compare rules and hooks, merge permissions, and detect the project's technology stack.
Why use it?
It reduces the manual work of keeping project rules, settings, hooks, and stack-specific configuration up to date without losing personal changes.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/luiseiman/dotforge/sync-template
Any agent
npx skills add luiseiman/dotforge --skill sync-template
Clone the repo
git clone --depth 1 https://github.com/luiseiman/dotforge

Made for: Claude Code, Codex.

Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,252 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00023 $0.01252
Opus 5 $0.00012 $0.00626
Sonnet 5 $0.00005 $0.00250
Haiku 4.5 $0.00002 $0.00125

Measured yesterday against content hash dd716b44de86, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sync-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 yesterday.

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.

skills/sync-template/SKILL.md · 143 lines

How it starts

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

Sync Template

Update the current project's Claude Code configuration against the latest version of dotforge.

Principle: merge, not overwrite

NEVER overwrite existing files without confirmation. Compare and propose changes. NEVER touch settings.local.json — it is the user's personal configuration. NEVER modify sections marked with <!-- forge:custom --> in CLAUDE.md.

Step 0: Verify global

Before syncing the project, verify that ~/.claude/CLAUDE.md exists and contains behavior rules (communication, planning, autonomy). If global rules are active, the project's _common.md only needs technical rules (git, naming, testing, security). Do not duplicate what is already in global.

Step 1: Detect current state

  1. Read the current .claude/settings.json
  2. Read the current CLAUDE.md
  3. Read existing .claude/rules/
  4. Read existing .claude/hooks/
  5. Detect stacks using $DOTFORGE_DIR/stacks/detect.md
  6. Read ~/.claude/CLAUDE.md to know which rules are already covered globally

Step 2: Compare against template

For each component, compare with the dotforge version:

settings.json — Smart merge

  • allow: union of sets. Add missing permissions from base template + stacks. NEVER remove local permissions the project already has.
  • deny: union of sets. Add missing security denies. NEVER remove local denies.
  • hooks: add missing hooks from template. Preserve custom project hooks.
  • Other fields: preserve everything that is not allow/deny/hooks (e.g., MCP configs).

Rules

  • Is _common.md missing? → propose adding it
  • Are rules for the detected stack missing? → propose adding them
  • Are existing rules outdated? → show diff, propose update
  • Custom project rules (not in template) → DO NOT TOUCH
  • .claude/rules/domain/ → NEVER TOUCH. Domain rules are project-owned knowledge, not template-managed. Skip entirely during sync.

Hooks

  • Is block-destructive.sh missing? → propose adding + chmod +x
  • Is the stack's lint hook missing? → propose adding + chmod +x
  • Custom project hooks → DO NOT TOUCH
  • Verify that existing hooks are executable (chmod +x)

Read the full file on GitHub · 143 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. yesterday First seen · 143 lines · 23 tokens per session scan A dd716b44de86

Subscribe to this mod's changes

sync-template is a skill published in the GitHub repository luiseiman/dotforge (8 stars, last pushed 2mo ago), licensed MIT. It adds 23 tokens to every session and 1,252 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-08-31.

Related

Other skills, from other repositories

scaffold

Set up or align a non-code ops/PM repo with the ops folder structure, CLAUDE.md, and INDEX.md hierarchy.

OdinMB/ops-workflow · 30 tokens

find-opps

Find new directions for an ops project — adjacent opportunities, strategic gaps, preparatory research. Use when known work is well-mined and you need to look outward.

OdinMB/ops-workflow · 37 tokens

factory-db-migration

The operational discipline for running a destructive change against a production database — schema migrations, data backfills, one-shot RPCs, historical seed imports. Adjacent to factory-data-layer.md (schema design) and factory-deployment.md (where migrations execute in CI) — this skill is about the runbook around…

nonlinear-xyz/factory-kit · 155 tokens

prioritize

Pick 2–3 independent ops tasks from active plans and backlog for autonomous execution, weighing impact, feasibility, and project goals.

OdinMB/ops-workflow · 29 tokens

factory-api

API conventions for both server actions and tRPC builds. Covers the decision between them, per-mutation Zod input schemas, central router composition, pagination shape, multi-field search via Drizzle ilike + or(), mutation lifecycle hooks, conditional query enabling, stale-time defaults, error response shape and…

nonlinear-xyz/factory-kit · 95 tokens

factory-ci

CI and pull-request review conventions. One canonical .github/workflows/ci.yml is the merge gate (typecheck, lint, test, build, claude-review); branch protection's required-checks list matches the job list 1:1; anthropics/claude-code-action@v1 reviews every PR against the factory-pitfalls.md checklist as a required…

nonlinear-xyz/factory-kit · 110 tokens