Dotfiles
하는 일
이 스킬은 셸 설정과 선택한 설정 폴더를 비공개 GitHub 저장소에 백업해 둡니다. 비밀 정보를 유출하지 않으면서 모든 컴퓨터에서 같은 설정을 쓰고 싶은 사람을 위한 스킬입니다.
사용하는 경우
- ✓셸 설정을 비공개 GitHub 저장소에 백업하고 싶을 때.
- ✓이전 백업에서 설정 파일을 복원하고 싶을 때.
- ✓로컬 설정이 저장소와 다른지 확인하고 싶은 경우.
스킬 링크
https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/Dotfiles/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 셸 설정과 제가 지정한 설정 폴더를 비공개 dotfiles 저장소에 백업해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 GitHub 저장소가 비공개인지 확인한 뒤, 푸시할 내용에 토큰 같은 비밀 정보가 있는지 검사합니다. 사용자가 고른 파일만 복사되며, 복원은 타임스탬프가 붙은 백업부터 시작합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
System Dotfiles Management Skill
Contents: Ideal State · Intent Routing · Data & Config · Tool contract · Gotchas · Examples
Manages ~/.zshrc and ~/.config/ against a private GitHub dotfiles repo; the directories under ~/.config that Backup and Restore copy are the ones you list in Config.md (DOTFILES_CONFIG_DIRS). Push local config up, pull it down, sync two-way, restore from a timestamped backup, or check status — with a gitleaks content scan of the staged diff and of every unpushed commit that stops the push on any secret, or when gitleaks is not installed.
The working clone lives at $DOTFILES_DIR and tracks the private remote $DOTFILES_REPO. Push is the default intent; Pull, Sync and Status only compare, Restore is the one intent that overwrites local files, and Backup makes a local copy that never leaves the machine.
Ideal State
- Every push lands only in
$DOTFILES_REPO, after GitHub reported it private (gh repo view --json isPrivateprintedtrue) both before any other Push step and again just before the push, and after gitleaks exited 0 on the staged diff and on every unpushed commit; any failed check, or gitleaks missing, stopped the run before a commit or push. - Only configs enter the repo or a backup: Push copies and stages the files the repo already tracks, a new config enters by name, every local backup (Backup, and Restore's backup before it overwrites) copies the
DOTFILES_CONFIG_DIRSdirectories with secret files excluded, and Restore's also copies every tracked.configfile it will overwrite, and the whole~/.configis never copied or staged. - Every comparison of local and repo (Pull, Sync, Status, and Restore's check after it copies) covers
.zshrcand the filesgit ls-files .configlists, so a report names only real dotfile differences and a clean machine reports none. - No local file is overwritten before a timestamped backup exists in
$DOTFILES_BACKUPSand the user confirmed; Pull, Sync and Status leave every local file unchanged. - Every run reports the files it changed, the repository it verified, the security check result, the commit hash when it committed, and the next intent to run.
Intent Routing
| Intent | Trigger | File |
|---|---|---|
| Push | "push dotfiles", "update dotfiles" (default) | Intents/Push.md |
| Pull | "pull dotfiles", new machine setup | Intents/Pull.md |
| Sync | "sync dotfiles", unsure of direction | Intents/Sync.md |
| Restore | "restore dotfiles", recover config | Intents/Restore.md |
| Status | "check dotfiles status", "dotfiles status" | Intents/Status.md |
| Backup | "backup dotfiles", local timestamped copy | Intents/Backup.md |
| File | Read when |
|---|---|
Setup.md |
first-time setup, or Tools/Config.ts stopped on a missing Config.md or key |
Data & Config
This skill ships no personal data. All private values live in the USER tree at
<configRoot>/LIFEOS/USER/CUSTOMIZATIONS/SKILLS/Dotfiles/Config.md (configRoot is $CLAUDE_CONFIG_DIR when set, else ~/.claude):
the keys DOTFILES_DIR, DOTFILES_BACKUPS, DOTFILES_REPO, DOTFILES_REPO_SLUG and
DOTFILES_CONFIG_DIRS. Every intent opens with this Config command, which runs
Tools/Config.ts, exports those keys and exits non-zero (stopping the intent) when the
file or a required key is missing. Nothing has a built-in default. First-time setup: Setup.md.
DOTFILES_ENV="$(bun ~/.claude/skills/Dotfiles/Tools/Config.ts)" || exit 1; eval "$DOTFILES_ENV" # exports DOTFILES_DIR, DOTFILES_BACKUPS, DOTFILES_REPO, DOTFILES_REPO_SLUG, DOTFILES_CONFIG_DIRS
Tool contract
Recipes two or more intents share. Each runs after the Config command.
Remote check — the remote is the configured repo AND GitHub says it is private
Push runs it before any other step and again before the push. Status runs it inside a subshell, ( … ), so a STOP line becomes the report's remote warning and the rest of the report still runs. In Push, any STOP line ends the intent: no pull, no commit, no push.
cd "$DOTFILES_DIR" || { echo "STOP: no dotfiles clone at $DOTFILES_DIR"; exit 1; }
REMOTE=$(git remote get-url origin) || { echo "STOP: the clone has no origin remote"; exit 1; }
[ "$REMOTE" = "$DOTFILES_REPO" ] || { echo "STOP: origin is $REMOTE, expected $DOTFILES_REPO"; exit 1; }
PRIVATE=$(gh repo view "$REMOTE" --json isPrivate -q .isPrivate) || { echo "STOP: cann
자주 묻는 질문
공개 저장소에 푸시하나요?
아니요. 푸시 전에 저장소가 비공개인지 확인하며, 그렇지 않으면 멈춥니다.
비밀 정보를 찾으면 어떻게 되나요?
푸시가 차단되므로 .env 파일이나 토큰 같은 비밀 정보가 컴퓨터 밖으로 나가지 않습니다.
선택하지 않은 파일도 건드리나요?
아니요. 셸 파일과 사용자가 지정한 설정 폴더만 복사됩니다.
상세 정보
작성자의 원본 설명
Manage ~/.zshrc and a chosen set of ~/.config/ directories (you name them in Config.md) against a private GitHub dotfiles repo. Intents: Push (verify private remote, scan secrets), Pull (clone/diff), Sync, Restore (timestamped backup), Status, Backup (local timestamped copy). Security scan blocks .env, secrets, tokens before push. NEVER commits to public repos. USE WHEN dotfiles, push/pull/sync dotfiles, zshrc, restore config, backup config, new machine setup. NOT FOR app configs unrelated to shell/editor/terminal.
repo: danielmiessler/LifeOS
인기도
- GitHub 스타
- 20k
- 순위
- #10422
- 라이선스
- MIT
- 업데이트
- 2026. 10. 28.
댓글
- …
이 저장소의 다른 스킬
LifeOS
20k에이전트가 LifeOS를 설정하도록 돕습니다. LifeOS는 인터뷰와 대시보드를 통해 현재 상태를 이상적인 상태에 연결하는 개인 시스템입니다.
AnnualReports
20k에이전트가 주요 업체의 사이버보안 연간 보고서에서 침해와 랜섬웨어 추세를 찾아 비교하고, 모든 수치에 출처를 붙이도록 돕습니다.
ApertureOscillation
20k에이전트가 설계 질문 하나를 좁은 범위와 넓은 범위에서 검토하고, 만들기 전에 두 답이 충돌하는 지점을 짚도록 가르칩니다.
Aphorisms
20k에이전트가 큐레이션된 컬렉션에서 출처가 밝혀진 인용문을 찾고 맞추고 관리하며, 최근 뉴스레터에 쓴 인용문은 피하도록 돕습니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.