搜索

PythonReactSEOPDF
GitHub Skill

dotfiles-syncer

Sync dotfiles repository (homesick) with security checks. Use when: (1) Syncing dotfiles changes, (2) Committing dotfiles, (3) Pushing changes, (4) Running security checks, (5) After any file changes in ~/.claude/ or dotfiles repo. Triggers: "sync dotfiles", "commit dotfiles", "push changes", "security check", "dotfiles sync", "homesick sync", after file modifications in ~/.claude/.

shoheikawano☆ 3 仓库 Stars0 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Dotfiles Syncer

Safely sync dotfiles repository (homesick) with automatic security checks.

When to Use

  • After making any changes to ~/.claude/ directory
  • After modifying files tracked by homesick dotfiles repository
  • When explicitly requested to sync/commit/push dotfiles
  • At the end of sessions that modified configuration files

Security-First Workflow

CRITICAL: Always run security check before syncing.

Security Check Flow
├─ Run security-check.sh
│  ├─ Pass → Proceed with sync
│  └─ Fail → STOP and alert user
│     ├─ Review flagged content
│     ├─ Remove sensitive data
│     └─ Retry after cleanup

Available Scripts

All scripts are located in ~/.claude/skills/dotfiles-syncer/scripts/:

1. security-check.sh

Scans files for sensitive data patterns:

  • API keys, tokens, passwords
  • Database connection strings
  • AWS/cloud credentials
  • SSH private keys
  • JWT tokens
  • Credit card patterns
~/.claude/skills/dotfiles-syncer/scripts/security-check.sh
2. auto-sync-dotfiles.sh

Main sync script with options:

# Basic sync (auto-generates commit message)
~/.claude/skills/dotfiles-syncer/scripts/auto-sync-dotfiles.sh

# With custom commit message
~/.claude/skills/dotfiles-syncer/scripts/auto-sync-dotfiles.sh "Update skill configurations"

# Dry run (preview changes)
~/.claude/skills/dotfiles-syncer/scripts/auto-sync-dotfiles.sh --dry-run

# Claude directory only (legacy mode)
~/.claude/skills/dotfiles-syncer/scripts/auto-sync-dotfiles.sh --claude "Update Claude config"

# Force sync (skip security check - NOT recommended)
~/.claude/skills/dotfiles-syncer/scripts/auto-sync-dotfiles.sh --force "Emergency update"
3. check-and-sync.sh

Convenience script that combines security check + sync:

~/.claude/skills/dotfiles-syncer/scripts/check-and-sync.sh

Standard Sync Pattern

# Recommended: Security check then sync
~/.claude/skills/dotfiles-syncer/scripts/security-check.sh && \
~/.claude/skills/dotfiles-syncer/scripts/auto-sync-dotfiles.sh "Descriptive message"

Error Handling

Push Failures

If push fails due to remote changes:

cd ~/.homesick/repos/dotfiles
git pull --rebase
# Then retry sync
Security Check Failures
  1. Review the flagged content
  2. Remove or redact sensitive data
  3. Retry the sync
Merge Conflicts
  1. Resolve conflicts manually in the dotfiles repo
  2. Commit the resolution
  3. Push changes

Commit Message Guidelines

When auto-generating messages, the script analyzes:

  • Modified files by type (commands, skills, scripts)
  • Add/modify/delete operations
  • Specific file content changes

Manual messages should follow:

  • Be descriptive of the change purpose
  • Use imperative mood ("Add", "Update", "Fix")
  • Keep under 72 characters for the first line

Integration Notes

  • Works with homesick dotfiles repository at ~/.homesick/repos/dotfiles
  • Respects .gitignore patterns
  • Adds Claude Code co-author attribution to commits

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!