Circuit: Command for Claude Code

.claude/commands/door-closing.md

door-closing is a command for Claude Code from CIrcui-try/Circuit. It costs 26 tokens per session (1,128 once invoked), scanned A, original, MIT.

A Git preparation command fetches the latest shared development branch, creates or identifies a worktree for an issue, and saves an implementation plan as a Markdown file. A worktree is a separate working directory connected to the same Git repository.

In plain words
What is it for?
It helps start work linked to an issue, refresh the development branch, choose the issue’s branch name, and record the planned implementation steps.
Why use it?
It prepares an isolated place and written plan for feature work without changing or pushing code. It also tracks whether earlier preparation stages have already been completed.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

This is CIrcui-try/Circuit's own configuration. It tells Claude Code how to work on Circuit itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Circuit configures →

Reuse

Borrowing it

Nothing to install: this file belongs to CIrcui-try/Circuit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/CIrcui-try/Circuit/main/.claude/commands/door-closing.md
Clone the repo
git clone --depth 1 https://github.com/CIrcui-try/Circuit

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for door-closing

README.md
[![agentmods](https://agentmods.dev/badge/commands/circui-try/circuit/door-closing/github.svg)](https://agentmods.dev/commands/circui-try/circuit/door-closing)
Your own site
<a href="https://agentmods.dev/commands/circui-try/circuit/door-closing"><img src="https://agentmods.dev/badge/commands/circui-try/circuit/door-closing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for door-closing

Your own site · 80×15
<a href="https://agentmods.dev/commands/circui-try/circuit/door-closing"><img src="https://agentmods.dev/badge/commands/circui-try/circuit/door-closing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,128 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00026 $0.01128
Opus 5.5 $0.00010 $0.00451
Sonnet 5.5 $0.00005 $0.00226
Haiku 4.5 $0.00003 $0.00113

Measured 2mo ago against content hash a618f5c8d514, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

door-closing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/door-closing.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

이륙 시퀀스의 2단계 (Door-closing). develop을 fetch하고 워크트리를 만든 뒤 구현 계획(plan.md)을 디스크에 작성한다. 코드 변경·푸시는 하지 않는다.

$ARGUMENTS 형식: <ISSUE-ID> [--force]. 예: /door-closing CIR-15.

인자 파싱

  1. $ARGUMENTS 에서 --force 분리. 첫 번째 토큰을 <ISSUE> 로 사용.
  2. <ISSUE> 가 없으면 사용법 안내 후 중단.

상태 파일 경로

  • MAIN_REPO_ROOT = $(git rev-parse --path-format=absolute --git-common-dir | xargs dirname)
  • STATE_FILE = $MAIN_REPO_ROOT/.claude/state/<ISSUE>.json
  • PLAN_FILE = $MAIN_REPO_ROOT/.claude/state/<ISSUE>.plan.md

자동 체이닝

호출 시 <ISSUE> 의 상태 파일을 읽어 다음 순서로 실행:

  1. stages.boarding.done_at 이 null 이거나 --force 가 주어졌으면 /boarding <ISSUE> [--force] 를 먼저 실행. 채워져 있으면 boarding skipped (done at <시각>) 한 줄만 출력.
  2. 그 다음 본 단계 진행.

자기 단계 실행 절차

  1. 스킵 판정: stages.door_closing.done_at 이 채워져 있고 --force 가 없으면 한 줄 요약 출력 후 종료.

  2. 메인 레포로 이동: 워크트리 안이라면 cd $MAIN_REPO_ROOT.

  3. 현재 작업 상태 확인: git status 로 미커밋 변경사항이 있으면 사용자에게 알리고 계속할지 확인.

  4. develop 최신화: git checkout develop && git pull origin develop. 충돌 시 사용자 위임 후 중단.

  5. 브랜치명 결정: 상태 파일의 branch 필드(boarding 단계가 채움) 사용. 비어있으면 Linear MCP get_issue 의 gitBranchName 으로 다시 채움.

  6. 티켓 상태 동기화: Linear 이슈가 Done/Canceled 가 아니면 상태를 In Progress 로 직접 변경한다.

  7. 워크트리 생성:

    • 워크트리 경로: .claude/worktrees/<branch> (메인 레포 기준 상대경로).
    • git worktree add .claude/worktrees/<branch> -b <branch> develop.
    • 동일 브랜치/경로가 이미 있으면:
      • --force 면 사용자에게 “기존 워크트리 삭제 후 재생성?” 확인 받고 git worktree remove --force .claude/worktrees/<branch> 후 재생성.
      • --force 가 없으면 기존 워크트리 재사용 (git worktree add .claude/worktrees/<branch> <branch>).
  8. 구현 계획 작성: 워크트리 안에서 코드 탐색 후 PLAN_FILE 작성:

    # <ISSUE> 구현 계획
    
    ## 목표
    - <한 줄 요약>
    
    ## 변경 파일
    - `<path>` — <변경 사유 한 줄>
    - ...
    
    ## 구현 단계
    1. ...
    2. ...
    
    ## 테스트 전략
    - <pytest / Vitest / Playwright / npm run build 항목별로>
    
    ## 수락 기준 매핑
    - <issue.md 의 수락 기준 → 어떤 변경/테스트로 충족하는지>
    
    ## 리스크 / 미해결 질문
    - ...
    

    탐색 폭이 넓으면 Explore 서브에이전트 1개에 위임.

  9. 상태 파일 갱신: worktree_path, plan_path 채우고 stages.door_closing.done_at = <UTC ISO8601>.

  10. 요약 출력: 워크트리 경로, 변경 파일 수, 구현 단계 수를 한두 문장으로 안내.

Read the full file on GitHub · 80 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 80 lines · 26 tokens per session scan A a618f5c8d514

Subscribe to this mod's changes

door-closing is a command published in the GitHub repository CIrcui-try/Circuit (5 stars, last pushed 5mo ago), licensed MIT. It adds 26 tokens to every session and 1,128 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.