dev-assets-sync
Run a workspace backup sync on demand — rsyncs Claude/Codex configs, memories, standards, hooks, skills-index, and per-project dev files to a private git repo (e.g. `{org}/dev-assets`). Use when backing up workstation state, prepping for clean-OS install, or capturing a snapshot before risky changes. Not for normal git commits — this is workspace-wide backup automation.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 1
- Forks
- 1
01 前言 Front Matter
- name
- dev-assets-sync
- description
- Run a workspace backup sync on demand — rsyncs Claude/Codex configs, memories, standards, hooks, skills-index, and per-project dev files to a private git repo (e.g. `{org}/dev-assets`). Use when backing up workstation state, prepping for clean-OS install, or capturing a snapshot before risky changes. Not for normal git commits — this is workspace-wide backup automation.
02 资源文件 1
- 参考文档reference.md487 B
03 SKILL.md 正文
dev-assets-sync
Back up local Claude Code + Codex state plus priority project dev files to a private GitHub repo. Runs on demand; may also be scheduled via cron for periodic snapshots.
What it syncs
- Claude:
~/.claude/projects/*/memory/,~/.claude/standards/,~/.claude/hooks/, sanitized~/.claude/settings.json - Codex:
~/.codex/{memories,skills,rules,automations,plugins,superpowers,scripts}/,~/.codex/{AGENTS.md,config.toml,mcp.json} - zsh:
~/.config/zsh/functions.zsh - Projects: Configurable per user — syncs
.agents/,.opencode/,.serena/,.cursor/skills|rules,.claude/plans|skills,AGENTS.md,CLAUDE.md,opencode.jsoncfrom priority projects - Self: the sync script itself into
scripts/
What it does NOT sync
.env*, keys, credentials, tokens, SSH/cloud config (excluded by rsync filters and.gitignore)node_modules/,dist/,build/,.cache/,.log,.DS_Store- Full skill bodies (only an index is generated) — the toolkit installer is the source of truth
.git/of project dirs
How to run
/bin/zsh ~/scripts/dev-assets-sync.sh
Output: commits to main and pushes to the configured private repo. Log: ~/scripts/dev-assets-sync.log. Lock: ~/scripts/.dev-assets-sync.lock.
Snapshots
projects/<name>/SNAPSHOT.md files are currently hand-written point-in-time summaries. To refresh, hand an Explore agent the target project and ask for version/stack/plans/specs/last-5-commits/gotchas under 250 words. Commit alongside the auto-synced data.
Extending
Add a new project:
# In ~/scripts/dev-assets-sync.sh, near the project-sync section:
sync_project "NewThing" "/path/to/your/projects/NewThing"
Add a new global directory: edit the # ── Global: blocks in the script.
Safety
- Guards against concurrent runs via lockfile.
- Aborts commit if staged files match
*.env|*.key|*.pem|secrets.json|auth.json|credentials*. - Skips push if
github.comis unreachable (commits locally instead). - Rotates log at 2000 lines.
References
- Live script:
~/scripts/dev-assets-sync.sh - Cron entry:
crontab -l | grep dev-assets-sync - Backed up to: your configured private repo (e.g.
{org}/dev-assetson GitHub)
04 同仓库更多 Skills
token-audit
Audit historical Claude Code token usage from JSONL session files — shows total spend, cache hit rates, top costly sessions, weekly trends, and where tokens are going. Run after heavy sessions or weekly to measure optimization impact. Answers how many tokens a session used, how expensive was that session, session cost, and token usage report.
smart-model-route
Auto-classify prompt complexity via Haiku (with heuristic fallback) and inject model routing hints for Agent tool calls. Wired as a UserPromptSubmit hook — fires on every prompt, routes low tasks to Haiku, standard to Sonnet, complex to Sonnet with thorough reasoning, and critical (security/arch/migrations) to Opus. Handles model selection, for example choose model by task complexity.
smart-commands
Decision guide for when to proactively use Claude Code slash commands — /think, /model, /compact, /clear. Use when choosing whether to invoke a command before or during a task, or when a complexity-classifier hook has flagged a task as high or critical. Pairs with the complexity-classifier UserPromptSubmit hook. Answers when to compact, should I switch models, and whether to use extended thinking. Use to pick the right /model command and switch model.
spec-ship
暂无简介
spec-new
Create a committed per-feature spec under `docs/specs/YYYY-MM-DD-<slug>/{spec,tasks}.md` with frontmatter (status, created, owner, pr, tags). Promotes an ephemeral `.claude/plans/<name>.md` into a persistent, searchable artifact. Use when starting a feature that's larger than a one-shot PR.
roadmap-refresh
Regenerate `docs/roadmap.md` for a repo from all specs under `docs/specs/` + their frontmatter (status, tags, pr). Produces Now/Next/Recently-shipped sections. Run after creating / shipping a spec, or at the start of a new session for orientation.