backup-claude-settings

Back up Claude Code settings to a GitHub repository with timestamped, provider-prefixed filenames and audit diffs.

1|Updated May 17, 2026
One-click install
npx skills add https://github.com/mykcs/myk-skills --skill backup-claude-settings
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backup-claude-settings
Source: https://github.com/mykcs/myk-skills/tree/main/backup-claude-settings
Command: npx skills add https://github.com/mykcs/myk-skills --skill backup-claude-settings

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents losing critical Claude Code configuration by automatically backing up your local settings and providing a mandatory, auditable diff against the previous backup for the same API provider.

Core Features & Use Cases

  • One-click settings backup: Copies ~/.claude/settings.json plus both global and project .claude.json files into a timestamped backup repository for reliable recovery.
  • Provider-aware naming: Detects the active API provider from ANTHROPIC_BASE_URL and prefixes filenames accordingly (e.g., kimi/minimax/anthropic), so backups remain correctly labeled across provider changes.
  • Blocking diff audit: Forces a cross-date comparison with the latest previous backup for the same provider, always producing an audit log and refusing to silently assume “first backup” unless --force-first is provided.

Quick Start

Run /backup-claude-settings to back up your Claude settings to the configured GitHub repository and output the diff result plus the audit log path.

Frequently Asked Questions about backup-claude-settings

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I back up Claude Code settings to a GitHub repository?

To back up Claude Code settings, this skill copies your local settings.json and .claude.json files into a configured GitHub repository. It commits timestamped, provider-prefixed filenames and immediately pushes them for reliable recovery.

What is a blocking diff audit for configuration recovery?

A blocking diff audit forces a cross-date comparison with the latest previous backup for the same API provider. It generates an audit log file and refuses to proceed unless a prior backup exists or the --force-first flag is provided.

Can I use timestamped archives for Claude settings across different API providers?

Yes, timestamped archives support different API providers by detecting the active provider from ANTHROPIC_BASE_URL. It prefixes filenames accordingly, ensuring backups remain correctly labeled across provider changes like kimi or anthropic.

Why does diff auditing fail when there is no previous backup?

Diff auditing fails without a previous backup because it enforces a blocking cross-date comparison to ensure configuration integrity. You must provide the --force-first flag to bypass this check and generate the initial audit log.