AI SummaryInitialize standardized project memory: Core idea: bottom feeds top, top constrains bottom. Logs and TODOs are raw facts. Handoff marks the next resume point. Wiki is the current snapshot. Structure manages file organization. Docs index manages document output. Update Log records versioned milestone
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to install the "project-butler" skill in my project. Please run this command in my terminal: # Install skill into your project mkdir -p .claude/skills/project-butler && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/project-butler/SKILL.md "https://raw.githubusercontent.com/JamesShi96/project-butler/main/SKILL.md" Then restart Claude Code (or reload the window in Cursor) so the skill is picked up.
Description
Project memory workflow for init/upgrade, profile-aware setup, end session, normal/full close, file organization, document archiving, language switching, versioned update logs, rule review, status, wiki sync, and context recovery. Use for /project-butler, setup/初始化, foundation setup, profile setup, end session/收工, normal close, full close, foundation repair, organize files/整理文件, change language/切换语言, continue/接着上次, continue full context/全面回顾, review claude, sync wiki, status. Maintains project memory files. Runs version freshness check before trigger routing.
Project Butler — Project Memory Stack
Initialize standardized project memory: ` 上层(稳定原则) ┌─────────────────────────────────────┐ │ CLAUDE.md(项目宪法)← 人工确认 │ │ ↑ candidates(AI 自动收集候选) │ └─────────────────────────────────────┘ ↑ 抽象沉淀 中层(当前快照) ┌─────────────────────────────────────┐ │ PROJECT.md(项目 Wiki)← AI 自动同步 │ │ 概览 / 结构 / 模块状态 / 文件索引 │ │ STRUCTURE.md(文件管理规则)← AI 自动│ │ 目录规则 / 匹配条件 / 整理历史 │ │ UPDATE_LOG.md(里程碑变化)← AI 自动 │ │ DOCS.md(文档索引 + 元数据)← AI 自动 │ │ .claude/project-profile.json(画像配置)│ │ .claude/profile-pending.json(画像待处理)│ └─────────────────────────────────────┘ ↑ 状态汇总 下层(事实流水) ┌────────────────────┐ ┌────────────────────┐ │ log/(会话日志) │ │ TODO.md(执行清单)│ │ raw + summaries │ │ owner/deadline/ │ │ + archive(分级) │ │ deps │ └────────────────────┘ └────────────────────┘ ↓ session-handoff.md(下次接手点) ` Core idea: bottom feeds top, top constrains bottom. Logs and TODOs are raw facts. Handoff marks the next resume point. Wiki is the current snapshot. Structure manages file organization. Docs index manages document output. Update Log records versioned milestone changes. Constitution is stable principles. Supports 3 language modes: English (en), Chinese (zh), or bilingual. All content adapts to the selected language. ---
Step -1: Version Freshness Check (always run first)
<EXTREMELY_IMPORTANT> Before any other step, read references/update-check.md and execute the version freshness check described there. • If the check prints nothing → continue to Step 0 silently. • If the check prints a VERSION_NOTICE: block (three lines starting with VERSION_NOTICE:) → prepend that exact block to your first user-facing response for read triggers (status, continue, continue full context, sync wiki, review claude), or append it as a footnote at the end of your response for write triggers (init, end session, organize files, change language, profile setup, foundation repair, normal close, full close). Deliver the block verbatim — never paraphrase, summarize, or merge. • Never run git pull on the skill directory yourself, even if the user asks. Always show the upgrade command and let the user run it in their own shell. • If you cannot find the "Base directory for this skill: <path>" line in the current skill loading prompt, skip the check silently and continue to Step 0. </EXTREMELY_IMPORTANT> ---
Step 0: Trigger Routing
Determine how this skill was triggered: A. "整理文件" / "organize files": • Read references/file-reorganization.md • Execute Mode A: Four-Phase Organize (Discover → Ask or Plan → Plan → Execute) • Report and stop B. "收工" / "end session" / "结束会话" / "we're done" / "wrap up" / "done for today" / "normal close" / "full close": • Execute the End Session Flow below (inline) • Report and stop C. Initialization (/project-butler, 初始化项目, setup project, etc.): → Continue to Init Flow below D. "切换语言" / "change language": • Read references/language-change.md + references/language-adaptation.md • Execute the Language Change Protocol • Report and stop E. "continue" / "接着上次" / "上次做到哪了": • Read references/continue.md • Execute the Continue process (recover last session context) • Report and stop F. "continue full context" / "全面回顾" / "项目全景" / "full context": • Read references/continue-full-context.md • Execute the Continue Full Context process (full project trajectory recovery) • Report and stop G. "review claude" / "审查规则" / "更新宪法" / "check the rules": • Read .claude/candidates.md • Present pending candidates one by one for accept / reject / rewrite • For accepted or rewritten candidates, append to CLAUDE.md only after explicit user confirmation • Move processed candidates to adopted or rejected sections in .claude/candidates.md • Report and stop H. "sync wiki" / "同步项目" / "update overview" / "refresh overview": • Read PROJECT.md, STRUCTURE.md, UPDATE_LOG.md, DOCS.md, TODO.md, and session-handoff.md if present • Rescan current project files and update PROJECT.md current snapshot, module map, file structure, key file index, links, and progress sections • Preserve user-authored content where possible • Report and stop I. "status" / "项目现状" / "where are we": • Read PROJECT.md and session-handoff.md • Also read TODO.md and latest UPDATE_LOG.md entry if present • If .claude/project-profile.json or .claude/profile-pending.json exists, read references/project-profile-system.md and include profile debt / review queue in the dashboard • Present a compact project dashboard in the configured language: Project, Active Work, Recent Change, Profile, Next Best Step • Report and stop J. "foundation setup" / "profile setup" / "foundation repair" / "profile repair" / "profile sync": • Read references/project-profile-system.md • Execute the matching Profile System flow • Report and stop ---
End Session Flow
When triggered by "end session" / "结束会话" / "收工" / "we're done" / "wrap up" / "done for today" / "normal close" / "full close", execute in order: • Write session log → log/session-YYYY-MM-DD-{slug}.md • Same-day multiple sessions: use slug to distinguish (e.g., session-2026-04-21-prd-draft.md) • Format: see Session Log Format below • Log Compaction → if unarchived raw logs ≥ threshold (default 10, configured in CLAUDE.md): read references/log-compaction.md and execute • Update session-handoff.md → refresh "current progress" and "next steps" • Update PROJECT.md → if structure/module status changed • Update TODO.md → mark completed tasks • Collect constitution candidates → append to .claude/candidates.md (see rules below) • Profile impact scan → if .claude/project-profile.json exists, .claude/profile-pending.json exists, or the user explicitly requested Normal Close / Full Close / profile sync: • Read references/project-profile-system.md • Run the Profile-Aware End Session flow • For Normal Close: record profile-impacting changes in .claude/profile-pending.json • For Full Close: produce a Scope Plan before changing profile docs • Do not rewrite protected sections, document policies, or stable baselines without explicit confirmation • File reorganization (incremental) → read references/file-reorganization.md, execute Mode B • If STRUCTURE.md missing: execute Mode A first to establish baseline • Update .claude/.file-snapshot.json • Document archiving → read references/document-archiving.md, scan and archive document output • Identify documents created/modified this session • Classify by type, archive to docs/ subdirectories • Update DOCS.md index and metadata • If DOCS.md missing: create it (upgrade compatibility) • Evaluate & write update log → read references/update-log.md • Evaluate session significance • If significant: determine bump level (major/minor/patch), calculate new version from UPDATE_LOG.md metadata, prepend versioned entry • Optionally offer GitHub Release creation • If not significant, skip silently • Output summary → result-focused summary in the configured language (check CLAUDE.md Language setting)
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster