Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

소개

PRECC란 무엇인가요?

PRECC (Claude Code를 위한 예측 오류 수정) 는 공식 PreToolUse 후크 메커니즘을 통해 Claude Code의 bash 명령을 가로채는 Rust 도구입니다. 오류를 발생하기 전에 수정하여 토큰을 절약하고 재시도 루프를 제거합니다.

커뮤니티 사용자에게 무료.

문제

Claude Code는 예방 가능한 실수에 상당한 토큰을 낭비합니다:

  • 잘못된 디렉토리 오류Cargo.toml이 없는 상위 디렉토리에서 cargo build를 실행한 후 오류를 읽고 재시도합니다.
  • 재시도 루프 – 실패한 명령은 장황한 출력을 생성하고, Claude가 이를 읽고 추론하고 재시도합니다. 각 사이클마다 수백 개의 토큰을 소비합니다.
  • 장황한 출력findls -R 같은 명령은 수천 줄을 출력하여 Claude가 처리해야 합니다.

네 가지 기둥

컨텍스트 수정 (cd-prepend)

cargo buildnpm test 같은 명령이 잘못된 디렉토리에서 실행될 때를 감지하고 실행 전에 cd /올바른/경로 &&를 추가합니다.

GDB 디버깅

세그폴트와 충돌의 심층 디버깅을 위해 GDB를 연결할 기회를 감지하고, 원시 코어 덤프 대신 구조화된 디버그 정보를 제공합니다.

세션 마이닝

Claude Code 세션 로그에서 실패-수정 쌍을 채굴합니다. 동일한 실수가 재발하면 PRECC는 이미 수정을 알고 자동으로 적용합니다.

자동화 스킬

명령 패턴에 일치하고 다시 작성하는 내장 및 채굴된 스킬 라이브러리. 스킬은 TOML 파일 또는 SQLite 행으로 정의되어 검사, 편집, 공유가 쉽습니다.

작동 방식 (30초 버전)

  1. Claude Code가 bash 명령을 실행하려고 합니다.
  2. PreToolUse 후크가 명령을 JSON 형식으로 stdin을 통해 precc-hook에 보냅니다.
  3. precc-hook은 3밀리초 미만으로 파이프라인(스킬, 디렉토리 수정, 압축)을 통해 명령을 처리합니다.
  4. 수정된 명령이 JSON 형식으로 stdout을 통해 반환됩니다.
  5. Claude Code는 원본 대신 수정된 명령을 실행합니다.

사소한 오류는 통합됩니다. 재작성 이유는 후크 응답에 포함되어 있어 모든 수정은 감사 가능하며 묵시적이지 않습니다.

안전 경계

PRECC는 의미적 동등성이 증명 가능하게 보존되거나 사용자가 검증할 수 있는 경우에만 재작성합니다. 파괴적 명령(rm, git push --force, git reset --hard)은 스킬이 일치하더라도 절대 재작성되지 않습니다. 모든 변환은 유계여야 합니다 — 재작성된 명령은 원본 명령의 핵심 토큰을 포함해야 합니다. 무계 재작성은 자동으로 되돌려집니다. 적용된 모든 재작성은 기록되고 표시되어 감사, 비활성화 또는 취소할 수 있습니다.

적응형 압축

명령이 압축 후 실패하면 PRECC가 다음 재시도에서 자동으로 압축을 건너뛰어 Claude가 디버깅을 위한 전체 비압축 출력을 받습니다.

실시간 사용 통계

현재 버전 :

지표
후크 호출 수
절약된 토큰
절약 비율%
RTK 재작성
CD 수정
후크 지연 시간 ms (p50)
고유 사용자

실측 절약 (실제 데이터)

릴리스별 절약

이 수치는 익명화된 텔레메트리에서 자동으로 업데이트됩니다.

링크

설치

빠른 설치 (Linux / macOS)

curl -fsSL https://peria.ai/install.sh | bash

이 명령은 플랫폼에 맞는 최신 릴리스 바이너리를 다운로드하고, SHA256 체크섬을 확인한 후, ~/.local/bin/에 배치합니다.

설치 후 PRECC를 초기화하세요:

precc init

precc init은 Claude Code에 PreToolUse 훅을 등록하고, 데이터 디렉토리를 생성하며, 스킬 데이터베이스를 초기화합니다.

설치 옵션

SHA256 검증

기본적으로 설치 프로그램은 게시된 SHA256 합계와 바이너리 체크섬을 검증합니다. 검증을 건너뛰려면(권장하지 않음):

curl -fsSL https://peria.ai/install.sh | bash -s -- --no-verify

사용자 지정 설치 경로

사용자 지정 위치에 설치:

curl -fsSL https://peria.ai/install.sh | bash -s -- --prefix /opt/precc

동반 도구 (–extras)

PRECC에는 선택적 동반 도구가 포함되어 있습니다. --extras로 설치하세요:

curl -fsSL https://peria.ai/install.sh | bash -s -- --extras

다음을 설치합니다:

도구용도
RTK명령어 재작성 도구 모음
lean-ctxCLAUDE.md 및 프롬프트 파일용 컨텍스트 압축
nushell고급 파이프라인을 위한 구조화된 셸
cocoindex-code더 빠른 컨텍스트 해결을 위한 코드 인덱싱

Windows (PowerShell)

irm https://peria.ai/install.ps1 | iex

그런 다음 초기화하세요:

precc init

수동 설치

  1. 플랫폼에 맞는 릴리스 바이너리를 GitHub Releases에서 다운로드하세요.
  2. 릴리스의 .sha256 파일과 SHA256 체크섬을 확인하세요.
  3. 바이너리를 PATH에 있는 디렉토리(예: ~/.local/bin/)에 배치하세요.
  4. precc init을 실행하세요.

업데이트

precc update

특정 버전으로 강제 업데이트:

precc update --force --version 0.3.0

자동 업데이트 활성화:

precc update --auto

설치 확인

$ precc --version
precc 0.3.0

$ precc savings
Session savings: 0 tokens (no commands intercepted yet)

precc를 찾을 수 없는 경우 ~/.local/binPATH에 포함되어 있는지 확인하세요.

빠른 시작

5분 안에 PRECC를 실행하세요.

1단계: 설치

curl -fsSL https://peria.ai/install.sh | bash

2단계: 초기화

$ precc init
[precc] Hook registered with Claude Code
[precc] Created ~/.local/share/precc/
[precc] Initialized heuristics.db with 8 built-in skills
[precc] Ready.

3단계: 훅이 활성 상태인지 확인

$ precc skills list
  # Name               Type      Triggers
  1 cargo-wrong-dir    built-in  cargo build/test/clippy outside Rust project
  2 git-wrong-dir      built-in  git * outside a repo
  3 go-wrong-dir       built-in  go build/test outside Go module
  4 make-wrong-dir     built-in  make without Makefile in cwd
  5 npm-wrong-dir      built-in  npm/npx/pnpm/yarn outside Node project
  6 python-wrong-dir   built-in  python/pytest/pip outside Python project
  7 jj-translate       built-in  git * in jj-colocated repo
  8 asciinema-gif      built-in  asciinema rec

4단계: Claude Code를 평소처럼 사용

Claude Code를 열고 평소처럼 작업하세요. PRECC는 백그라운드에서 조용히 실행됩니다. Claude가 실패할 명령을 내리면 PRECC가 실행 전에 수정합니다.

예시: 잘못된 디렉토리에서 Cargo Build

프로젝트가 ~/projects/myapp/에 있고 Claude가 다음을 실행한다고 가정합니다:

cargo build

~/projects/에서 (한 단계 위, 거기에 Cargo.toml 없음).

PRECC 없이: Claude가 could not find Cargo.toml in /home/user/projects or any parent directory 오류를 받고, 읽고, 추론한 후 cd myapp && cargo build로 재시도합니다. 비용: ~2,000 토큰 낭비.

PRECC 사용 시: 훅이 누락된 Cargo.toml을 감지하고 myapp/에서 찾아 명령을 다음으로 재작성합니다:

cd /home/user/projects/myapp && cargo build

Claude는 오류를 절대 보지 않습니다. 낭비되는 토큰 제로.

5단계: 절약량 확인

세션 후 PRECC가 절약한 토큰 수를 확인하세요:

$ precc savings
Session Token Savings
=====================
Total estimated savings: 4,312 tokens

Breakdown:
  Pillar 1 (cd prepends):       2,104 tokens  (3 corrections)
  Pillar 4 (skill activations):   980 tokens  (2 activations)
  RTK rewrites:                 1,228 tokens  (5 rewrites)

다음 단계

  • 스킬 – 사용 가능한 모든 스킬과 직접 만드는 방법을 확인하세요.
  • 훅 파이프라인 – 내부에서 무슨 일이 일어나는지 이해하세요.
  • 절약 – 상세한 토큰 절약 분석.

라이선스

PRECC는 두 가지 티어를 제공합니다: Community(무료)와 Pro.

Community 티어 (무료)

Community 티어에는 다음이 포함됩니다:

  • 모든 내장 스킬 (잘못된 디렉토리 수정, jj 변환 등)
  • Pillar 1 및 Pillar 4를 완전히 지원하는 Hook 파이프라인
  • 기본 precc savings 요약
  • precc ingest를 사용한 세션 마이닝
  • 무제한 로컬 사용

Pro 티어

Pro는 추가 기능을 잠금 해제합니다:

  • 상세 절약 분석precc savings --all 명령별 분석 포함
  • GIF 녹화precc gif 애니메이션 터미널 GIF 생성용
  • IP 지오펜스 규정 준수 – 규제 환경용
  • 이메일 보고서precc mail report 분석 전송용
  • GitHub Actions 분석precc gha 실패한 워크플로 디버깅용
  • 컨텍스트 압축precc compress CLAUDE.md 최적화용
  • 우선 지원

라이선스 활성화

$ precc license activate XXXX-XXXX-XXXX-XXXX --email you@example.com
[precc] License activated for you@example.com
[precc] Plan: Pro
[precc] Expires: 2027-04-03

라이선스 상태 확인

$ precc license status
License: Pro
Email:   you@example.com
Expires: 2027-04-03
Status:  Active

GitHub Sponsors 활성화

GitHub Sponsors를 통해 PRECC를 후원하면 GitHub 이메일을 통해 라이선스가 자동으로 활성화됩니다. 키가 필요하지 않습니다 – 후원자 이메일이 일치하는지 확인하세요:

$ precc license status
License: Pro (GitHub Sponsors)
Email:   you@example.com
Status:  Active (auto-renewed)

디바이스 지문

각 라이선스는 디바이스 지문에 연결됩니다. 다음으로 확인하세요:

$ precc license fingerprint
Fingerprint: a1b2c3d4e5f6...

라이선스를 새 머신으로 이전해야 하는 경우 먼저 비활성화하세요:

precc license deactivate

그런 다음 새 머신에서 활성화하세요.

라이선스가 만료되었나요?

Pro 라이선스가 만료되면 PRECC는 Community 티어로 되돌아갑니다. 모든 내장 스킬과 핵심 기능은 계속 작동합니다. Pro 전용 기능만 사용할 수 없게 됩니다. 자세한 내용은 FAQ를 참조하세요.

훅 파이프라인

precc-hook 바이너리는 PRECC의 핵심입니다. Claude Code와 셸 사이에 위치하여 모든 bash 명령을 5밀리초 이내에 처리합니다.

Claude Code가 훅을 호출하는 방법

Claude Code는 PreToolUse 훅을 지원합니다 – 실행 전에 도구 입력을 검사하고 수정할 수 있는 외부 프로그램입니다. Claude가 bash 명령을 실행하려 할 때, stdin으로 precc-hook에 JSON을 보내고 stdout에서 응답을 읽습니다.

파이프라인 단계

Claude Code
    |
    v
+---------------------------+
| 1. Parse JSON stdin       |  Read the command from Claude Code
+---------------------------+
    |
    v
+---------------------------+
| 2. Skill matching         |  Query heuristics.db for matching skills (Pillar 4)
+---------------------------+
    |
    v
+---------------------------+
| 3. Directory correction   |  Resolve correct working directory (Pillar 1)
+---------------------------+
    |
    v
+---------------------------+
| 4. GDB check              |  Detect debug opportunities (Pillar 2)
+---------------------------+
    |
    v
+---------------------------+
| 5. RTK rewriting          |  Apply command rewrites for token savings
+---------------------------+
    |
    v
+---------------------------+
| 6. Emit JSON stdout       |  Return modified command to Claude Code
+---------------------------+
    |
    v
  Shell executes corrected command

예제: JSON 입력 및 출력

입력 (Claude Code에서)

{
  "tool_input": {
    "command": "cargo build"
  }
}

PRECC는 현재 디렉토리에 Cargo.toml이 없지만 ./myapp/Cargo.toml이 존재함을 감지합니다.

출력 (Claude Code로)

{
  "hookSpecificOutput": {
    "updatedInput": {
      "command": "cd /home/user/projects/myapp && cargo build"
    }
  }
}

수정이 필요하지 않으면 updatedInput.command가 비어 있고 Claude Code는 원래 명령을 사용합니다.

단계 세부 정보

단계 1: JSON 파싱

stdin에서 전체 JSON 객체를 읽습니다. tool_input.command를 추출합니다. 파싱에 실패하면 훅이 즉시 종료되고 Claude Code는 원래 명령을 사용합니다(fail-open 설계).

단계 2: 스킬 매칭

SQLite 휴리스틱 데이터베이스에서 트리거 패턴이 명령과 일치하는 스킬을 쿼리합니다. 스킬은 우선순위 순서로 확인됩니다. 내장 TOML 스킬과 마이닝된 스킬 모두 평가됩니다.

단계 3: 디렉토리 수정

빌드 명령(cargo, go, make, npm, python 등)에 대해 예상 프로젝트 파일이 현재 디렉토리에 있는지 확인합니다. 없으면 인근 디렉토리를 스캔하여 가장 가까운 일치를 찾고 cd <dir> &&를 앞에 추가합니다.

디렉토리 스캔은 5초 TTL을 가진 캐시된 파일 시스템 인덱스를 사용하여 빠른 속도를 유지합니다.

단계 4: GDB 확인

명령이 크래시를 일으킬 가능성이 있는 경우(예: 디버그 바이너리 실행), PRECC는 원시 크래시 로그 대신 구조화된 디버그 출력을 캡처하기 위해 GDB 래퍼를 제안하거나 주입할 수 있습니다.

단계 5: RTK 재작성

장황한 명령을 단축하고, 노이즈가 많은 출력을 억제하거나, 토큰 효율성을 위해 명령을 재구성하는 RTK(Rewrite Toolkit) 규칙을 적용합니다.

단계 6: JSON 출력

수정된 명령을 JSON으로 직렬화하여 stdout에 씁니다. 변경 사항이 없으면 출력은 Claude Code에 원래 명령을 사용하도록 신호를 보냅니다.

성능

전체 파이프라인이 5밀리초(p99) 이내에 완료됩니다. 주요 최적화:

  • 잠금 없는 동시 읽기를 위한 WAL 모드의 SQLite
  • 스킬 매칭을 위한 사전 컴파일된 정규식 패턴
  • 캐시된 파일 시스템 스캔(5초 TTL)
  • 핫 경로에 네트워크 호출 없음
  • Fail-open: 모든 오류는 원래 명령으로 넘어감

훅 수동 테스트

훅을 직접 호출할 수 있습니다:

$ echo '{"tool_input":{"command":"cargo build"}}' | precc-hook
{"hookSpecificOutput":{"updatedInput":{"command":"cd /home/user/myapp && cargo build"}}}

스킬

스킬은 PRECC가 명령어를 감지하고 수정하는 데 사용하는 패턴 매칭 규칙입니다. 내장(TOML 파일로 배포) 또는 세션 로그에서 마이닝될 수 있습니다.

내장 스킬

스킬트리거 조건동작
cargo-wrong-dirRust 프로젝트 외부에서 cargo build/test/clippy가장 가까운 Cargo.toml 디렉토리로 cd 추가
git-wrong-dirgit 저장소 외부에서 git *가장 가까운 .git 디렉토리로 cd 추가
go-wrong-dirGo 모듈 외부에서 go build/test가장 가까운 go.mod 디렉토리로 cd 추가
make-wrong-dir현재 디렉토리에 Makefile 없이 make가장 가까운 Makefile 디렉토리로 cd 추가
npm-wrong-dirNode 프로젝트 외부에서 npm/npx/pnpm/yarn가장 가까운 package.json 디렉토리로 cd 추가
python-wrong-dirPython 프로젝트 외부에서 python/pytest/pip가장 가까운 Python 프로젝트로 cd 추가
jj-translatejj 공존 저장소에서 git *동등한 jj 명령어로 재작성
asciinema-gifasciinema recprecc gif로 재작성

스킬 목록

$ precc skills list
  # Name               Type      Triggers
  1 cargo-wrong-dir    built-in  cargo build/test/clippy outside Rust project
  2 git-wrong-dir      built-in  git * outside a repo
  3 go-wrong-dir       built-in  go build/test outside Go module
  4 make-wrong-dir     built-in  make without Makefile in cwd
  5 npm-wrong-dir      built-in  npm/npx/pnpm/yarn outside Node project
  6 python-wrong-dir   built-in  python/pytest/pip outside Python project
  7 jj-translate       built-in  git * in jj-colocated repo
  8 asciinema-gif      built-in  asciinema rec
  9 fix-pytest-path    mined     pytest with wrong test path

스킬 세부 정보 표시

$ precc skills show cargo-wrong-dir
Name:        cargo-wrong-dir
Type:        built-in
Source:      skills/builtin/cargo-wrong-dir.toml
Description: Detects cargo commands run outside a Rust project and prepends
             cd to the directory containing the nearest Cargo.toml.
Trigger:     ^cargo\s+(build|test|clippy|run|check|bench|doc)
Action:      prepend_cd
Marker:      Cargo.toml
Activations: 12

스킬을 TOML로 내보내기

$ precc skills export cargo-wrong-dir
[skill]
name = "cargo-wrong-dir"
description = "Prepend cd for cargo commands outside a Rust project"
trigger = "^cargo\\s+(build|test|clippy|run|check|bench|doc)"
action = "prepend_cd"
marker = "Cargo.toml"
priority = 10

스킬 편집

$ precc skills edit cargo-wrong-dir

이 명령은 $EDITOR에서 스킬 정의를 엽니다. 저장 후 스킬이 자동으로 다시 로드됩니다.

Advise 명령어

precc skills advise는 최근 세션을 분석하고 반복 패턴을 기반으로 새로운 스킬을 제안합니다:

$ precc skills advise
Analyzed 47 commands from the last session.

Suggested skills:
  1. docker-wrong-dir: You ran `docker compose up` outside the project root 3 times.
     Suggested trigger: ^docker\s+compose
     Suggested marker: docker-compose.yml

  2. terraform-wrong-dir: You ran `terraform plan` outside the infra directory 2 times.
     Suggested trigger: ^terraform\s+(plan|apply|init)
     Suggested marker: main.tf

Accept suggestion [1/2/skip]?

스킬 클러스터링

$ precc skills cluster

유사한 마이닝된 스킬을 그룹화하여 중복되거나 겹치는 패턴을 식별하는 데 도움을 줍니다.

마이닝 스킬 vs. 내장 스킬

내장 스킬은 PRECC와 함께 제공되며 skills/builtin/*.toml에 정의되어 있습니다. 가장 흔한 잘못된 디렉토리 실수를 다룹니다.

마이닝된 스킬은 세션 로그에서 precc ingest 또는 precc-learner 데몬에 의해 생성됩니다. ~/.local/share/precc/heuristics.db에 저장되며 워크플로에 특화됩니다. 자세한 내용은 마이닝을 참조하세요.

절약

PRECC는 매 인터셉션에서 추정 토큰 절약량을 추적합니다. precc savings를 사용하여 PRECC가 얼마나 낭비를 방지했는지 확인하세요.

빠른 요약

$ precc savings
Session Token Savings
=====================
Total estimated savings: <span data-stat="session_tokens_saved">8,741</span> tokens

Breakdown:
  Pillar 1 (cd prepends):         <span data-stat="session_p1_tokens">3,204</span> tokens  (<span data-stat="session_p1_count">6</span> corrections)
  Pillar 4 (skill activations):   <span data-stat="session_p4_tokens">1,560</span> tokens  (<span data-stat="session_p4_count">4</span> activations)
  RTK rewrites:                   <span data-stat="session_rtk_tokens">2,749</span> tokens  (<span data-stat="session_rtk_count">11</span> rewrites)
  Lean-ctx wraps:                 <span data-stat="session_lean_tokens">1,228</span> tokens  (<span data-stat="session_lean_count">2</span> wraps)

상세 분석 (Pro)

$ precc savings --all
Session Token Savings (Detailed)
================================
Total estimated savings: <span data-stat="session_tokens_saved">8,741</span> tokens

Command-by-command:
  #  Time   Command                          Saving   Source
  1  09:12  cargo build                      534 tk   cd prepend (cargo-wrong-dir)
  2  09:14  cargo test                       534 tk   cd prepend (cargo-wrong-dir)
  3  09:15  git status                       412 tk   cd prepend (git-wrong-dir)
  4  09:18  npm install                      824 tk   cd prepend (npm-wrong-dir)
  5  09:22  find . -name "*.rs"              387 tk   RTK rewrite (output truncation)
  6  09:25  cat src/main.rs                  249 tk   RTK rewrite (lean-ctx wrap)
  7  09:31  cargo clippy                     534 tk   cd prepend (cargo-wrong-dir)
  ...

Pillar Breakdown:
  Pillar 1 (context resolution):   <span data-stat="session_p1_tokens">3,204</span> tokens  <span data-stat="session_p1_pct">36.6</span>%
  Pillar 2 (GDB debugging):            0 tokens   0.0%
  Pillar 3 (mined preventions):        0 tokens   0.0%
  Pillar 4 (automation skills):    <span data-stat="session_p4_tokens">1,560</span> tokens  <span data-stat="session_p4_pct">17.8</span>%
  RTK rewrites:                    <span data-stat="session_rtk_tokens">2,749</span> tokens  <span data-stat="session_rtk_pct">31.5</span>%
  Lean-ctx wraps:                  <span data-stat="session_lean_tokens">1,228</span> tokens  <span data-stat="session_lean_pct">14.1</span>%

절약량 추정 방법

각 수정 유형에는 PRECC 없이 발생했을 상황을 기반으로 한 예상 토큰 비용이 있습니다:

수정 유형예상 절약근거
cd prepend~500 tokens오류 출력 + Claude 추론 + 재시도
스킬 활성화~400 tokens오류 출력 + Claude 추론 + 재시도
RTK rewrite~250 tokensClaude가 읽어야 할 장황한 출력
Lean-ctx wrap~600 tokens대용량 파일 내용 압축
마이닝된 예방~500 tokens알려진 실패 패턴 회피

이것은 보수적인 추정치입니다. Claude의 오류에 대한 추론이 장황할 수 있으므로 실제 절약량은 종종 더 높습니다.

누적 절약

절약량은 PRECC 데이터베이스에서 세션 간에 유지됩니다. 시간이 지나면서 전체적인 영향을 추적할 수 있습니다:

$ precc savings
Session Token Savings
=====================
Total estimated savings: <span data-stat="session_tokens_saved">8,741</span> tokens

Lifetime savings: <span data-stat="total_tokens_saved">142,389</span> tokens across <span data-stat="total_sessions">47</span> sessions

Status Bar

After installation, PRECC wires a statusLine entry into ~/.claude/settings.json so the Claude Code status bar shows live session metrics:

$0.42 spent | 1.2M in/out | 📊 last cmd: −1.2K | PRECC: 7 fixes | 5.8ms avg | this session: 320 saved over 7 cmds (~$0.05) | lifetime: 8.9K saved over 217 cmds (~$2.85)

Each segment:

SegmentSourceMeaningResets on session restart?
$0.42 spentClaude Code’s cost.total_cost_usdCumulative session cost reported by Claude CodeYes
1.2M in/outClaude Code’s total_input_tokens + total_output_tokensNon-cached input + output tokens across the sessionYes
📊 last cmd: −1.2KPRECC measurement of the most recent Bash commandReal ground-truth saving from re-running the originalNo (persists across sessions)
PRECC: 7 fixesPRECC session aggregate from metrics.logNumber of corrections this session — fix count only, no fake token estimateYes
5.8ms avgPRECC hook latency p50Time PRECC spent processing each tool callYes
bash 18% of totalPRECC post_observations.log filtered by session windowShare of session tokens that came from Bash output — clarifies why PRECC’s savings are naturally a fraction of total cost (PRECC only optimizes Bash output)Yes
this session: 320 saved over 7 cmds (~$0.05)~/.local/share/precc/.lifetime_summary.json minus the per-session baseline at ~/.local/share/precc/sessions/<session_id>.savings_baselineReal per-session delta. Baseline is captured the first time PRECC sees this session_id; subsequent refreshes compute current_lifetime − baseline so the value reflects savings accrued in this session only. Hidden when delta is zero (start of session)Yes (baseline re-snapshots)
lifetime: 8.9K saved over 217 cmds (~$2.85)~/.local/share/precc/.lifetime_summary.json + current session’s cost.total_cost_usd / total_used_tokens rateCumulative tokens saved and re-measured commands since PRECC was first installed, plus an estimated USD value computed from the current session’s per-token rate. Cost estimate is conservative — it uses (input+output) as the denominator while the cost includes cache tokens, so the per-token rate is overstated and the resulting savings figure is lower than actualNo

The lifetime: segment is placed last so it’s the first to be truncated if Claude Code’s UI clips the bar at the right edge.

Why cost and token count don’t divide

The displayed 1.2M in/out is not the denominator that produced $0.42 spent. Claude Code’s cost.total_cost_usd is computed from the API’s full token breakdown — base input, output, plus cache reads and cache creations. The session-wide cumulative cache token counts are not exposed in the statusline schema, so PRECC can only show the visible (non-cache) portion.

On long sessions with heavy file rereads, cache reads can be 10× the visible token count. That’s why pairing the two as a ratio would mislead — PRECC shows them as independent segments instead.

Why PRECC doesn’t compute the cost

The cost number is authoritative. PRECC reads cost.total_cost_usd verbatim from the JSON Claude Code pipes into the status command on stdin. That’s the same number Claude Code charges against your subscription/usage budget. You can verify it any time with the built-in /cost slash command — both should agree.

What drives the cost

For Claude Opus 4.6:

Token typeStandard (≤200k context)1M context tier
Input$15 / MTok$30 / MTok
Output$75 / MTok$150 / MTok
Cache write$18.75 / MTok$37.50 / MTok
Cache read$1.50 / MTok$3 / MTok

The biggest drivers on long sessions are usually:

  1. Output tokens — most expensive per-token type, especially on the 1M context tier
  2. Repeated cache reads — cheap individually but accumulate fast across many turns
  3. Cache creations — written once per file read, ~1.25× the base input rate

PRECC reduces the visible-token cost by compressing Bash output (the 📊 last cmd: segment shows the per-command saving), but it cannot reduce cache reads of files Claude has already loaded.

Stable session counts

The “PRECC: N fixes” segment counts events since the persisted session start, written to ~/.local/share/precc/sessions/<session_id>.start on the first statusline refresh of each session. This makes the count monotonic — it cannot drop mid-session even if cost.total_duration_ms is missing on a particular refresh (which would otherwise collapse the window to “since now” and silently drop nearly all events).

Auto-refreshed lifetime snapshot

The lifetime: segment reads ~/.local/share/precc/.lifetime_summary.json, which is rewritten:

  • On every PostToolUse measurement (so it stays current as commands accumulate)
  • On every precc savings invocation

The this session: segment reads the same lifetime file but subtracts a per-session baseline persisted to ~/.local/share/precc/sessions/<session_id>.savings_baseline on the first refresh of each session.

No need to manually refresh anything — the files update themselves.

Suppressing the status bar

If you’d rather keep your existing status bar, set your own statusLine command in ~/.claude/settings.json. PRECC’s installer will detect the custom value and leave it alone on subsequent updates.

To suppress only the per-interaction 📊 PRECC line (in additionalContext), set PRECC_QUIET=1 in your shell environment.

압축

precc compress는 Claude Code가 로드할 때 토큰 사용량을 줄이기 위해 CLAUDE.md 및 기타 컨텍스트 파일을 축소합니다. Pro 기능입니다.

기본 사용법

$ precc compress .
[precc] Scanning directory: .
[precc] Found 3 context files:
         CLAUDE.md (2,847 tokens -> 1,203 tokens, -57.7%)
         ARCHITECTURE.md (4,112 tokens -> 2,044 tokens, -50.3%)
         ALTERNATIVES.md (3,891 tokens -> 1,967 tokens, -49.5%)
[precc] Total: 10,850 tokens -> 5,214 tokens (-51.9%)
[precc] Files compressed. Use --revert to restore originals.

드라이 런

파일을 수정하지 않고 변경될 내용 미리보기:

$ precc compress . --dry-run
[precc] Dry run -- no files will be modified.
[precc] CLAUDE.md: 2,847 tokens -> 1,203 tokens (-57.7%)
[precc] ARCHITECTURE.md: 4,112 tokens -> 2,044 tokens (-50.3%)
[precc] ALTERNATIVES.md: 3,891 tokens -> 1,967 tokens (-49.5%)
[precc] Total: 10,850 tokens -> 5,214 tokens (-51.9%)

되돌리기

원본은 자동으로 백업됩니다. 복원하려면:

$ precc compress --revert
[precc] Restored 3 files from backups.

무엇이 압축되는가

압축기는 여러 변환을 적용합니다:

  • 불필요한 공백과 빈 줄 제거
  • 의미를 유지하면서 장황한 표현 단축
  • 테이블과 목록 압축
  • 주석과 장식적 서식 제거
  • 모든 코드 블록, 경로, 기술 식별자 보존

압축된 출력은 여전히 사람이 읽을 수 있습니다 – 축소화되거나 난독화되지 않았습니다.

특정 파일 대상 지정

$ precc compress CLAUDE.md
[precc] CLAUDE.md: 2,847 tokens -> 1,203 tokens (-57.7%)

보고서

precc report는 PRECC 활동과 토큰 절감을 요약하는 분석 대시보드를 생성합니다.

보고서 생성

$ precc report
PRECC Report -- 2026-04-03
==========================

Sessions analyzed: 12
Commands intercepted: 87
Total token savings: 42,389

Top skills by activation:
  1. cargo-wrong-dir     34 activations   17,204 tokens saved
  2. npm-wrong-dir       18 activations    9,360 tokens saved
  3. git-wrong-dir       12 activations    4,944 tokens saved
  4. RTK rewrite         15 activations    3,750 tokens saved
  5. python-wrong-dir     8 activations    4,131 tokens saved

Savings by pillar:
  Pillar 1 (context resolution):  28,639 tokens  67.6%
  Pillar 4 (automation skills):    7,000 tokens  16.5%
  RTK rewrites:                    3,750 tokens   8.8%
  Lean-ctx wraps:                  3,000 tokens   7.1%

Recent corrections:
  2026-04-03 09:12  cargo build -> cd myapp && cargo build
  2026-04-03 09:18  npm test -> cd frontend && npm test
  2026-04-03 10:05  git status -> cd repo && git status
  ...

보고서 이메일 전송

이메일 주소로 보고서 전송 (메일 설정 필요, Email 참조):

$ precc report --email
[precc] Report sent to you@example.com

수신자 주소는 ~/.config/precc/mail.toml에서 읽힙니다. precc mail report EMAIL을 사용하여 특정 주소로 보낼 수도 있습니다.

보고서 데이터

보고서는 ~/.local/share/precc/history.db의 로컬 PRECC 데이터베이스에서 생성됩니다. 보고서를 명시적으로 이메일로 보내지 않는 한 데이터는 머신을 떠나지 않습니다.

마이닝

PRECC는 Claude Code 세션 로그를 마이닝하여 실패-수정 패턴을 학습합니다. 같은 실수를 다시 발견하면 자동으로 수정을 적용합니다.

세션 로그 수집

단일 파일 수집

$ precc ingest ~/.claude/logs/session-2026-04-03.jsonl
[precc] Parsing session-2026-04-03.jsonl...
[precc] Found 142 commands, 8 failure-fix pairs
[precc] Stored 8 patterns in history.db
[precc] 2 new skill candidates identified

모든 로그 수집

$ precc ingest --all
[precc] Scanning ~/.claude/logs/...
[precc] Found 23 session files (14 new, 9 already ingested)
[precc] Parsing 14 new files...
[precc] Found 47 failure-fix pairs across 14 sessions
[precc] Stored 47 patterns in history.db
[precc] 5 new skill candidates identified

강제 재수집

이미 수집된 파일을 재처리하려면:

$ precc ingest --all --force
[precc] Re-ingesting all 23 session files...

마이닝 작동 방식

  1. PRECC가 세션 JSONL 로그 파일을 읽습니다.
  2. 첫 번째 명령이 실패하고 두 번째가 수정된 재시도인 명령 쌍을 식별합니다.
  3. 패턴(무엇이 잘못되었는지)과 수정(Claude가 무엇을 다르게 했는지)을 추출합니다.
  4. 패턴은 ~/.local/share/precc/history.db에 저장됩니다.
  5. 패턴이 신뢰도 임계값에 도달하면 heuristics.db의 마이닝 스킬이 됩니다.

패턴 예시

Failure: pytest tests/test_auth.py
Error:   ModuleNotFoundError: No module named 'myapp'
Fix:     cd /home/user/myapp && pytest tests/test_auth.py
Pattern: pytest outside project root -> prepend cd

precc-learner 데몬

precc-learner 데몬은 백그라운드에서 실행되며 새 세션 로그를 자동으로 감시합니다:

$ precc-learner &
[precc-learner] Watching ~/.claude/logs/ for new sessions...
[precc-learner] Processing session-2026-04-03-1412.jsonl... 3 new patterns

데몬은 파일 시스템 알림(Linux의 inotify, macOS의 FSEvents)을 사용하여 세션이 끝나면 즉시 반응합니다.

패턴에서 스킬로

마이닝된 패턴은 다음 기준을 충족하면 스킬로 승격됩니다:

  • 세션 전체에서 최소 3회 확인
  • 일관된 수정 패턴(매번 같은 유형의 수정)
  • 오탐지 없음

스킬 후보를 다음으로 검토할 수 있습니다:

$ precc skills advise

스킬 관리에 대한 자세한 내용은 Skills를 참조하세요.

데이터 저장

  • 실패-수정 쌍: ~/.local/share/precc/history.db
  • 승격된 스킬: ~/.local/share/precc/heuristics.db

둘 다 안전한 동시 접근을 위해 WAL 모드의 SQLite 데이터베이스입니다.

이메일

PRECC는 이메일로 보고서와 파일을 보낼 수 있습니다. 일회성 SMTP 설정이 필요합니다.

설정

$ precc mail setup
SMTP host: smtp.gmail.com
SMTP port [587]: 587
Username: you@gmail.com
Password: ********
From address [you@gmail.com]: you@gmail.com
[precc] Mail configuration saved to ~/.config/precc/mail.toml
[precc] Sending test email to you@gmail.com...
[precc] Test email sent successfully.

구성 파일

구성은 ~/.config/precc/mail.toml에 저장됩니다:

[smtp]
host = "smtp.gmail.com"
port = 587
username = "you@gmail.com"
password = "app-password-here"
from = "you@gmail.com"
tls = true

이 파일을 직접 편집할 수 있습니다:

$EDITOR ~/.config/precc/mail.toml

Gmail의 경우 계정 비밀번호 대신 앱 비밀번호를 사용하세요.

보고서 보내기

$ precc mail report team@example.com
[precc] Generating report...
[precc] Sending to team@example.com...
[precc] Report sent.

파일 보내기

$ precc mail send colleague@example.com output.log
[precc] Sending output.log to colleague@example.com...
[precc] Sent (14.2 KB).

SSH 릴레이 지원

기기가 SMTP 서버에 직접 연결할 수 없는 경우(예: 회사 방화벽 뒤), PRECC는 SSH 터널을 통한 릴레이를 지원합니다:

[smtp]
host = "localhost"
port = 2525

[ssh_relay]
host = "relay.example.com"
user = "you"
remote_port = 587
local_port = 2525

PRECC는 전송 전에 SSH 터널을 자동으로 설정합니다.

GIF 녹화

precc gif는 bash 스크립트에서 터미널 세션의 애니메이션 GIF 녹화를 생성합니다. Pro 기능입니다.

기본 사용법

$ precc gif script.sh 30s
[precc] Recording script.sh (max 30s)...
[precc] Running: echo "Hello, world!"
[precc] Running: cargo build --release
[precc] Running: cargo test
[precc] Recording complete.
[precc] Output: script.gif (1.2 MB, 24s)

첫 번째 인수는 실행할 명령을 포함하는 bash 스크립트입니다. 두 번째 인수는 최대 녹화 시간입니다.

스크립트 형식

스크립트는 표준 bash 파일입니다:

#!/bin/bash
echo "Building project..."
cargo build --release
echo "Running tests..."
cargo test
echo "Done!"

입력 시뮬레이션

대화형 명령의 경우 입력 값을 추가 인수로 제공하세요:

$ precc gif interactive-demo.sh 60s "yes" "my-project" "3"

각 추가 인수는 스크립트가 입력을 요청할 때 stdin 줄로 전달됩니다.

출력 옵션

출력 파일은 기본적으로 스크립트 이름을 따릅니다(script.gif). GIF는 표준 80x24 크기의 어두운 터미널 테마를 사용합니다.

왜 asciinema 대신 GIF인가?

내장 스킬 asciinema-gifasciinema rec를 자동으로 precc gif로 다시 작성합니다. GIF 파일은 더 이식성이 높습니다 – 플레이어 없이 GitHub README, Slack, 이메일에서 인라인으로 표시됩니다.

GitHub Actions 분석

precc gha는 실패한 GitHub Actions 실행을 분석하고 수정 사항을 제안합니다. Pro 기능입니다.

사용법

실패한 GitHub Actions 실행의 URL을 전달합니다:

$ precc gha https://github.com/myorg/myrepo/actions/runs/12345678
[precc] Fetching run 12345678...
[precc] Run: CI / build (ubuntu-latest)
[precc] Status: failure
[precc] Failed step: Run cargo test

[precc] Log analysis:
  Error: test result: FAILED. 2 passed; 1 failed
  Failed test: tests::integration::test_database_connection
  Cause: thread 'tests::integration::test_database_connection' panicked at
         'called Result::unwrap() on an Err value: Connection refused'

[precc] Suggested fix:
  The test requires a database connection but the CI environment does not
  start a database service. Add a services block to your workflow:

    services:
      postgres:
        image: postgres:15
        ports:
          - 5432:5432
        env:
          POSTGRES_PASSWORD: test

기능 설명

  1. GitHub Actions 실행 URL을 파싱하여 소유자, 리포지토리, 실행 ID를 추출합니다.
  2. GitHub API를 통해 실행 로그를 가져옵니다(GITHUB_TOKEN이 설정된 경우 사용, 그렇지 않으면 공개 접근).
  3. 실패한 단계를 식별하고 관련 오류 줄을 추출합니다.
  4. 오류를 분석하고 일반적인 CI 실패 패턴에 기반한 수정을 제안합니다.

지원되는 실패 패턴

  • 누락된 서비스 컨테이너(데이터베이스, Redis 등)
  • 잘못된 러너 OS 또는 아키텍처
  • 누락된 환경 변수 또는 시크릿
  • 종속성 설치 실패
  • 테스트 시간 초과
  • 권한 오류
  • 느린 빌드를 유발하는 캐시 미스

지오펜스

PRECC는 규제 환경을 위한 IP 지오펜스 규정 준수 검사를 포함합니다. Pro 기능입니다.

개요

일부 조직은 개발 도구가 승인된 지리적 리전 내에서만 작동하도록 요구합니다. PRECC의 지오펜스 기능은 현재 기기의 IP 주소가 허용된 리전 목록 내에 있는지 확인합니다.

규정 준수 확인

$ precc geofence check
[precc] Current IP: 203.0.113.42
[precc] Region: US-East (Virginia)
[precc] Status: COMPLIANT
[precc] Policy: us-east-1, us-west-2, eu-west-1

기기가 허용된 리전 외부에 있는 경우:

$ precc geofence check
[precc] Current IP: 198.51.100.7
[precc] Region: AP-Southeast (Singapore)
[precc] Status: NON-COMPLIANT
[precc] Policy: us-east-1, us-west-2, eu-west-1
[precc] Warning: Current region is not in the allowed list.

지오펜스 데이터 새로고침

$ precc geofence refresh
[precc] Fetching updated IP geolocation data...
[precc] Updated. Cache expires in 24h.

지오펜스 정보 보기

$ precc geofence info
Geofence Configuration
======================
Policy file:    ~/.config/precc/geofence.toml
Allowed regions: us-east-1, us-west-2, eu-west-1
Cache age:      2h 14m
Last check:     2026-04-03 09:12:00 UTC
Status:         COMPLIANT

캐시 지우기

$ precc geofence clear
[precc] Geofence cache cleared.

구성

지오펜스 정책은 ~/.config/precc/geofence.toml에 정의됩니다:

[geofence]
allowed_regions = ["us-east-1", "us-west-2", "eu-west-1"]
check_on_init = true
block_on_violation = false

허용된 리전 외부에서 PRECC가 작동하지 않도록 block_on_violation = true를 설정하세요.

텔레메트리

PRECC는 도구 개선을 위한 선택적 익명 텔레메트리를 지원합니다. 명시적으로 동의하지 않는 한 데이터가 수집되지 않습니다.

옵트인

$ precc telemetry consent
[precc] Telemetry enabled. Thank you for helping improve PRECC.
[precc] You can revoke consent at any time with: precc telemetry revoke

옵트아웃

$ precc telemetry revoke
[precc] Telemetry disabled. No further data will be sent.

상태 확인

$ precc telemetry status
Telemetry: disabled
Last sent: never

전송될 데이터 미리보기

옵트인하기 전에 수집될 데이터를 정확히 확인할 수 있습니다:

$ precc telemetry preview
Telemetry payload (this session):
{
  "version": "0.3.0",
  "os": "linux",
  "arch": "x86_64",
  "skills_activated": 12,
  "commands_intercepted": 87,
  "pillars_used": [1, 4],
  "avg_hook_latency_ms": 2.3,
  "session_count": 1
}

수집되는 데이터

  • PRECC 버전, OS 및 아키텍처
  • 집계 카운트: 가로챈 명령, 활성화된 스킬, 사용된 필라
  • 평균 훅 지연 시간
  • 세션 수

수집되지 않는 데이터

  • 명령 텍스트나 인수 없음
  • 파일 경로나 디렉터리 이름 없음
  • 프로젝트 이름이나 저장소 URL 없음
  • 개인 식별 정보(PII) 없음
  • IP 주소 없음 (서버에서 기록하지 않음)

환경 변수 재정의

명령을 실행하지 않고 텔레메트리를 비활성화하려면 (CI 또는 공유 환경에서 유용):

export PRECC_NO_TELEMETRY=1

이것은 동의 설정보다 우선합니다.

데이터 전송 대상

텔레메트리 데이터는 HTTPS를 통해 https://telemetry.peria.ai/v1/precc로 전송됩니다. 데이터는 사용 패턴을 이해하고 개발 우선순위를 정하는 데만 사용됩니다.

마인드맵

이 페이지는 기록된 모든 PRECC 개발 세션과 git 커밋의 SQLite 스냅샷인 mindmap.db에서 자동 생성됩니다. 모든 행은 그 출처(commit:<sha>, session:<id> 또는 doc:<path>)로 거슬러 올라갈 수 있습니다.

개요

  • 분석된 세션: 22
  • 메시지: 14023
  • 도구 호출: 5072
  • 커밋: 205
  • 시간 범위: 2026-03-20T07:04:14.787Z → 2026-04-19T11:50:10.153Z
  • 노력 (토큰):
    • 입력: 27928
    • 출력: 2750669
    • 캐시 쓰기: 43349705
    • 캐시 읽기: 1936351239

기능

범위제목상태커밋토큰처음마지막출처
benchfeat(bench): SWE-bench Verified/Lite driver scaffoldingstabilizing443442992026-04-172026-04-17commit:5bdd027d
benchmark_gate.shfeat: benchmark_gate.sh + pin tb dataset to 0.1.1shipped143442992026-04-172026-04-17commit:99fa9a74
realfeat: real lean-ctx (not stub), wider campaign, doc updatesshipped2298211522026-04-072026-04-17commit:6095720a
precc_mode=benchmarkfeat: PRECC_MODE=benchmark toggle + pairwise benchmark harnessshipped143442992026-04-172026-04-17commit:50c5a30f
addfeat: add precc update self-update commandshipped14425571072026-03-092026-04-17commit:e5542fba
negotiablefeat: negotiable rewrites, skill decay, explain/undo — response to criticshipped143442992026-04-172026-04-17commit:6fda67e4
statuslinefeat: statusline shows actual session token consumption + coststabilizing3254249152026-04-082026-04-13commit:4f65556d
publicfeat: public repo commits attributed to Ce-cyber-artshipped1253821192026-04-102026-04-10commit:0e4840e4
shortfeat: short install URL https://peria.ai/install.shshipped1253821192026-04-092026-04-09commit:615d3d06
rewritefeat: rewrite Pillar 2b (ccc) and Pillar 3 (compress) in Rust for single-binary deploymentshipped2381180742026-03-202026-04-08commit:78621579
shortenfeat: shorten statusline segments to fit narrower terminalsshipped1253821192026-04-082026-04-08commit:ef2c88b4
dropfeat: drop fake token estimate, append cost estimate to lifetime segmentstabilizing2253821192026-04-082026-04-08commit:2702f3f9
updatefeat: update pricing to $5/6mo + $10/yr, add webhook serverstabilizing9381180742026-02-252026-04-08commit:2d366031
clearerfeat: clearer statusline labels — meas:, drop confusing %, add bash shareshipped1253821192026-04-082026-04-08commit:4cd837b7
stablefeat: stable machine_hash for telemetry dedupstabilizing2253821192026-04-082026-04-08commit:3073f428
lifetimefeat: lifetime savings segment in statuslineshipped1253821192026-04-082026-04-08commit:9af422e8
preccfeat: precc analyze frequencies — data-driven rule gap discoveryshipped3253821192026-04-072026-04-08commit:d6f24c50
per-interactionfeat: per-interaction PRECC savings line in PostToolUseshipped1253821192026-04-082026-04-08commit:e3bc282e
webhookfeat: webhook auto-regenerates stats.json on telemetry POSTstabilizing2291341862026-03-312026-04-08commit:912b75f3
per-emailfeat: per-email aggregation for telemetryshipped1253821192026-04-082026-04-08commit:14c95e7d
v0.3.3feat: v0.3.3 — companion tools default-on, install-script clarityshipped1253821192026-04-072026-04-07commit:48fca046
measurementfeat: measurement campaign script — real per-mode measurementsshipped1253821192026-04-072026-04-07commit:36760587
quote-awarefeat: quote-aware chain split + sysadmin tool whitelist (54.2% → 55.5%)shipped1253821192026-04-072026-04-07commit:f6580598
;feat: ; chain support + ssh inner-command parsing for measurementshipped1253821192026-04-072026-04-07commit:10093218
expandfeat: expand is_safe_to_rerun coverage + measurement timeout/cacheshipped1253821192026-04-072026-04-07commit:c5a7ea79
multi-modefeat: multi-mode adaptive compression with failure learningshipped1253821192026-04-072026-04-07commit:81475afc
measuredfeat: measured savings in telemetry, detailed live stats, update nudgeshipped1253821192026-04-062026-04-06commit:06907091
scientificfeat: scientific token savings measurement, telemetry dedup, 28-language docsshipped1253821192026-04-062026-04-06commit:78a20ef2
v0.3.2feat: v0.3.2 — hook safety, adaptive compression, on-demand metrics importshipped1253821192026-04-052026-04-05commit:a0c0c882
self-hostedfeat: self-hosted telemetry endpoint at peria.ai, install UX improvementsshipped125657032026-04-042026-04-04commit:8212a18e
auto-updatefeat: auto-update consent prompt on init and manual updateshipped119243022026-04-022026-04-02commit:818be6dd
useperf: use pre-built binaries for lean-ctx and nushell installationstabilizing4101702522026-03-092026-03-31commit:8c612e55
authorizefeat: authorize peria.ai server for license key generationshipped211863642026-03-312026-03-31commit:53dfe832
licensefeat: license keys, SMTP mail-agent, updated business plan and demosstabilizing2101702522026-03-092026-03-31commit:b07c9dfb
lean-ctxfeat: lean-ctx integration for deep output compressionshipped111863642026-03-312026-03-31commit:07361e62
integratefeat: integrate three-pillar savings from precc-cc (cocoindex-code, token-saver, ClawHub)shipped2101702522026-03-202026-03-31commit:af4205f1
windowsfeat: Windows build via CI, deploy triggers workflowstabilizing225336922026-03-292026-03-29commit:7404761b
monthlyfeat: monthly usage report via email for Pro usersshipped125336922026-03-282026-03-28commit:77ad78bc
nushellfeat: nushell what-if analysis, skill clustering, comment blocker, bash unwrap (v0.2.6)shipped123379412026-03-272026-03-27commit:803df684
geofencefeat: geofence compliance guard, 3rd-party skill Claude interaction tracking (v0.2.5)shipped123379412026-03-262026-03-26commit:0c9fc765
stripefeat: Stripe payment integration, context pressure, GHA analysisshipped224570882026-03-212026-03-22commit:8eb16f78
contextfeat: context pressure warning, GHA analysis, statusline context %shipped121661412026-03-202026-03-20commit:894621ba
statusline,feat: statusline, squash deploy, ClaWHub metadata, SHA256 checksumsshipped121661412026-03-202026-03-20commit:7ab15883
gumroadfeat: Gumroad license verification via API (v0.2.2)shipped102026-03-132026-03-13commit:75c5e480
per-userfeat: per-user email-based license keys with Gumroad webhook (v0.2.2)shipped102026-03-132026-03-13commit:6d056958
posttoolusefeat: PostToolUse observability + comprehensive test coverage (v0.2.1)shipped102026-03-122026-03-12commit:6e33b7e4
multi-toolfeat: multi-tool hook dispatch, subagent propagation & Read/Grep filters (v0.2.0)shipped102026-03-122026-03-12commit:1bf5a108
skillfeat: skill advisor, sharing credits, telemetry & Rust actionbook (v0.1.9)shipped102026-03-122026-03-12commit:d41d310e
firefeat: fire anonymous update-check ping on precc update (opt-out via PRECC_NO_TELEMETRY=1)shipped102026-03-102026-03-10commit:7acce69d
enforcefeat: enforce license tier gates (Free/Pro) on ingest, mined skills, gif, mail, savingsshipped102026-03-102026-03-10commit:a7bd23e3
translatefeat: translate git commands to jj (Jujutsu) in colocated reposshipped102026-03-092026-03-09commit:d8a29e48
rtkfeat(rtk): sync rewrite rules with upstream RTK v0.27.2shipped102026-03-092026-03-09commit:ad7dca0e
applyfeat: apply skill portfolio per command for maximum token savingsshipped102026-03-092026-03-09commit:b2490073
pitchfeat(pitch): add bilingual EN/ZH PowerPoint pitch deckshipped202026-02-272026-02-28commit:8876c4b7
hookperf(hook): skip heuristics.db open via plain-text prefix cacheshipped102026-02-272026-02-27commit:89537483
initfeat(init): embed builtin skills in binary via include_str!shipped102026-02-262026-02-26commit:3a837b13
clifeat(cli): add precc skills export commandshipped202026-02-262026-02-26commit:59beea8d
gdbfeat(gdb): re-enable Pillar 2 GDB hook suggestionshipped102026-02-262026-02-26commit:a8428025
skillsfeat(skills): add git wrong-dir skill and context mappingstabilizing202026-02-252026-02-25commit:352474e1
metricsfeat(metrics): record hook latency, rtk_rewrite, cd_prepend via append-logshipped102026-02-252026-02-25commit:9bf31d12
demofeat(demo): add investor demo suiteshipped102026-02-252026-02-25commit:c818a0ac
securityfeat(security): SQLCipher encryption, binary hardening, multi-platform CIshipped102026-02-252026-02-25commit:efd3dfc8
ingestfeat(ingest): add –force flag to re-mine already-recorded sessionsshipped102026-02-222026-02-22commit:85cc8f6f

종속성 (precc-core 모듈)

  • advisordb, promote, skills
  • dietlean_ctx
  • metricsdb
  • miningskills
  • mode_selectordb, mode
  • multi_probediet, lean_ctx, mode, nushell, post_observe, rtk
  • nushelllean_ctx, mining, rtk
  • promotedb, skills
  • rtklean_ctx
  • sharingdb, license, skills
  • skill_advisormining, nushell
  • skillsdb
  • telemetrydb, license, mining

계획 및 작업

계획 (설계/아키텍처 요청 프롬프트)

  • [proposed] indeed the measurement needs to be based on precc-cc’s established KPI’s. If the two ideas are so close, perhaps you can draft a plan to integrate them (algorithmatically) step-by-step, then start to use Rust (consistent with Precc) to impl… — session:905ff169 (2026-04-18)
  • [proposed] 西班牙语网站上有人评价:中文翻譯(繁體): — session:781fe484 (2026-04-16)
  • [proposed] That’s a really solid framing — using pre-tool-call hooks as quality gates instead of just optimization is a big shift in mindset. You’re essentially moving from “make the model cheaper” to “make the system more correct,” whic… — session:ebd81938 (2026-04-05)
  • [proposed] Plan the integration of both tools, make sure we don’t take their credit and maintain a clear interface so that once it evolves, we can get smaller changes to integrate with their future changes — session:43541885 (2026-03-31)
  • [proposed] for the benchmark, we need to prepare a table to record the comparison for existing historical scenarios, as a “what-if” analysis because there is no way to measure the results for future usages. For this requirement, plan out a step-by-ste… — session:5761d7ca (2026-03-27)
  • [proposed] while bash could be improved using RTK, would its replacement with nushell a better choice for Claude Code? If so, plan an option for replacing bash with nushell to gain better accuracy and hence potentially more token savings by some small… — session:5761d7ca (2026-03-27)

작업 (TaskCreate / TodoWrite 항목)

  • completed: 89
  • in_progress: 3
  • deleted: 2

가장 최근 30개 작업:

  • [completed] Re-ingest and review residual pending — Run precc mindmap build after the fix, then classify the actually-pending tasks (done-but-unclosed vs genuinely-unfinished). — session:0925455d (2026-04-19)
  • [completed] Fold TaskCreate/TaskUpdate + dedupe TodoWrite — Replay TaskCreate/TaskUpdate events per (session_id, taskId) to derive final status. For TodoWrite, keep only the last call per session. — session:0925455d (2026-04-19)
  • [completed] Run ingest and produce MINDMAP.md — Execute ingest on local sessions + git, then render output to docs/MINDMAP.md. — session:0925455d (2026-04-19)
  • [completed] Wire precc mindmap CLI subcommand — Add ingest/render subcommands to precc-cli. — session:0925455d (2026-04-19)
  • [completed] Write mindmap render module — Query DB and render nested markdown mindmap with KPIs, features, plans, blockers. — session:0925455d (2026-04-19)
  • [completed] Write mindmap ingest module — Parse JSONL sessions + git log, extract messages/tokens/commands/decisions into SQLite. — session:0925455d (2026-04-19)
  • [completed] Design SQLite mindmap schema — Tables: sessions, messages, commands, features, plans, tasks, kpis, decisions, dependencies. Every row traces to source (session_id+uuid or commit sha). — session:0925455d (2026-04-19)
  • [in_progress] Step 4: HeaderSlicePass + kernel corpus — Shallow-clone Linux kernel, adapt filter for kernel conventions (Fixes: tag, selftests/ and kunit test-surface detection, .c/.h classification). Measure how many recent fix commits ship with a test an… — session:905ff169 (2026-04-19)
  • [completed] Step 6: concurrency extraction — Add Pipeline::run_parallel_applies that parallelizes applies() via std::thread::scope when pass count ≥ threshold. Falls back to serial below threshold (thread-spawn overhead > savings). Benchmark s… — session:905ff169 (2026-04-19)
  • [completed] [parallel] AST-aware #[test] extractor — Use syn (Rust) or tree-sitter-rust (Python) to detect added #[test] fns in a commit diff and emit a test-only patch. Gates fail→pass verification on this repo. Not blocking; parallel work for the Ru… — session:905ff169 (2026-04-19)
  • [completed] Step 7: precc skvm report tooling — Wire had_solid_hit into metrics log. Add precc skvm report that surfaces pass activation counts, cache hit rate, hook-latency percentiles. Read from metrics.db + skvm_solid_cache. Closes the observa… — session:905ff169 (2026-04-19)
  • [completed] Wire SolidificationPass into live hook — Add stage_solidification_lookup (front, short-circuits on hit) and stage_solidification_record (end) to Pipeline. Gate behind PRECC_SOLIDIFY. Add had_solid_hit flag. Open cache via db::open_metrics fo… — session:905ff169 (2026-04-19)
  • [completed] Step 3: solidification cache — skvm::solid module: Cache (SQLite-backed) with lookup/record, Key with normalization, SolidificationPass at pipeline front. Gated by PRECC_SOLIDIFY=1. Tests with in-memory DB. No wiring into live hook… — session:905ff169 (2026-04-19)
  • [completed] Wire CdPrependPass into hook’s stage_context — Replace the direct context::resolve/apply calls in precc-hook::Pipeline::stage_context with CdPrependPass via HookIR. Verify no hook tests regress; full cargo test green. — session:905ff169 (2026-04-19)
  • [completed] Step 2: migrate cd_prepend through Pass trait — Re-express the existing cd-prepend stage as a Pass impl that reuses the current context resolution. Diff-test: on a fixture corpus, the new pass must produce byte-identical output to the legacy path. … — session:905ff169 (2026-04-19)
  • [completed] Step 5 preview: CrateSlicePass sketch — Implement CrateSlicePass in precc-core::skvm::passes::crate_slice. Detects cargo &lt;build\|test\|check\|clippy&gt; without -p, reads cached cargo metadata, narrows to -p when unambiguous. Wire a minimal K… — session:905ff169 (2026-04-19)
  • [completed] Step 1: Pass trait + HookIR — precc-core::skvm::{pass, ir}. Pass trait with name/capability/applies/run. HookIR holds command, cwd, and mutable output. Capability enum: Detect|Rewrite|Slice|Verify. No behavior change; no passes re… — session:905ff169 (2026-04-19)
  • [completed] Step 0: baseline harness — Add precc-core::skvm::baseline module + precc report --skvm-baseline subcommand. Snapshots K1 (hook latency p50/p99), K3 (token savings total), activation counts from metrics.db into a named baselin… — session:905ff169 (2026-04-19)
  • [completed] Build K3-only replay corpus — For each of the 82 fix-surface commits, derive ground-truth set of changed crates and emit realistic cargo commands. CrateSlicePass evaluation will read this corpus and measure narrowing precision/rec… — session:905ff169 (2026-04-18)
  • [deleted] Run verifier over 33 candidates — Execute verifier, collect verdicts. Apply size gate to verified set. Emit precc_self_corpus.jsonl. — session:905ff169 (2026-04-18)
  • [deleted] Write fail-at-parent verifier — Per candidate: git worktree at parent, apply only test-file diff, cargo test (expect added tests FAIL), reset + apply full commit, cargo test (expect PASS). Per-worktree CARGO_TARGET_DIR to avoid tras… — session:905ff169 (2026-04-18)
  • [completed] Classify test surface of 33 candidates — Split candidates into pure_test_path (tests/ only) vs mixed_file_test (production + #[test] in same file). Reports count by class. Cheap, no cargo. — session:905ff169 (2026-04-18)
  • [completed] Run first Terminal-bench batch (5 tasks) — Execute scripts/benchmark.sh –tasks 5 using OAuth token from subscription as ANTHROPIC_API_KEY. Verify arm A (vanilla) works, then arm B (PRECC), then compare.json. — session:781fe484 (2026-04-17)
  • [completed] Add precc explain and precc undo — explain –since 1h: lists recent rewrites with diff + skill + confidence (reads stash + rewrite_log). undo <id>: re-disables the skill that produced rewrite id. — session:781fe484 (2026-04-16)
  • [completed] Confidence decay on retry-after-rewrite — post_observe: if same command class is retried within 60s after a PRECC rewrite, decrement skill confidence by 0.05 (or count as false-correction event). Below SUGGEST_THRESHOLD (0.3) skill auto-disab… — session:781fe484 (2026-04-16)
  • [completed] Add precc skills disable/enable per-project — CLI commands to disable a skill in the current project (writes to .precc/disabled-skills file at project root). Hook reads this list and skips matching skills. — session:781fe484 (2026-04-16)
  • [completed] Make every rewrite visible via additionalContext — In precc-hook, whenever the pipeline produces a non-trivial rewrite (cd-prepend, skill, RTK, lean-ctx, nushell, diet), append a one-line summary “PRECC rewrote: <orig> -> <new> [reason]” to additional… — session:781fe484 (2026-04-16)
  • [completed] Soften overstated claims in intro — Replace “Claude never sees the error. No tokens wasted.” with measured language matching README. Update strings_intro.sql and re-translate the new key for all 28 langs. — session:781fe484 (2026-04-16)
  • [completed] Fix per-language html lang and dir — build-book.sh must rewrite book.toml language= and text-direction= per language so generated pages have correct lang/dir attributes. RTL for ar, fa. — session:781fe484 (2026-04-16)
  • [completed] Rebuild book and verify — Run scripts/build-book.sh to regenerate introduction.md per language, verify first lines now show translations — session:781fe484 (2026-04-16)

차단 요소 (사용자가 보고한 실패/정체 신호)

  • look at all the historical session logs and executed commands to summarize a mark down document like Mindmap showing (1) the features, status, decisions, dependencies, and effort (tokens releated to its development); (2) the plans, tasks, s… — session:0925455d (2026-04-19)
  • check if it is working? why precc savings –all doesn’t work? — session:ebd81938 (2026-04-13)
  • i tried that url it doesn’t work? — session:ebd81938 (2026-04-08)
  • why I can’t see the “last: “ messages? — session:ebd81938 (2026-04-08)
  • not yet. I would wait to get more data from telemetry to update the website. But now you need to investigate on those “unmeasured” cases, why we cannot measure them? — session:ebd81938 (2026-04-07)
  • regarding the live usage statistics https://precc.cc/en/#live-usage-statistics, we need to report the percentages based on the duration of releases, i.e., how much saving was made by which release (otherwise it is easy to mislead readers to… — session:ebd81938 (2026-04-06)
  • https://precc.cc cannot find the server — session:ebd81938 (2026-04-05)
  • can see key_id mk_1TDiUmFxhHEidPnDw5esdOMa, but cannot reveal or see the sk_live_… — session:d65ad15f (2026-04-01)
  • PS C:\Users\y00577373> iwr -useb https://raw.githubusercontent.com/peria-ai/precc-cc/main/scripts/install.ps1 | iex — session:10175339 (2026-03-30)
  • why can’t you create peria-ai or peri-a-i organizations — session:10175339 (2026-03-28)
  • the hello_world_do example has the following errors: NPU run failed. — session:3b5e2947 (2026-03-22)

결정 및 근거

  • feat(bench): clean-subset metrics (exclude timeouts & infra failures) — When one arm times out or the agent fails to install, the resulting tokens/pass numbers aren’t measuring PRECC — they’re measuring tb’s source: commit:5bdd027d (commit 2026-04-17)
  • fix(bench): drop –include-hook-events (causes 401 Invalid API key) — Adding --include-hook-events to the tb agent command caused Claude Code to return api_error_status=401 on first turn, even though the source: commit:025995d9 (commit 2026-04-17)
  • feat: PRECC_MODE=benchmark toggle + pairwise benchmark harness — Problem (from reviewer): the “trivial vs semantic” error-shaping claim is rhetoric without a measurable boundary. A rewriter that saves tokens source: commit:50c5a30f (commit 2026-04-17)
  • docs: update savings.md.tpl + README to match new statusline labels — - Σ → meas: throughout - New ‘bash X% of total’ segment row in segment table source: commit:2d366031 (commit 2026-04-08)
  • feat: clearer statusline labels — meas:, drop confusing %, add bash share — Three statusline UX changes from user feedback: 1. Lifetime segment renamed from ‘Σ 8.9K (22% over 217)’ to source: commit:4cd837b7 (commit 2026-04-08)
  • docs: explain statusline cost vs token semantics in book + README — Adds a ‘Status Bar’ section to docs/book/templates/savings.md.tpl and README.md explaining: source: commit:6028b64c (commit 2026-04-08)
  • feat: v0.3.3 — companion tools default-on, install-script clarity — The single biggest change: install.sh now installs companion tools (lean-ctx, RTK, nushell, cocoindex-code) BY DEFAULT instead of source: commit:48fca046 (commit 2026-04-07)
  • feat: quote-aware chain split + sysadmin tool whitelist (54.2% → 55.5%) — Three improvements that increase measurable Bash invocation coverage: 1. Quote-aware top-level chain split source: commit:f6580598 (commit 2026-04-07)
  • fix: command_class env stripping, skill validation, ssh/journalctl/kubectl diet rules — 1. command_class strips env prefixes and noise: - RUST_BACKTRACE=1 cargo test → “cargo test” source: commit:f4220343 (commit 2026-04-07)
  • feat: multi-mode adaptive compression with failure learning — New modules: - mode.rs: CompressionMode enum (basic/diet/nushell/lean-ctx/rtk/adaptive-expand) source: commit:81475afc (commit 2026-04-07)
  • test: comprehensive tests for ccc and compress modules (319 → 386 tests) — ccc.rs: +20 tests covering edge cases for is_eligible (flags, whitespace, empty input), extract_pattern (no path, multiple flags, boundary length), source: commit:448430e2 (commit 2026-03-20)
  • feat(gdb): re-enable Pillar 2 GDB hook suggestion — - Add open_history_readonly() to db.rs (same pattern as heuristics) - Add count_recent_failures() to gdb.rs: queries failure_fix_pairs for source: commit:a8428025 (commit 2026-02-26)
  • fix(mining): correct summary counters and orphaned events on –force re-mine — Three bugs fixed: 1. mine_session returned Skipped for sessions with no Bash events even source: commit:3ef089d8 (commit 2026-02-22)
  • 1. Compiled Rust Binary vs Shell ScriptDecision: Replace the rtk-rewrite.sh shell script hook with a compiled Rust binary (precc-hook). Alternatives considered: source: doc:ALTERNATIVES.md
  • 2. SQLite vs Key-Value StoreDecision: Use SQLite for both history.db and heuristics.db. Alternatives considered: source: doc:ALTERNATIVES.md
  • 3. Workspace of 4 Crates vs MonolithDecision: Structure the project as a Cargo workspace with 4 crates: precc-core, precc-hook, precc-cli, precc-learner. Alternatives considered: source: doc:ALTERNATIVES.md
  • 4. GDB Hook Integration vs Standalone CLIDecision: Implement GDB debugging as a CLI command (precc debug) rather than as an automatic hook rewrite. Alternatives considered: source: doc:ALTERNATIVES.md
  • 5. Background Daemon vs On-Demand MiningDecision: Support both modes — precc-learner daemon for continuous mining, precc ingest for on-demand. Alternatives considered: source: doc:ALTERNATIVES.md
  • 6. Confidence ThresholdsDecision: Three-tier confidence system: auto-apply (≥ 0.7), suggest (0.3-0.7), hidden (< 0.3). Alternatives considered: source: doc:ALTERNATIVES.md
  • 7. RTK Subsumption StrategyDecision: Port RTK’s rewriting logic into precc-core as the final pipeline stage, rather than running both hooks in sequence. Alternatives considered: source: doc:ALTERNATIVES.md
  • 8. Skill Storage FormatDecision: TOML files for built-in skills, SQLite rows for mined/user skills. Alternatives considered: source: doc:ALTERNATIVES.md
  • 9. Session Log FormatDecision: Read Claude Code’s native JSONL format directly rather than converting to a custom format. Rationale: Claude Code already writes detailed session logs in JSONL format at ~/.claude/projects/*/. Creating a custom format would mean: source: doc:ALTERNATIVES.md

시간 경과에 따른 KPI

지표단위처음최신Δ샘플최근 출처
atx0.11.25+1.152commit:4f65556d
buildms3480+4772commit:f84bab49
hookms53-22commit:f81e4543
precctokens42387-3362commit:e3bc282e
savedms4.86.3+1.52commit:ec17f16c

세션별 노력 (토큰 기준 상위 10)

세션처음 → 마지막메시지입력출력캐시 쓰기캐시 읽기
ebd819382026-04-04 → 2026-04-1345174547686622246909501020430414
781fe4842026-04-16 → 2026-04-17143413416035963739362259708120
101753392026-03-28 → 2026-03-30131811761024692430047110606429
5761d7ca2026-03-26 → 2026-03-28118043631370562196522116605673
550c7bab2026-03-20 → 2026-03-2210641466104943205973292991217
905ff1692026-04-18 → 2026-04-196501698496929157266863432376
d65ad15f2026-03-31 → 2026-04-0475255878099184564558334554
3b5e29472026-03-22 → 2026-03-2311628961280681526203102403205
0925455d2026-04-19 → 2026-04-19440830262128122605432943523
435418852026-03-31 → 2026-03-31566735382683109632841667559

명령어 참조

모든 PRECC 명령어에 대한 전체 참조.


precc init

PRECC를 초기화하고 Claude Code에 훅을 등록합니다.

precc init

Options:
  (none)

Effects:
  - Registers PreToolUse:Bash hook with Claude Code
  - Creates ~/.local/share/precc/ data directory
  - Initializes heuristics.db with built-in skills
  - Prompts for telemetry consent

precc ingest

세션 로그에서 실패-수정 패턴을 마이닝합니다.

precc ingest [FILE] [--all] [--force]

Arguments:
  FILE            Path to a session log file (.jsonl)

Options:
  --all           Ingest all session logs from ~/.claude/logs/
  --force         Re-process files that were already ingested

Examples:
  precc ingest session.jsonl
  precc ingest --all
  precc ingest --all --force

precc skills

자동화 스킬을 관리합니다.

precc skills list

precc skills list

List all active skills (built-in and mined).

precc skills show

precc skills show NAME

Show detailed information about a specific skill.

Arguments:
  NAME            Skill name (e.g., cargo-wrong-dir)

precc skills export

precc skills export NAME

Export a skill definition as TOML.

Arguments:
  NAME            Skill name

precc skills edit

precc skills edit NAME

Open a skill definition in $EDITOR.

Arguments:
  NAME            Skill name

precc skills advise

precc skills advise

Analyze recent sessions and suggest new skills based on repeated patterns.

precc skills cluster

precc skills cluster

Group similar mined skills to identify redundant or overlapping patterns.

precc report

분석 보고서를 생성합니다.

precc report [--email]

Options:
  --email         Send the report via email (requires mail setup)

precc savings

토큰 절감을 표시합니다.

precc savings [--all]

Options:
  --all           Show detailed per-command breakdown (Pro)

precc compress

토큰 사용량을 줄이기 위해 컨텍스트 파일을 압축합니다.

precc compress [DIR] [--dry-run] [--revert]

Arguments:
  DIR             Directory or file to compress (default: current directory)

Options:
  --dry-run       Preview changes without modifying files
  --revert        Restore files from backup

precc license

PRECC 라이선스를 관리합니다.

precc license activate

precc license activate KEY --email EMAIL

Arguments:
  KEY             License key (XXXX-XXXX-XXXX-XXXX)

Options:
  --email EMAIL   Email address associated with the license

precc license status

precc license status

Display current license status, plan, and expiration.

precc license deactivate

precc license deactivate

Deactivate the license on this machine.

precc license fingerprint

precc license fingerprint

Display the device fingerprint for this machine.

precc mail

이메일 기능.

precc mail setup

precc mail setup

Interactive SMTP configuration. Saves to ~/.config/precc/mail.toml.

precc mail report

precc mail report EMAIL

Send a PRECC analytics report to the specified email address.

Arguments:
  EMAIL           Recipient email address

precc mail send

precc mail send EMAIL FILE

Send a file as an email attachment.

Arguments:
  EMAIL           Recipient email address
  FILE            Path to the file to send

precc update

PRECC를 최신 버전으로 업데이트합니다.

precc update [--force] [--version VERSION] [--auto]

Options:
  --force             Force update even if already on latest
  --version VERSION   Update to a specific version
  --auto              Enable automatic updates

precc telemetry

익명 텔레메트리를 관리합니다.

precc telemetry consent

Opt in to anonymous telemetry.

precc telemetry revoke

precc telemetry revoke

Opt out of telemetry. No further data will be sent.

precc telemetry status

precc telemetry status

Show current telemetry consent status.

precc telemetry preview

precc telemetry preview

Display the telemetry payload that would be sent (without sending it).

precc geofence

IP 지오펜스 준수 (Pro).

precc geofence check

precc geofence check

Check if the current machine is in an allowed region.

precc geofence refresh

precc geofence refresh

Refresh the IP geolocation cache.

precc geofence clear

precc geofence clear

Clear the geofence cache.

precc geofence info

precc geofence info

Display geofence configuration and current status.

precc gif

bash 스크립트에서 애니메이션 GIF 녹화 (Pro).

precc gif SCRIPT LENGTH [INPUTS...]

Arguments:
  SCRIPT          Path to a bash script
  LENGTH          Maximum recording duration (e.g., 30s, 2m)
  INPUTS...       Optional input lines for interactive prompts

Examples:
  precc gif demo.sh 30s
  precc gif interactive.sh 60s "yes" "my-project"

precc gha

실패한 GitHub Actions 실행 분석 (Pro).

precc gha URL

Arguments:
  URL             GitHub Actions run URL

Example:
  precc gha https://github.com/org/repo/actions/runs/12345678

precc cache-hint

현재 프로젝트의 캐시 힌트 정보를 표시합니다.

precc cache-hint

precc trial

Pro 체험판을 시작합니다.

precc trial EMAIL

Arguments:
  EMAIL           Email address for the trial

precc nushell

PRECC 통합으로 Nushell 세션을 시작합니다.

precc nushell

자주 묻는 질문

PRECC는 안전한가요?

네. PRECC는 Claude Code의 공식 PreToolUse 훅 메커니즘을 사용합니다 – Anthropic이 정확히 이 목적을 위해 설계한 확장 포인트입니다. 훅은:

  • 완전히 오프라인으로 실행 (핫 패스에서 네트워크 호출 없음)
  • 5밀리초 이내에 완료
  • 페일 오픈: 문제가 발생하면 원래 명령이 수정 없이 실행
  • 명령만 수정하고 직접 실행하지 않음
  • 로컬 SQLite 데이터베이스에 데이터 저장

PRECC는 다른 AI 코딩 도구와 호환되나요?

PRECC는 Claude Code 전용으로 설계되었습니다. Claude Code가 제공하는 PreToolUse 훅 프로토콜에 의존합니다. Cursor, Copilot, Windsurf 또는 다른 AI 코딩 도구와는 호환되지 않습니다.

텔레메트리는 어떤 데이터를 전송하나요?

텔레메트리는 옵트인 방식입니다. 활성화하면 다음을 전송합니다:

  • PRECC 버전, OS 및 아키텍처
  • 집계 카운트 (가로챈 명령, 활성화된 스킬)
  • 평균 훅 지연 시간

명령 텍스트, 파일 경로, 프로젝트 이름 또는 개인 식별 정보를 전송하지 않습니다. 옵트인 전에 precc telemetry preview로 정확한 페이로드를 미리 볼 수 있습니다. 자세한 내용은 텔레메트리를 참조하세요.

PRECC를 어떻게 제거하나요?

??faq_uninstall_a_intro??

  1. 훅 등록 제거:

    # Delete the hook entry from Claude Code's settings
    # (precc init added it; removing it disables PRECC)
    
  2. 바이너리 제거:

    rm ~/.local/bin/precc ~/.local/bin/precc-hook ~/.local/bin/precc-learner
    
  3. 데이터 제거 (선택):

    rm -rf ~/.local/share/precc/
    rm -rf ~/.config/precc/
    

라이선스가 만료되었습니다. 어떻게 되나요?

PRECC는 Community 티어로 돌아갑니다. 모든 핵심 기능은 계속 작동합니다:

  • 기본 스킬은 활성 상태 유지
  • 훅 파이프라인은 정상 작동
  • precc savings는 요약 보기 표시
  • precc ingest와 세션 마이닝 작동

Pro 기능은 갱신할 때까지 사용할 수 없습니다:

  • precc savings --all (상세 분석)
  • precc compress
  • precc gif
  • precc gha
  • precc geofence
  • 이메일 보고서

훅이 실행되지 않는 것 같습니다. 어떻게 디버그하나요?

??faq_debug_a_intro??

  1. 훅이 등록되어 있는지 확인:

    precc init
    
  2. 훅을 수동으로 테스트:

    echo '{"tool_input":{"command":"cargo build"}}' | precc-hook
    
  3. 바이너리가 PATH에 있는지 확인:

    which precc-hook
    
  4. ~/.claude/settings.json에서 Claude Code 훅 설정을 확인하세요.

PRECC가 Claude Code를 느리게 하나요?

아닙니다. 훅은 5밀리초(p99) 이내에 완료됩니다. 이는 Claude가 추론하고 응답을 생성하는 시간에 비해 감지할 수 없는 수준입니다.

CI/CD에서 PRECC를 사용할 수 있나요?

PRECC는 대화형 Claude Code 세션을 위해 설계되었습니다. CI/CD에서는 연결할 Claude Code 인스턴스가 없습니다. 그러나 precc gha는 모든 환경에서 실패한 GitHub Actions 실행을 분석할 수 있습니다.

마이닝된 스킬은 기본 스킬과 어떻게 다른가요?

기본 스킬은 PRECC와 함께 제공되며 일반적인 잘못된 디렉터리 패턴을 다룹니다. 마이닝된 스킬은 특정 세션 로그에서 학습됩니다. 둘 다 SQLite에 저장되며 훅 파이프라인에서 동일하게 평가됩니다.

팀과 스킬을 공유할 수 있나요?

네. precc skills export NAME으로 스킬을 TOML로 내보내고 파일을 공유할 수 있습니다. 팀원들은 skills/ 디렉터리에 넣거나 휴리스틱 데이터베이스에 가져올 수 있습니다.

다른 언어