MCP HubMCP Hub
스킬 목록으로 돌아가기

read-continue-here

pjt222
업데이트됨 2 days ago
9 조회
17
2
17
GitHub에서 보기
디자인aiautomation

정보

이 기술은 Claude가 시작 시 `CONTINUE_HERE.md` 파일을 읽어 이전 세션에서 자동으로 작업을 감지하고 재개할 수 있도록 합니다. 구조화된 인계 내용을 파싱하고, 사용자와 재개 계획을 확인한 후, 사용 완료 시 정리 작업을 수행합니다. 작업 중단 후 부트스트래핑하거나 SessionStart 훅을 통해 자동 연속 감지를 설정할 때 사용하세요.

빠른 설치

Claude Code

추천
기본
npx skills add pjt222/agent-almanac -a claude-code
플러그인 명령대체
/plugin add https://github.com/pjt222/agent-almanac
Git 클론대체
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/read-continue-here

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

Read Continue Here

Read a structured continuation file and resume work from where the prior session left off.

When to Use

  • Starting a new session and CONTINUE_HERE.md exists in the project root
  • After a SessionStart hook injects continuation context
  • Bootstrapping identity and detecting prior session artifacts
  • Setting up automatic continuation detection for a project (one-time infrastructure)

Inputs

  • Required: A project directory (defaults to current working directory)
  • Optional: Whether to configure infrastructure (SessionStart hook + CLAUDE.md instruction)
  • Optional: Whether to delete the file after consumption (default: yes)

Procedure

Step 1: Detect and Read the Continuation File

Check for CONTINUE_HERE.md in the project root:

ls -la CONTINUE_HERE.md 2>/dev/null

If absent, exit gracefully — there is nothing to continue from.

If present, read the file contents. Parse the 5 sections: Objective, Completed, In Progress, Next Steps, Context. Extract the timestamp and branch from the header line.

Got: The file is read and its sections are parsed into a clear mental model of the prior session's state.

If fail: If the file exists but is malformed (missing sections, empty), treat it as a partial signal — extract whatever is present and note what is missing to the user.

Step 2: Assess Freshness

Compare the file's timestamp against the current time:

# File modification time
stat -c '%Y' CONTINUE_HERE.md 2>/dev/null || stat -f '%m' CONTINUE_HERE.md
# Current time
date +%s

Classify freshness:

  • Fresh (< 24 hours, same branch): safe to act on directly
  • Stale (> 24 hours or different branch): flag to user before proceeding
  • Superseded (new commits exist after the handoff timestamp): someone worked on the project since the handoff

Check branch alignment:

git branch --show-current
git log --oneline --since="$(stat -c '%Y' CONTINUE_HERE.md | xargs -I{} date -d @{} --iso-8601=seconds)" 2>/dev/null

Got: A freshness assessment with classification (fresh, stale, or superseded) and supporting evidence.

If fail: If not in a git repo, skip branch and commit checks. Rely on the timestamp in the file header alone.

Step 3: Summarize and Confirm Resumption

Present the continuation state to the user concisely:

  • "Prior session objective: [Objective]"
  • "Completed: [summary]"
  • "In progress: [summary]"
  • "Proposed next action: [Next Steps item 1]"

If freshness is "stale" or "superseded", present the evidence and ask whether to proceed with the handoff or start fresh.

If any Next Steps items are tagged **[USER]**, surface those explicitly — they require user decisions before work can proceed.

Got: The user confirms the resumption plan, possibly with adjustments. The agent has a clear mandate for what to do next.

If fail: If the user says "start fresh" or "ignore that file", acknowledge and proceed without the continuation context. Offer to delete the file to prevent future confusion.

Step 4: Act on the Handoff

Begin working from Next Steps item 1 (or wherever the user directed):

  • Reference In Progress items to understand partial state
  • Use the Context section to avoid retrying failed approaches
  • Treat Completed items as done — do not re-verify unless the user asks

Got: The agent is productively working on the right task, informed by the continuation file.

If fail: If the Next Steps are ambiguous or the In Progress state is unclear, ask the user for clarification rather than guessing.

Step 5: Clean Up

After the handoff is consumed and work is underway, delete CONTINUE_HERE.md:

rm CONTINUE_HERE.md

Stale continuation files cause confusion in future sessions.

Got: The file is removed. The project root is clean.

If fail: If the user wants to keep the file (e.g., as a reference during the session), leave it but note that it should be deleted before session end to prevent the next session from re-consuming it.

Step 6: Configure SessionStart Hook (Optional)

If not already configured, set up automatic reading of CONTINUE_HERE.md on session start.

Create the hook script:

mkdir -p ~/.claude/hooks/continue-here

cat > ~/.claude/hooks/continue-here/read-continuation.sh << 'SCRIPT'
#!/bin/bash
# SessionStart hook: inject CONTINUE_HERE.md into session context
# OS-aware: works on native Linux, WSL, macOS, and Windows (Git Bash/MSYS)
set -uo pipefail

# --- Platform detection ---
detect_platform() {
  case "$(uname -s)" in
    Darwin) echo "mac" ;;
    Linux)
      if grep -qi microsoft /proc/version 2>/dev/null; then
        echo "wsl"
      else
        echo "linux"
      fi ;;
    MINGW*|MSYS*|CYGWIN*) echo "windows" ;;
    *) echo "unknown" ;;
  esac
}
PLATFORM=${PLATFORM:-$(detect_platform)}

CONTINUE_FILE="$PWD/CONTINUE_HERE.md"

if [ ! -f "$CONTINUE_FILE" ]; then
  exit 0
fi

# Strip CRLF (files on NTFS often have Windows line endings)
CONTENT=$(sed 's/\r$//' "$CONTINUE_FILE")

# JSON-escape: prefer jq, fall back to portable awk
if command -v jq >/dev/null 2>&1; then
  ESCAPED=$(printf '%s' "$CONTENT" | jq -Rsa .)
else
  ESCAPED=$(printf '%s' "$CONTENT" | awk '
    BEGIN { ORS=""; print "\"" }
    {
      gsub(/\\/, "\\\\")
      gsub(/"/, "\\\"")
      gsub(/\t/, "\\t")
      if (NR > 1) print "\\n"
      print
    }
    END { print "\"" }
  ')
fi

cat << EOF
{"hookSpecificOutput":{"sessionStartContext":{"additionalContext":$ESCAPED}}}
EOF
SCRIPT

chmod +x ~/.claude/hooks/continue-here/read-continuation.sh

Add to ~/.claude/settings.json in the SessionStart hooks array:

{
  "type": "command",
  "command": "~/.claude/hooks/continue-here/read-continuation.sh",
  "timeout": 5
}

Got: The hook script exists, is executable, and is registered in settings.json. On next session start, if CONTINUE_HERE.md exists, its content is injected into the session context.

If fail: Check that settings.json is valid JSON after editing. Test the hook manually: cd /your/project && ~/.claude/hooks/continue-here/read-continuation.sh. The script falls back to awk if jq is not installed, so jq is recommended but not required.

Step 7: Add CLAUDE.md Instruction (Optional)

Add a brief instruction to the project's CLAUDE.md so Claude understands the file's purpose:

## Session Continuity

If `CONTINUE_HERE.md` exists in the project root, read it at session start. It contains a structured handoff from a prior session: objective, completed work, in-progress state, next steps, and context. Act on it — acknowledge the continuation, summarize prior state, and propose resuming from the Next Steps section. If the file is older than 24 hours, flag this to the user before proceeding. After the handoff is consumed, the file can be deleted.

Got: CLAUDE.md contains the instruction. Future sessions will read and act on CONTINUE_HERE.md even if the SessionStart hook is not configured.

If fail: If CLAUDE.md does not exist, create it with just this section. If the file is too long, add the instruction near the top where it will not be truncated.

Validation

  • CONTINUE_HERE.md was detected (or absence was handled gracefully)
  • Freshness was assessed (timestamp, branch, post-handoff commits)
  • Resumption plan was presented to and confirmed by the user
  • Work began from the correct Next Steps item
  • The file was cleaned up after consumption
  • (Optional) SessionStart hook script exists and is executable
  • (Optional) CLAUDE.md contains the session continuity instruction

Pitfalls

  • Acting without confirming: Always present the resumption plan to the user. They may have changed their mind about what to work on, even if the file is fresh.
  • Trusting stale files blindly: A continuation file older than 24 hours or from a different branch is a suggestion, not a mandate. Always check freshness.
  • Ignoring the Context section: The most valuable part of the file is often the failed approaches. Skipping this section leads to retrying dead ends.
  • Forgetting to clean up: Leaving CONTINUE_HERE.md after consumption causes confusion in the next session, which will try to act on it again.
  • Treating Completed items as unverified: Unless the user specifically asks, do not re-do completed work. Trust the prior session's assessment.

Related Skills

  • write-continue-here — the complement: writing the continuation file at session end
  • bootstrap-agent-identity — full identity reconstruction that includes continuation detection as one heuristic
  • manage-memory — durable cross-session knowledge (complements this ephemeral handoff)
  • write-claude-md — project instructions where the optional continuity guidance lives

GitHub 저장소

pjt222/agent-almanac
경로: i18n/caveman-lite/skills/read-continue-here
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

연관 스킬

executing-plans

디자인

executing-plans 스킬은 검토 체크포인트가 포함된 통제된 배치로 실행할 완전한 구현 계획이 있을 때 사용합니다. 이 스킬은 계획을 불러와 비판적으로 검토한 후, 소규모 배치(기본값 3개 작업)로 작업을 실행하면서 각 배치 사이에 진행 상황을 아키텍트 검토를 위해 보고합니다. 이를 통해 내재된 품질 관리 체크포인트를 갖춘 체계적인 구현이 보장됩니다.

스킬 보기

requesting-code-review

디자인

이 스킬은 코드 변경 사항을 요구 사항에 따라 분석하기 위해 코드 리뷰어 하위 에이전트를 호출합니다. 작업 완료 후, 주요 기능 구현 후, 또는 메인 브랜치에 병합하기 전에 사용해야 합니다. 이 리뷰는 현재 구현체와 원래 계획을 비교하여 문제를 조기에 발견하는 데 도움이 됩니다.

스킬 보기

connect-mcp-server

디자인

이 스킬은 개발자들이 HTTP, stdio 또는 SSE 전송 방식을 통해 MCP 서버를 Claude Code에 연결하는 포괄적인 가이드를 제공합니다. GitHub, Notion 및 사용자 정의 API와 같은 외부 서비스를 통합하기 위한 설치, 구성, 인증 및 보안을 다룹니다. MCP 통합 설정, 외부 도구 구성 또는 Claude의 모델 컨텍스트 프로토콜 작업 시 활용하세요.

스킬 보기

web-cli-teleport

디자인

이 스킬은 작업 분석을 기반으로 개발자가 Claude Code 웹 인터페이스와 CLI 인터페이스 중 선택할 수 있도록 돕고, 두 환경 간 원활한 세션 텔레포트를 가능하게 합니다. 웹, CLI 또는 모바일 환경 전환 시 세션 상태와 컨텍스트를 관리하여 워크플로를 최적화합니다. 다양한 단계에서 서로 다른 도구가 필요한 복잡한 프로젝트에 사용하세요.

스킬 보기