home / skills / chachamaru127 / claude-code-harness / harness-update

harness-update skill

/skills/harness-update

This skill safely updates projects with the latest harness version, performing backups and non-destructive config updates.

npx playbooks add skill chachamaru127/claude-code-harness --skill harness-update

Review the files below or copy the command above to add this skill to your agents.

Files (5)
SKILL.md
4.0 KB
---
name: harness-update
description: "Harnessを安全にアップデート。バックアップ付きで安心安全。Use when user mentions '/harness-update', update harness, update version, or template updates. Do NOT load for: app updates, dependency updates, product version bumps."
description-en: "Safely update Harness. With backup, safe and secure. Use when user mentions '/harness-update', update harness, update version, or template updates. Do NOT load for: app updates, dependency updates, product version bumps."
description-ja: "Harnessを安全にアップデート。バックアップ付きで安心安全。Use when user mentions '/harness-update', update harness, update version, or template updates. Do NOT load for: app updates, dependency updates, product version bumps."
allowed-tools: ["Read", "Write", "Edit", "Bash", "Glob", "Grep"]
disable-model-invocation: true
argument-hint: "[--backup|--force]"
---

# Harness Update Skill

Safely update projects with existing harness to the latest harness version.
**Version detection → Backup → Non-destructive update** flow preserves existing settings and tasks while introducing latest features.

## Quick Reference

- "I want to update harness to the latest version"
- "I want to add new features to existing project"
- "I want to update config file format to latest version"
- "I want to fix incorrect permission syntax"
- "I was notified of template updates"

## Deliverables

- Version detection via `.claude-code-harness-version`
- **Template update detection and localization judgment**
- Identify files needing update
- Auto-backup creation
- Non-destructive settings/workflow file updates
- **No localization → overwrite / Localized → merge support**
- **Skills diff detection** - Auto-detect and propose new skills
- Optional: Codex CLI sync (`.codex/` + `AGENTS.md`)
- Post-update verification

---

## Execution Flow Overview

| Phase | Reference | Description |
|-------|-----------|-------------|
| Phase 1 | [references/version-detection.md](references/version-detection.md) | Version detection and confirmation |
| Phase 1.5 | [references/breaking-changes.md](references/breaking-changes.md) | Breaking changes detection and fix |
| Phase 2 | [references/backup-and-update.md](references/backup-and-update.md) | Backup creation and file updates |
| Phase 3 | [references/verification.md](references/verification.md) | Verification and completion |

---

## Phase Summary

### Phase 1: Version Detection

1. Check `.claude-code-harness-version` file
2. Compare with plugin's latest version
3. Run `template-tracker.sh check` for content-level updates
4. Confirm update scope with user

**If harness not installed**: Suggest using `/harness-init` instead.

### Phase 1.5: Breaking Changes Detection

Detect and fix existing settings issues:
- Incorrect permission syntax (e.g., `Bash(npm run *)` → `Bash(npm run:*)`)
- Deprecated settings (e.g., `disableBypassPermissionsMode`)
- Old hook settings in project files (should use plugin hooks.json)

### Phase 2: Backup and Update

1. Create backup in `.claude-code-harness/backups/{timestamp}/`
2. Update `.claude/settings.json` (merge permissions, fix syntax)
3. Update workflow files based on localization status:
   - Not localized → overwrite
   - Localized → merge support with user confirmation
4. Update rule files with marker/hash method
5. Skills diff detection and update proposal
6. Update Cursor commands (always overwrite)
7. Update version file

### Phase 3: Verification

1. Post-update re-verification with `template-tracker.sh check`
2. Syntax check for JSON files
3. Generate completion report with file-by-file results

---

## Important Preserved Data

These are **never** overwritten:
- ✅ Incomplete tasks in Plans.md
- ✅ Custom settings in .claude/settings.json (hooks, env, model, etc.)
- ✅ SSOT data in .claude/memory/

---

## Related Commands

- `/harness-init` - New project setup
- `/sync-status` - Check current project status
- `/setup` - Setup development tools

Overview

This skill safely updates a project's Claude Code harness to the latest harness version with automated backups and non-destructive merges. It preserves user customizations, detects template changes, and proposes safe fixes for breaking-change patterns. Use it when you need controlled harness or template updates while keeping project-specific settings intact.

How this skill works

The skill detects the current harness version from .claude-code-harness-version and compares it to the latest release, then runs a content-level check (template-tracker) to find template updates. It creates a timestamped backup, applies non-destructive updates to settings and workflow files (overwriting only when not localized), fixes known breaking-change patterns, and performs post-update verification with syntax checks and a completion report. Skills diffs are detected and proposed rather than applied blindly.

When to use it

  • User issues the /harness-update command
  • You need to update the harness version or harness templates
  • Template updates are available and you want a safe, reversible apply
  • You want to fix known harness-related configuration issues (permissions, deprecated keys)
  • You need to add new harness features without losing custom settings

Best practices

  • Confirm scope before updating: harness/template updates only, not app or dependency updates
  • Review proposed skill diffs and localization decisions before applying merges
  • Keep incomplete Plans.md tasks and .claude/memory untouched; verify backups first
  • Run template-tracker and JSON syntax checks after the update
  • Use the provided backup path (.claude-code-harness/backups/{timestamp}/) to restore if needed

Example use cases

  • Update a project from an older harness version while preserving custom .claude/settings.json entries
  • Apply template fixes that correct permission syntax or deprecated settings
  • Detect new skills introduced in the harness and propose adding them to the project
  • Merge workflow updates into a localized project with user-confirmed merges
  • Create an automatic backup and verification report after performing harness updates

FAQ

Will my custom settings be overwritten?

No. Custom settings in .claude/settings.json, incomplete Plans.md tasks, and .claude/memory are preserved and never overwritten by the update.

What happens if templates are localized?

If templates are localized the skill proposes a merge and requests confirmation before merging; if not localized, files may be overwritten.

Can this update app code or dependencies?

No. The skill is limited to harness and template updates and will not perform application or dependency version bumps.