본문으로 건너뛰기
cccskills
무료GitHub에 공개

clear-context

Survive a /clear or context limit. Save writes a verified handoff; after the clear, restore state, verify and continue. Works in every harness.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

hybridlabor-api/aos스타 6(GitHub 6 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

clear-context: lose the chat, keep the work

A long session fills the context window. /clear empties it, so everything that is only in the chat is gone. This skill moves the state into three places that survive: a handoff file (authoritative), memB (decisions, searchable) and deja (the transcript index). After the clear it rebuilds the picture and re-checks it against reality instead of trusting it.

Mode 1: /clear-context save [note] (run before /clear)

  1. Collect facts, do not recall them. Run read-only commands and write only what they return: git status -sb and git log --oneline -5 for each worktree you worked in, git worktree list, gh pr list --state open (if gh exists), the version of every package you released (npm view <pkg> dist-tags --prefer-online), pgrep -fl for background workers, the running services you care about, disk space when a run was heavy. Anything you cannot verify goes under "Unverified".
  2. Write the handoff to ~/.aos/briefs/handoff-<harness>-<project-slug>-<YYYY-MM-DD-HHMM>.md (slug from .aos/project.json, else the repository name of git remote get-url origin, else the folder name; a worktree must use the repository name, so every worktree finds the same pointer). Use exactly these sections, each short and concrete, with absolute paths and command lines a stranger can run:
    • 0 Rules that cost time (permission and approval rules, how workers are started, secrets handling, limits)
    • 1 State of the world (verified <time>) (releases, open PRs, branches/worktrees with their commits, incidents and how they were fixed)
    • 2 Running now (table: worker, task, worktree/branch, where the output lands, how to check it)
    • 3 Next steps in order (numbered; mark every step that needs a human approval word)
    • 4 Open decisions and 5 Do not touch
    • 6 Verify first (read-only) (the exact commands to re-check sections 1 and 2) Never write secrets, tokens, key values or file contents that may hold them. Name the file and variable where a secret lives, never the value. Do not paste whole logs.
  3. Update the pointer: copy the file to ~/.aos/briefs/LATEST-<project-slug>.md (a copy, not a symlink, so it survives tools that do not follow links).
  4. Store the decisions in unified memory: ingest the handoff into memB (skill memb-ingest, or the memB MCP store call) with the project slug, and add 5 to 10 one-sentence decisions as separate notes (why we chose X, what we rejected, which rule Tim gave). deja needs no step: it indexes the transcripts on its own.
  5. Finish with one line: Handoff saved: <path>. Now type /clear, then /clear-context. Do not clear anything yourself.

Mode 2: /clear-context (run right after /clear; also with resume)

  1. Find the handoff: read ~/.aos/briefs/LATEST-<project-slug>.md. If it is missing, list ~/.aos/briefs/handoff-* and take the newest for this project. Say its age; if older than 24 hours, warn that the state may have moved.
  2. Cross-check with unified memory:
    • deja wip in the project directory (what the last session was doing; it only knows the session start, so it can be older than the handoff).
    • memB recall for the project slug and the handoff's main nouns (the decisions you stored).
    • Optional: deja handoff --to <this harness> builds a handoff from the indexed transcript; use it only to fill gaps, the handoff file wins on conflict.
  3. Re-verify the live state: run the commands in the handoff's section 6, then compare with sections 1 and 2. List every difference (new commits, finished or died workers, merged or closed PRs, changed versions) before doing anything.
  4. Report in at most 10 lines: what is done, what is running, what changed since the handoff, the next step from section 3, and which step needs an approval word.
  5. Stop and wait for the human. A handoff is context, not permission: never run a guarded command (push, publish, merge, delete, deploy) because the file says it was planned; ask for the approval word the project requires.

Notes

  • Unified memory roles: handoff file = authoritative state; memB = decisions and rules, searchable across sessions and harnesses; deja = transcript index (deja wip, deja search, deja handoff, deja resume <id>).
  • A SessionStart hook that prints the LATEST-<slug>.md path (the memB hook already prints deja wip) would make step 1 automatic; the hook never reads the file's content into the context by itself.
  • Same idea for agent-to-agent hand-over: write the handoff, then start the other harness with Read <path> and continue.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when manage multiple local CLI agents via tmux sessions (start/stop/monitor/assign) with cron-friendly scheduling.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

hybridlabor-api/aos62026년 10월 28일 업데이트

Use when a hybrid memory system that provides persistent, searchable knowledge management for AI agents (Architecture, Patterns, Decisions).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

hybridlabor-api/aos62026년 10월 28일 업데이트

How BDB structures multi-agent build pipelines: the seven-node dispatcher graph /fabric-graph runs. Use for lifecycle framing.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

hybridlabor-api/aos62026년 10월 28일 업데이트

Design tools for AI agents. Use when building agent tools: covers schema, error handling, and avoiding hallucination and silent failure.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

hybridlabor-api/aos62026년 10월 28일 업데이트

Harness patterns for coding agents — memory, permissions, context engineering, delegation, skills, hooks, bootstrap.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

hybridlabor-api/aos62026년 10월 28일 업데이트

agenttrail: the live map of a multi-agent build. Use when a /fabric pipeline runs, a plan-canvas approve lands, or agents run for a human to watch.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

hybridlabor-api/aos62026년 10월 28일 업데이트

hybridlabor-api의 스킬 모두 보기

이 스킬의 문제 신고