Bevezetés
Mi a PRECC?
PRECC (Prediktív hibakorrektor Claude Code-hoz) egy Rust eszköz, amely a hivatalos PreToolUse hook mechanizmuson keresztül elfogja a Claude Code bash parancsait. A hibákat még a bekövetkezésük előtt javítja, tokeneket takarít meg és kiküszöböli az újrapróbálkozási hurkokat.
Ingyenes közösségi felhasználóknak.
A probléma
A Claude Code jelentős mennyiségű tokent pazarol megelőzhető hibákra:
- Rossz könyvtár hibák –
cargo buildfuttatásaCargo.tomlnélküli szülőkönyvtárban, majd újrapróbálkozás a hiba elolvasása után. - Újrapróbálkozási hurkok – Egy sikertelen parancs bőséges kimenetet produkál, a Claude elolvassa, érvel róla és újrapróbálkozik. Minden ciklus több száz tokent emészt fel.
- Bőséges kimenet – Az olyan parancsok, mint a
findvagyls -Rezreket sornyi kimenetet produkálnak, amelyeket a Claude-nak fel kell dolgoznia.
A négy pillér
Kontextus javítás (cd-prepend)
Észleli, ha parancsok mint a cargo build vagy npm test rossz könyvtárban futnak, és cd /helyes/útvonal && előtagot ad a végrehajtás előtt.
GDB hibakeresés
Felismeri a lehetőségeket a GDB csatlakoztatására a segfaultok és összeomlások mélyebb hibakereséséhez, strukturált hibakeresési információkat biztosítva nyers core dumpok helyett.
Munkamenet-bányászat
A Claude Code munkamenet-naplókat bányássza hiba-javítás párokért. Amikor ugyanaz a hiba megismétlődik, a PRECC már ismeri a javítást és automatikusan alkalmazza.
Automatizálási készségek
Beépített és bányászott készségek könyvtára, amelyek illeszkednek a parancsmintákhoz és átírják azokat. A készségek TOML fájlokként vagy SQLite sorokként vannak definiálva, így könnyen ellenőrizhetők, szerkeszthetők és megoszthatók.
Hogyan működik (30 másodperces verzió)
- A Claude Code készül futtatni egy bash parancsot.
- A PreToolUse hook elküldi a parancsot a
precc-hookszámára JSON-ként a stdin-en. - A
precc-hook3 ezredmásodperc alatt futtatja a parancsot a folyamaton keresztül (készségek, könyvtár-korrekció, tömörítés). - A javított parancs JSON-ként visszakerül a stdout-on.
- A Claude Code az eredeti helyett a javított parancsot futtatja.
A triviális hibák összevonódnak; az átírás indoka a hook válaszában utazik, így minden javítás auditálható — nem csendes.
Biztonsági határ
A PRECC csak akkor ír át, ha a szemantikai ekvivalencia bizonyíthatóan megmarad vagy a felhasználó által ellenőrizhető. A destruktív parancsok (rm, git push --force, git reset --hard) soha nem kerülnek átírásra, még ha egy készség is illeszkedik. Minden mutációnak korlátosnak kell lennie — az átírt parancsnak tartalmaznia kell az eredeti parancs lényegi tokenjeit. A korlátlan átírásokat a rendszer automatikusan visszavonja. Minden alkalmazott átírás naplózásra és megjelenítésre kerül, így auditálhatja, letilthatja vagy visszavonhatja.
Adaptív tömörítés
Ha egy parancs a tömörítés után sikertelen, a PRECC automatikusan kihagyja a tömörítést a következő próbálkozásnál, hogy Claude megkapja a teljes tömörítetlen kimenetet a hibakereséshez.
Élő használati statisztikák
Jelenlegi verzió –:
| Metrika | Érték |
|---|---|
| Hook-hívások | – |
| Megtakarított tokenek | – |
| Megtakarítási arány | –% |
| RTK átírások | – |
| CD-javítások | – |
| Hook késleltetés | – ms (p50) |
| Felhasználók | – |
Measured Savings (Ground Truth)
Megtakarítás verziónként
Ezek a számok automatikusan frissülnek anonimizált telemetriából.
Linkek
- GitHub: https://github.com/peria-ai/precc-cc
- Weboldal: https://peria.ai
- Dokumentáció: https://precc.cc
Telepítés
Gyors telepítés (Linux / macOS)
curl -fsSL https://peria.ai/install.sh | bash
Ez letölti a legújabb kiadás binárisát az Ön platformjára, ellenőrzi a SHA256 ellenőrző összeget, és a ~/.local/bin/ könyvtárba helyezi.
A telepítés után inicializálja a PRECC-et:
precc init
A precc init regisztrálja a PreToolUse hookot a Claude Code-ban, létrehozza az adatkönyvtárakat és inicializálja a készségadatbázist.
Telepítési lehetőségek
SHA256 ellenőrzés
Alapértelmezés szerint a telepítő ellenőrzi a bináris ellenőrző összegét a közzétett SHA256 összeg alapján. Az ellenőrzés kihagyásához (nem ajánlott):
curl -fsSL https://peria.ai/install.sh | bash -s -- --no-verify
Egyéni telepítési előtag
Telepítés egyéni helyre:
curl -fsSL https://peria.ai/install.sh | bash -s -- --prefix /opt/precc
Kiegészítő eszközök (–extras)
A PRECC opcionális kiegészítő eszközökkel érkezik. Telepítse őket a --extras kapcsolóval:
curl -fsSL https://peria.ai/install.sh | bash -s -- --extras
Ez a következőket telepíti:
| Eszköz | Cél |
|---|---|
| RTK | Parancs-újraíró eszközkészlet |
| lean-ctx | Kontextus tömörítés CLAUDE.md és prompt fájlokhoz |
| nushell | Strukturált shell fejlett pipeline-okhoz |
| cocoindex-code | Kódindexelés a gyorsabb kontextusfeloldáshoz |
Windows (PowerShell)
irm https://peria.ai/install.ps1 | iex
Ezután inicializálja:
precc init
Kézi telepítés
- Töltse le a kiadás binárisát platformjához a GitHub Releases oldalról.
- Ellenőrizze a SHA256 ellenőrző összeget a kiadás
.sha256fájljával. - Helyezze a binárist a
PATH-on lévő könyvtárba (pl.~/.local/bin/). - Futtassa a
precc initparancsot.
Frissítés
precc update
Kényszerített frissítés egy adott verzióra:
precc update --force --version 0.3.0
Automatikus frissítések engedélyezése:
precc update --auto
Telepítés ellenőrzése
$ precc --version
precc 0.3.0
$ precc savings
Session savings: 0 tokens (no commands intercepted yet)
Ha a precc nem található, győződjön meg arról, hogy a ~/.local/bin rajta van a PATH-on.
Gyorsindítás
Indítsd el a PRECC-et 5 perc alatt.
1. lépés: Telepítés
curl -fsSL https://peria.ai/install.sh | bash
2. lépés: Inicializálás
$ 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. lépés: Ellenőrizd, hogy a hook aktív
$ 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. lépés: Használd a Claude Code-ot a szokásos módon
Nyisd meg a Claude Code-ot és dolgozz a szokásos módon. A PRECC csendben fut a háttérben. Amikor Claude egy sikertelen parancsot adna ki, a PRECC kijavítja végrehajtás előtt.
Példa: Cargo Build rossz könyvtárban
Tegyük fel, hogy a projekted a ~/projects/myapp/ helyen van, és Claude kiadja:
cargo build
a ~/projects/ könyvtárból (egy szinttel túl magas, nincs ott Cargo.toml).
PRECC nélkül: Claude megkapja a hibát could not find Cargo.toml in /home/user/projects or any parent directory, elolvassa, gondolkodik rajta, majd újrapróbálja: cd myapp && cargo build. Költség: ~2000 token elvesztegetva.
PRECC-kel: A hook észleli a hiányzó Cargo.toml-t, megtalálja a myapp/ mappában, és átírja a parancsot:
cd /home/user/projects/myapp && cargo build
Claude soha nem lát hibát. Nulla token elvesztegetva.
5. lépés: Ellenőrizd a megtakarításokat
Egy munkamenet után nézd meg, hány tokent takarított meg a 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)
Következő lépések
- Képességek – Az összes elérhető képesség és saját készítése.
- Hook Pipeline – Értsd meg, mi történik a háttérben.
- Megtakarítások – Részletes token-megtakarítási elemzés.
Licenc
A PRECC két szintet kínál: Community (ingyenes) és Pro.
Community szint (ingyenes)
A Community szint tartalmazza:
- Minden beépített képesség (könyvtárjavítás, jj fordítás stb.)
- Hook pipeline teljes Pillar 1 és Pillar 4 támogatással
- Alapszintű
precc savingsösszefoglaló - Munkamenet-bányászat a
precc ingestsegítségével - Korlátlan helyi használat
Pro szint
A Pro további funkciókat nyit meg:
- Részletes megtakarítás-bontás –
precc savings --allparancsonkénti elemzéssel - GIF felvétel –
precc gifanimált terminál GIF-ek készítéséhez - IP geofence megfelelőség – Szabályozott környezetekhez
- E-mail jelentések –
precc mail reportelemzések küldéséhez - GitHub Actions elemzés –
precc ghasikertelen munkafolyamatok hibakereséséhez - Kontextus tömörítés –
precc compressa CLAUDE.md optimalizálásához - Elsőbbségi támogatás
Licenc aktiválása
$ 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
Licenc állapot ellenőrzése
$ precc license status
License: Pro
Email: you@example.com
Expires: 2027-04-03
Status: Active
GitHub Sponsors aktiválás
Ha a PRECC-et GitHub Sponsors-on keresztül szponzorálja, a licence automatikusan aktiválódik a GitHub e-mail címén keresztül. Nincs szükség kulcsra – csak győződjön meg róla, hogy a szponzori e-mail egyezik:
$ precc license status
License: Pro (GitHub Sponsors)
Email: you@example.com
Status: Active (auto-renewed)
Eszköz-ujjlenyomat
Minden licenc egy eszköz-ujjlenyomathoz van kötve. Tekintse meg az övét:
$ precc license fingerprint
Fingerprint: a1b2c3d4e5f6...
Ha át kell helyeznie a licencét egy új gépre, először deaktiválja:
precc license deactivate
Ezután aktiválja az új gépen.
Lejárt a licenc?
Ha egy Pro licenc lejár, a PRECC visszaáll a Community szintre. Minden beépített képesség és alapfunkció tovább működik. Csak a Pro-specifikus funkciók válnak elérhetetlenné. Lásd a FAQ oldalt további részletekért.
Hook Pipeline
A precc-hook bináris a PRECC magja. A Claude Code és a shell között helyezkedik el, és minden bash parancsot 5 milliszekundum alatt dolgoz fel.
Hogyan hívja meg a Claude Code a Hookot
A Claude Code támogatja a PreToolUse hookokat – külső programokat, amelyek a végrehajtás előtt megvizsgálhatják és módosíthatják az eszközbemeneteket. Amikor a Claude bash parancsot készül futtatni, JSON-t küld a precc-hook-nak stdin-en és kiolvassa a választ stdout-ról.
Pipeline szakaszok
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
Példa: JSON bemenet és kimenet
Bemenet (Claude Code-tól)
{
"tool_input": {
"command": "cargo build"
}
}
A PRECC észleli, hogy az aktuális könyvtárban nincs Cargo.toml, de ./myapp/Cargo.toml létezik.
Kimenet (Claude Code-nak)
{
"hookSpecificOutput": {
"updatedInput": {
"command": "cd /home/user/projects/myapp && cargo build"
}
}
}
Ha nincs szükség módosításra, az updatedInput.command üres, és a Claude Code az eredeti parancsot használja.
Szakasz részletei
1. szakasz: JSON elemzés
Beolvassa a teljes JSON objektumot stdin-ről. Kinyeri a tool_input.command értéket. Ha az elemzés sikertelen, a hook azonnal kilép, és a Claude Code az eredeti parancsot használja (fail-open tervezés).
2. szakasz: Skill illesztés
Lekérdezi az SQLite heurisztikus adatbázisból azokat a skilleket, amelyek trigger mintája illeszkedik a parancsra. A skillek prioritás szerint kerülnek ellenőrzésre. Mind a beépített TOML skillek, mind a bányászott skillek kiértékelésre kerülnek.
3. szakasz: Könyvtárjavítás
Build parancsok (cargo, go, make, npm, python stb.) esetén ellenőrzi, hogy a várt projektfájl létezik-e az aktuális könyvtárban. Ha nem, a közeli könyvtárakat átvizsgálja a legközelebbi egyezésért és cd <dir> && előtagot ad hozzá.
A könyvtárvizsgálat gyorsítótárazott fájlrendszer-indexet használ 5 másodperces TTL-lel a gyorsaság érdekében.
4. szakasz: GDB ellenőrzés
Ha a parancs valószínűleg összeomlást okoz (pl. debug bináris futtatása), a PRECC GDB-wrappereket javasolhat vagy injektálhat strukturált debug kimenet rögzítéséhez a nyers összeomlás-naplók helyett.
5. szakasz: RTK átírás
RTK (Rewrite Toolkit) szabályokat alkalmaz, amelyek rövidítik a bőbeszédű parancsokat, elnyomják a zajos kimenetet, vagy átstrukturálják a parancsokat a token-hatékonyság érdekében.
6. szakasz: JSON kibocsátás
A módosított parancsot JSON-be sorosítja és stdout-ra írja. Ha nem történt változás, a kimenet jelzi a Claude Code-nak, hogy az eredeti parancsot használja.
Teljesítmény
A teljes pipeline 5 milliszekundum (p99) alatt fejeződik be. Főbb optimalizációk:
- SQLite WAL módban zárolás nélküli párhuzamos olvasáshoz
- Előre fordított regex minták skill illesztéshez
- Gyorsítótárazott fájlrendszer-vizsgálatok (5 másodperces TTL)
- Nincs hálózati hívás a hot path-ban
- Fail-open: bármely hiba esetén az eredeti parancs fut le
A Hook manuális tesztelése
A hookot közvetlenül meghívhatja:
$ echo '{"tool_input":{"command":"cargo build"}}' | precc-hook
{"hookSpecificOutput":{"updatedInput":{"command":"cd /home/user/myapp && cargo build"}}}
Képességek
A képességek azok a mintaillesztési szabályok, amelyeket a PRECC használ a parancsok észlelésére és javítására. Lehetnek beépítettek (TOML fájlokként szállítva) vagy munkamenet-naplókból bányászottak.
Beépített képességek
| Képesség | Aktiválódik | Művelet |
|---|---|---|
cargo-wrong-dir | cargo build/test/clippy Rust projekten kívül | cd hozzáfűzése a legközelebbi Cargo.toml könyvtárhoz |
git-wrong-dir | git * git tárolón kívül | cd hozzáfűzése a legközelebbi .git könyvtárhoz |
go-wrong-dir | go build/test Go modulon kívül | cd hozzáfűzése a legközelebbi go.mod könyvtárhoz |
make-wrong-dir | make Makefile nélkül az aktuális könyvtárban | cd hozzáfűzése a legközelebbi Makefile könyvtárhoz |
npm-wrong-dir | npm/npx/pnpm/yarn Node projekten kívül | cd hozzáfűzése a legközelebbi package.json könyvtárhoz |
python-wrong-dir | python/pytest/pip Python projekten kívül | cd hozzáfűzése a legközelebbi Python projekthez |
jj-translate | git * jj-kolokált tárolóban | Átírás egyenértékű jj parancsra |
asciinema-gif | asciinema rec | Átírás precc gif parancsra |
Képességek listázása
$ 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
Képesség részleteinek megjelenítése
$ 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
Képesség exportálása TOML-ba
$ 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
Képesség szerkesztése
$ precc skills edit cargo-wrong-dir
Ez megnyitja a képesség definícióját a $EDITOR-ban. Mentés után a képesség automatikusan újratöltődik.
Az Advise parancs
A precc skills advise elemzi a legutóbbi munkamenetet és új képességeket javasol ismétlődő minták alapján:
$ 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]?
Képességek csoportosítása
$ precc skills cluster
Csoportosítja a hasonló bányászott képességeket a redundáns vagy átfedő minták azonosításához.
Bányászott és beépített képességek
A beépített képességek a PRECC-kel érkeznek és a skills/builtin/*.toml-ban vannak definiálva. A leggyakoribb rossz könyvtár hibákat fedik le.
A bányászott képességek a precc ingest vagy a precc-learner démon által jönnek létre a munkamenet-naplókból. A ~/.local/share/precc/heuristics.db-ben tárolódnak és specifikusak a munkafolyamatára. Lásd a Bányászat oldalt a részletekért.
Megtakarítások
A PRECC nyomon követi a becsült token-megtakarításokat minden elfogásnál. Használja a precc savings parancsot a megelőzött pazarlás megtekintéséhez.
Gyors összefoglaló
$ 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)
Részletes bontás (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>%
Hogyan becsüljük a megtakarításokat
Minden javítási típusnak van egy becsült token-költsége azon alapulva, mi történt volna PRECC nélkül:
| Javítás típusa | Becsült megtakarítás | Indoklás |
|---|---|---|
| cd prepend | ~500 tokens | Hibakimenet + Claude gondolkodás + újrapróbálás |
| Képesség aktiválás | ~400 tokens | Hibakimenet + Claude gondolkodás + újrapróbálás |
| RTK rewrite | ~250 tokens | Részletes kimenet, amit Claude-nak el kellene olvasnia |
| Lean-ctx wrap | ~600 tokens | Nagy fájltartalom tömörítve |
| Bányászott megelőzés | ~500 tokens | Ismert hibaminta elkerülve |
Ezek konzervatív becslések. A tényleges megtakarítások gyakran magasabbak, mert Claude hibákról való gondolkodása terjedelmes lehet.
Kumulatív megtakarítások
A megtakarítások munkamenetek között megmaradnak a PRECC adatbázisban. Idővel nyomon követheti az összesített hatást:
$ 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:
| Segment | Source | Meaning | Resets on session restart? |
|---|---|---|---|
$0.42 spent | Claude Code’s cost.total_cost_usd | Cumulative session cost reported by Claude Code | Yes |
1.2M in/out | Claude Code’s total_input_tokens + total_output_tokens | Non-cached input + output tokens across the session | Yes |
📊 last cmd: −1.2K | PRECC measurement of the most recent Bash command | Real ground-truth saving from re-running the original | No (persists across sessions) |
PRECC: 7 fixes | PRECC session aggregate from metrics.log | Number of corrections this session — fix count only, no fake token estimate | Yes |
5.8ms avg | PRECC hook latency p50 | Time PRECC spent processing each tool call | Yes |
bash 18% of total | PRECC post_observations.log filtered by session window | Share 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_baseline | Real 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 rate | Cumulative 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 actual | No |
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 type | Standard (≤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:
- Output tokens — most expensive per-token type, especially on the 1M context tier
- Repeated cache reads — cheap individually but accumulate fast across many turns
- 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 savingsinvocation
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.
Tömörítés
A precc compress összezsugorítja a CLAUDE.md-t és más kontextusfájlokat, hogy csökkentse a tokenhasználatot, amikor a Claude Code betölti őket. Ez egy Pro funkció.
Alapvető használat
$ 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.
Próbafuttatás
A változtatások előnézete fájlok módosítása nélkül:
$ 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%)
Visszaállítás
Az eredetik automatikusan mentésre kerülnek. A visszaállításhoz:
$ precc compress --revert
[precc] Restored 3 files from backups.
Mi kerül tömörítésre
A tömörítő több átalakítást alkalmaz:
- Eltávolítja a felesleges szóközöket és üres sorokat
- Rövidíti a bőbeszédű megfogalmazásokat a jelentés megőrzése mellett
- Tömöríti a táblázatokat és listákat
- Eltávolítja a megjegyzéseket és dekoratív formázást
- Megőrzi az összes kódblokkot, útvonalat és technikai azonosítót
A tömörített kimenet továbbra is ember által olvasható – nem minifikált vagy obfuszkált.
Adott fájlok célzása
$ precc compress CLAUDE.md
[precc] CLAUDE.md: 2,847 tokens -> 1,203 tokens (-57.7%)
Jelentések
A precc report egy elemzési irányítópultot generál, amely összefoglalja a PRECC tevékenységét és a tokenmegtakarításokat.
Jelentés készítése
$ 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
...
Jelentés küldése e-mailben
Küldje el a jelentést egy e-mail címre (levelezés beállítása szükséges, lásd Email):
$ precc report --email
[precc] Report sent to you@example.com
A címzett címe a ~/.config/precc/mail.toml fájlból olvasható. A precc mail report EMAIL paranccsal is küldhet adott címre.
Jelentésadatok
A jelentések a helyi PRECC adatbázisból generálódnak: ~/.local/share/precc/history.db. Semmilyen adat nem hagyja el a gépet, hacsak nem küldi el kifejezetten e-mailben a jelentést.
Bányászat
A PRECC a Claude Code munkamenet-naplókat elemzi a hiba-javítás minták megtanulásához. Ha újra ugyanazt a hibát látja, automatikusan alkalmazza a javítást.
Munkamenet-naplók betöltése
Egyetlen fájl betöltése
$ 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
Összes napló betöltése
$ 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
Újbóli betöltés kényszerítése
A már betöltött fájlok újrafeldolgozásához:
$ precc ingest --all --force
[precc] Re-ingesting all 23 session files...
Hogyan működik a bányászat
- A PRECC beolvassa a munkamenet JSONL naplófájlját.
- Azonosítja azokat a parancspárokat, ahol az első parancs sikertelen volt és a második egy javított újrapróbálkozás.
- Kivonja a mintát (mi ment rosszul) és a javítást (mit csinált Claude másképp).
- A minták a
~/.local/share/precc/history.dbfájlban tárolódnak. - Ha egy minta eléri a megbízhatósági küszöböt, bányászott készséggé válik a
heuristics.db-ben.
Példa minta
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
A precc-learner démon
A precc-learner démon a háttérben fut és automatikusan figyeli az új munkamenet-naplókat:
$ precc-learner &
[precc-learner] Watching ~/.claude/logs/ for new sessions...
[precc-learner] Processing session-2026-04-03-1412.jsonl... 3 new patterns
A démon fájlrendszer-értesítéseket használ (inotify Linuxon, FSEvents macOS-en), így azonnal reagál, amikor egy munkamenet véget ér.
Mintáktól a készségekig
A bányászott minták készségekké válnak, ha megfelelnek ezeknek a feltételeknek:
- Legalább 3-szor látták különböző munkamenetekben
- Konzisztens javítási minta (minden alkalommal azonos típusú javítás)
- Nem észleltek hamis pozitívot
A készségjelölteket a következővel tekintheti át:
$ precc skills advise
Lásd a Skills részt a készségek kezelésének részleteiért.
Adattárolás
- Hiba-javítás párok:
~/.local/share/precc/history.db - Előléptetett készségek:
~/.local/share/precc/heuristics.db
Mindkettő SQLite adatbázis WAL módban a biztonságos párhuzamos hozzáféréshez.
A PRECC e-mailben küldhet jelentéseket és fájlokat. Ehhez egyszeri SMTP-beállítás szükséges.
Beállítás
$ 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.
Konfigurációs fájl
A konfiguráció a ~/.config/precc/mail.toml fájlban van tárolva:
[smtp]
host = "smtp.gmail.com"
port = 587
username = "you@gmail.com"
password = "app-password-here"
from = "you@gmail.com"
tls = true
Ezt a fájlt közvetlenül szerkesztheti:
$EDITOR ~/.config/precc/mail.toml
Gmailhez használjon Alkalmazásjelszót a fiókjelszó helyett.
Jelentések küldése
$ precc mail report team@example.com
[precc] Generating report...
[precc] Sending to team@example.com...
[precc] Report sent.
Fájlok küldése
$ precc mail send colleague@example.com output.log
[precc] Sending output.log to colleague@example.com...
[precc] Sent (14.2 KB).
SSH-relay támogatás
Ha a gépe nem éri el közvetlenül az SMTP-szervert (pl. vállalati tűzfal mögött), a PRECC támogatja az SSH-alagúton keresztüli továbbítást:
[smtp]
host = "localhost"
port = 2525
[ssh_relay]
host = "relay.example.com"
user = "you"
remote_port = 587
local_port = 2525
A PRECC automatikusan létrehozza az SSH-alagutat küldés előtt.
GIF-felvétel
A precc gif animált GIF-felvételeket készít terminál-munkamenetekről bash szkriptekből. Ez egy Pro funkció.
Alapvető használat
$ 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)
Az első argumentum egy bash szkript a futtatandó parancsokkal. A második argumentum a maximális felvételi hossz.
Szkript formátum
A szkript egy szabványos bash fájl:
#!/bin/bash
echo "Building project..."
cargo build --release
echo "Running tests..."
cargo test
echo "Done!"
Bemenet szimuláció
Interaktív parancsoknál adja meg a bemeneti értékeket további argumentumként:
$ precc gif interactive-demo.sh 60s "yes" "my-project" "3"
Minden további argumentum stdin-sorként kerül beadásra, amikor a szkript bemenetet kér.
Kimeneti beállítások
A kimeneti fájl alapértelmezés szerint a szkriptről kap nevet (script.gif). A GIF sötét terminál-témát használ szabványos 80x24-es méretekkel.
Miért GIF az asciinema helyett?
Az asciinema-gif beépített készség automatikusan átírja az asciinema rec-et precc gif-re. A GIF-fájlok hordozhatóbbak – megjelennek a GitHub README-kban, Slackben és e-mailben lejátszó nélkül.
GitHub Actions elemzés
A precc gha elemzi a sikertelen GitHub Actions-futásokat és javításokat javasol. Ez egy Pro funkció.
Használat
Adja meg egy sikertelen GitHub Actions-futás URL-jét:
$ 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
Mit csinál
- Elemzi a GitHub Actions futási URL-t a tulajdonos, tároló és futási ID kinyeréséhez.
- Lekéri a futási naplókat a GitHub API-n keresztül (használja a
GITHUB_TOKEN-t ha be van állítva, egyébként nyilvános hozzáférés). - Azonosítja a sikertelen lépést és kivonja a releváns hibasorokat.
- Elemzi a hibát és javítást javasol a gyakori CI-hibaminták alapján.
Támogatott hibaminták
- Hiányzó szolgáltatás-konténerek (adatbázisok, Redis, stb.)
- Hibás runner OS vagy architektúra
- Hiányzó környezeti változók vagy titkok
- Függőségtelepítési hibák
- Teszt időtúllépések
- Jogosultsági hibák
- Cache-hiányok, amelyek lassú buildeket okoznak
Geofence
A PRECC IP geofence megfelelőségi ellenőrzést tartalmaz szabályozott környezetekhez. Ez egy Pro funkció.
Áttekintés
Egyes szervezetek megkövetelik, hogy a fejlesztőeszközök csak jóváhagyott földrajzi régiókban működjenek. A PRECC geofence funkciója ellenőrzi, hogy a jelenlegi gép IP-címe az engedélyezett régiók listáján belül van-e.
Megfelelőségi ellenőrzés
$ 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
Ha a gép az engedélyezett régiókon kívül van:
$ 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.
Geofence adatok frissítése
$ precc geofence refresh
[precc] Fetching updated IP geolocation data...
[precc] Updated. Cache expires in 24h.
Geofence információk megtekintése
$ 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
Gyorsítótár törlése
$ precc geofence clear
[precc] Geofence cache cleared.
Konfiguráció
A geofence-szabályzat a ~/.config/precc/geofence.toml fájlban van meghatározva:
[geofence]
allowed_regions = ["us-east-1", "us-west-2", "eu-west-1"]
check_on_init = true
block_on_violation = false
Állítsa a block_on_violation = true értéket, hogy megakadályozza a PRECC működését az engedélyezett régiókon kívül.
Telemetria
A PRECC támogatja az opcionális anonim telemetriát az eszköz fejlesztése érdekében. Adatokat csak kifejezett hozzájárulás esetén gyűjtünk.
Bekapcsolás
$ precc telemetry consent
[precc] Telemetry enabled. Thank you for helping improve PRECC.
[precc] You can revoke consent at any time with: precc telemetry revoke
Kikapcsolás
$ precc telemetry revoke
[precc] Telemetry disabled. No further data will be sent.
Állapot ellenőrzése
$ precc telemetry status
Telemetry: disabled
Last sent: never
Az elküldendő adatok előnézete
A bekapcsolás előtt pontosan megtekintheti, milyen adatok kerülnének gyűjtésre:
$ 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
}
Mit gyűjtünk
- PRECC verzió, operációs rendszer és architektúra
- Összesített számok: elfogott parancsok, aktivált képességek, használt pillérek
- Átlagos hook késleltetés
- Munkamenetek száma
Mit NEM gyűjtünk
- Nincs parancsszöveg vagy argumentum
- Nincsenek fájlútvonalak vagy könyvtárnevek
- Nincsenek projektnevek vagy tároló URL-ek
- Nincs személyazonosításra alkalmas információ (PII)
- Nincsenek IP-címek (a szerver nem naplózza őket)
Környezeti változó felülírás
A telemetria letiltása parancs nélkül (hasznos CI vagy megosztott környezetekben):
export PRECC_NO_TELEMETRY=1
Ez felülírja a hozzájárulási beállítást.
Adatcél
A telemetriai adatokat HTTPS-en keresztül küldjük a https://telemetry.peria.ai/v1/precc címre. Az adatokat kizárólag a használati minták megértésére és a fejlesztés priorizálására használjuk.
Mindmap
This page is auto-generated from mindmap.db — a SQLite snapshot of all recorded PRECC development sessions and git commits. Every row traces back to its source (commit:<sha>, session:<id>, or doc:<path>).
Overview
- Sessions analyzed: 22
- Messages: 14023
- Tool invocations: 5072
- Commits: 205
- Time range: 2026-03-20T07:04:14.787Z → 2026-04-19T11:50:10.153Z
- Effort (tokens):
- input: 27928
- output: 2750669
- cache writes: 43349705
- cache reads: 1936351239
Features
| Scope | Title | Status | Commits | Tokens | First | Last | Source |
|---|---|---|---|---|---|---|---|
bench | feat(bench): SWE-bench Verified/Lite driver scaffolding | stabilizing | 4 | 4344299 | 2026-04-17 | 2026-04-17 | commit:5bdd027d |
benchmark_gate.sh | feat: benchmark_gate.sh + pin tb dataset to 0.1.1 | shipped | 1 | 4344299 | 2026-04-17 | 2026-04-17 | commit:99fa9a74 |
real | feat: real lean-ctx (not stub), wider campaign, doc updates | shipped | 2 | 29821152 | 2026-04-07 | 2026-04-17 | commit:6095720a |
precc_mode=benchmark | feat: PRECC_MODE=benchmark toggle + pairwise benchmark harness | shipped | 1 | 4344299 | 2026-04-17 | 2026-04-17 | commit:50c5a30f |
add | feat: add precc update self-update command | shipped | 14 | 42557107 | 2026-03-09 | 2026-04-17 | commit:e5542fba |
negotiable | feat: negotiable rewrites, skill decay, explain/undo — response to critic | shipped | 1 | 4344299 | 2026-04-17 | 2026-04-17 | commit:6fda67e4 |
statusline | feat: statusline shows actual session token consumption + cost | stabilizing | 3 | 25424915 | 2026-04-08 | 2026-04-13 | commit:4f65556d |
public | feat: public repo commits attributed to Ce-cyber-art | shipped | 1 | 25382119 | 2026-04-10 | 2026-04-10 | commit:0e4840e4 |
short | feat: short install URL https://peria.ai/install.sh | shipped | 1 | 25382119 | 2026-04-09 | 2026-04-09 | commit:615d3d06 |
rewrite | feat: rewrite Pillar 2b (ccc) and Pillar 3 (compress) in Rust for single-binary deployment | shipped | 2 | 38118074 | 2026-03-20 | 2026-04-08 | commit:78621579 |
shorten | feat: shorten statusline segments to fit narrower terminals | shipped | 1 | 25382119 | 2026-04-08 | 2026-04-08 | commit:ef2c88b4 |
drop | feat: drop fake token estimate, append cost estimate to lifetime segment | stabilizing | 2 | 25382119 | 2026-04-08 | 2026-04-08 | commit:2702f3f9 |
update | feat: update pricing to $5/6mo + $10/yr, add webhook server | stabilizing | 9 | 38118074 | 2026-02-25 | 2026-04-08 | commit:2d366031 |
clearer | feat: clearer statusline labels — meas:, drop confusing %, add bash share | shipped | 1 | 25382119 | 2026-04-08 | 2026-04-08 | commit:4cd837b7 |
stable | feat: stable machine_hash for telemetry dedup | stabilizing | 2 | 25382119 | 2026-04-08 | 2026-04-08 | commit:3073f428 |
lifetime | feat: lifetime savings segment in statusline | shipped | 1 | 25382119 | 2026-04-08 | 2026-04-08 | commit:9af422e8 |
precc | feat: precc analyze frequencies — data-driven rule gap discovery | shipped | 3 | 25382119 | 2026-04-07 | 2026-04-08 | commit:d6f24c50 |
per-interaction | feat: per-interaction PRECC savings line in PostToolUse | shipped | 1 | 25382119 | 2026-04-08 | 2026-04-08 | commit:e3bc282e |
webhook | feat: webhook auto-regenerates stats.json on telemetry POST | stabilizing | 2 | 29134186 | 2026-03-31 | 2026-04-08 | commit:912b75f3 |
per-email | feat: per-email aggregation for telemetry | shipped | 1 | 25382119 | 2026-04-08 | 2026-04-08 | commit:14c95e7d |
v0.3.3 | feat: v0.3.3 — companion tools default-on, install-script clarity | shipped | 1 | 25382119 | 2026-04-07 | 2026-04-07 | commit:48fca046 |
measurement | feat: measurement campaign script — real per-mode measurements | shipped | 1 | 25382119 | 2026-04-07 | 2026-04-07 | commit:36760587 |
quote-aware | feat: quote-aware chain split + sysadmin tool whitelist (54.2% → 55.5%) | shipped | 1 | 25382119 | 2026-04-07 | 2026-04-07 | commit:f6580598 |
; | feat: ; chain support + ssh inner-command parsing for measurement | shipped | 1 | 25382119 | 2026-04-07 | 2026-04-07 | commit:10093218 |
expand | feat: expand is_safe_to_rerun coverage + measurement timeout/cache | shipped | 1 | 25382119 | 2026-04-07 | 2026-04-07 | commit:c5a7ea79 |
multi-mode | feat: multi-mode adaptive compression with failure learning | shipped | 1 | 25382119 | 2026-04-07 | 2026-04-07 | commit:81475afc |
measured | feat: measured savings in telemetry, detailed live stats, update nudge | shipped | 1 | 25382119 | 2026-04-06 | 2026-04-06 | commit:06907091 |
scientific | feat: scientific token savings measurement, telemetry dedup, 28-language docs | shipped | 1 | 25382119 | 2026-04-06 | 2026-04-06 | commit:78a20ef2 |
v0.3.2 | feat: v0.3.2 — hook safety, adaptive compression, on-demand metrics import | shipped | 1 | 25382119 | 2026-04-05 | 2026-04-05 | commit:a0c0c882 |
self-hosted | feat: self-hosted telemetry endpoint at peria.ai, install UX improvements | shipped | 1 | 2565703 | 2026-04-04 | 2026-04-04 | commit:8212a18e |
auto-update | feat: auto-update consent prompt on init and manual update | shipped | 1 | 1924302 | 2026-04-02 | 2026-04-02 | commit:818be6dd |
use | perf: use pre-built binaries for lean-ctx and nushell installation | stabilizing | 4 | 10170252 | 2026-03-09 | 2026-03-31 | commit:8c612e55 |
authorize | feat: authorize peria.ai server for license key generation | shipped | 2 | 1186364 | 2026-03-31 | 2026-03-31 | commit:53dfe832 |
license | feat: license keys, SMTP mail-agent, updated business plan and demos | stabilizing | 2 | 10170252 | 2026-03-09 | 2026-03-31 | commit:b07c9dfb |
lean-ctx | feat: lean-ctx integration for deep output compression | shipped | 1 | 1186364 | 2026-03-31 | 2026-03-31 | commit:07361e62 |
integrate | feat: integrate three-pillar savings from precc-cc (cocoindex-code, token-saver, ClawHub) | shipped | 2 | 10170252 | 2026-03-20 | 2026-03-31 | commit:af4205f1 |
windows | feat: Windows build via CI, deploy triggers workflow | stabilizing | 2 | 2533692 | 2026-03-29 | 2026-03-29 | commit:7404761b |
monthly | feat: monthly usage report via email for Pro users | shipped | 1 | 2533692 | 2026-03-28 | 2026-03-28 | commit:77ad78bc |
nushell | feat: nushell what-if analysis, skill clustering, comment blocker, bash unwrap (v0.2.6) | shipped | 1 | 2337941 | 2026-03-27 | 2026-03-27 | commit:803df684 |
geofence | feat: geofence compliance guard, 3rd-party skill Claude interaction tracking (v0.2.5) | shipped | 1 | 2337941 | 2026-03-26 | 2026-03-26 | commit:0c9fc765 |
stripe | feat: Stripe payment integration, context pressure, GHA analysis | shipped | 2 | 2457088 | 2026-03-21 | 2026-03-22 | commit:8eb16f78 |
context | feat: context pressure warning, GHA analysis, statusline context % | shipped | 1 | 2166141 | 2026-03-20 | 2026-03-20 | commit:894621ba |
statusline, | feat: statusline, squash deploy, ClaWHub metadata, SHA256 checksums | shipped | 1 | 2166141 | 2026-03-20 | 2026-03-20 | commit:7ab15883 |
gumroad | feat: Gumroad license verification via API (v0.2.2) | shipped | 1 | 0 | 2026-03-13 | 2026-03-13 | commit:75c5e480 |
per-user | feat: per-user email-based license keys with Gumroad webhook (v0.2.2) | shipped | 1 | 0 | 2026-03-13 | 2026-03-13 | commit:6d056958 |
posttooluse | feat: PostToolUse observability + comprehensive test coverage (v0.2.1) | shipped | 1 | 0 | 2026-03-12 | 2026-03-12 | commit:6e33b7e4 |
multi-tool | feat: multi-tool hook dispatch, subagent propagation & Read/Grep filters (v0.2.0) | shipped | 1 | 0 | 2026-03-12 | 2026-03-12 | commit:1bf5a108 |
skill | feat: skill advisor, sharing credits, telemetry & Rust actionbook (v0.1.9) | shipped | 1 | 0 | 2026-03-12 | 2026-03-12 | commit:d41d310e |
fire | feat: fire anonymous update-check ping on precc update (opt-out via PRECC_NO_TELEMETRY=1) | shipped | 1 | 0 | 2026-03-10 | 2026-03-10 | commit:7acce69d |
enforce | feat: enforce license tier gates (Free/Pro) on ingest, mined skills, gif, mail, savings | shipped | 1 | 0 | 2026-03-10 | 2026-03-10 | commit:a7bd23e3 |
translate | feat: translate git commands to jj (Jujutsu) in colocated repos | shipped | 1 | 0 | 2026-03-09 | 2026-03-09 | commit:d8a29e48 |
rtk | feat(rtk): sync rewrite rules with upstream RTK v0.27.2 | shipped | 1 | 0 | 2026-03-09 | 2026-03-09 | commit:ad7dca0e |
apply | feat: apply skill portfolio per command for maximum token savings | shipped | 1 | 0 | 2026-03-09 | 2026-03-09 | commit:b2490073 |
pitch | feat(pitch): add bilingual EN/ZH PowerPoint pitch deck | shipped | 2 | 0 | 2026-02-27 | 2026-02-28 | commit:8876c4b7 |
hook | perf(hook): skip heuristics.db open via plain-text prefix cache | shipped | 1 | 0 | 2026-02-27 | 2026-02-27 | commit:89537483 |
init | feat(init): embed builtin skills in binary via include_str! | shipped | 1 | 0 | 2026-02-26 | 2026-02-26 | commit:3a837b13 |
cli | feat(cli): add precc skills export command | shipped | 2 | 0 | 2026-02-26 | 2026-02-26 | commit:59beea8d |
gdb | feat(gdb): re-enable Pillar 2 GDB hook suggestion | shipped | 1 | 0 | 2026-02-26 | 2026-02-26 | commit:a8428025 |
skills | feat(skills): add git wrong-dir skill and context mapping | stabilizing | 2 | 0 | 2026-02-25 | 2026-02-25 | commit:352474e1 |
metrics | feat(metrics): record hook latency, rtk_rewrite, cd_prepend via append-log | shipped | 1 | 0 | 2026-02-25 | 2026-02-25 | commit:9bf31d12 |
demo | feat(demo): add investor demo suite | shipped | 1 | 0 | 2026-02-25 | 2026-02-25 | commit:c818a0ac |
security | feat(security): SQLCipher encryption, binary hardening, multi-platform CI | shipped | 1 | 0 | 2026-02-25 | 2026-02-25 | commit:efd3dfc8 |
ingest | feat(ingest): add –force flag to re-mine already-recorded sessions | shipped | 1 | 0 | 2026-02-22 | 2026-02-22 | commit:85cc8f6f |
Dependencies (precc-core modules)
advisor→db,promote,skillsdiet→lean_ctxmetrics→dbmining→skillsmode_selector→db,modemulti_probe→diet,lean_ctx,mode,nushell,post_observe,rtknushell→lean_ctx,mining,rtkpromote→db,skillsrtk→lean_ctxsharing→db,license,skillsskill_advisor→mining,nushellskills→dbtelemetry→db,license,mining
Plans & Tasks
Plans (prompts requesting design/architecture)
- [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)
Tasks (TaskCreate / TodoWrite entries)
- completed: 89
- in_progress: 3
- deleted: 2
Most recent 30 tasks:
- [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 reportthat 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 <build\|test\|check\|clippy>without -p, reads cachedcargo 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-baselinesubcommand. 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)
Blockers (user-reported failure/stuck signals)
- 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)
Decisions & Rationale
- 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-eventsto 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 Script — Decision: Replace the
rtk-rewrite.shshell script hook with a compiled Rust binary (precc-hook). Alternatives considered: source:doc:ALTERNATIVES.md - 2. SQLite vs Key-Value Store — Decision: Use SQLite for both
history.dbandheuristics.db. Alternatives considered: source:doc:ALTERNATIVES.md - 3. Workspace of 4 Crates vs Monolith — Decision: 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 CLI — Decision: 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 Mining — Decision: Support both modes —
precc-learnerdaemon for continuous mining,precc ingestfor on-demand. Alternatives considered: source:doc:ALTERNATIVES.md - 6. Confidence Thresholds — Decision: 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 Strategy — Decision: Port RTK’s rewriting logic into
precc-coreas the final pipeline stage, rather than running both hooks in sequence. Alternatives considered: source:doc:ALTERNATIVES.md - 8. Skill Storage Format — Decision: TOML files for built-in skills, SQLite rows for mined/user skills. Alternatives considered: source:
doc:ALTERNATIVES.md - 9. Session Log Format — Decision: 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
KPIs over time
| Metric | Unit | First | Latest | Δ | Samples | Last source |
|---|---|---|---|---|---|---|
at | x | 0.1 | 1.25 | +1.15 | 2 | commit:4f65556d |
build | ms | 3 | 480 | +477 | 2 | commit:f84bab49 |
hook | ms | 5 | 3 | -2 | 2 | commit:f81e4543 |
precc | tokens | 423 | 87 | -336 | 2 | commit:e3bc282e |
saved | ms | 4.8 | 6.3 | +1.5 | 2 | commit:ec17f16c |
Effort by session (top 10 by tokens)
| Session | First → Last | Msgs | input | output | Cache write | Cache read |
|---|---|---|---|---|---|---|
ebd81938 | 2026-04-04 → 2026-04-13 | 4517 | 4547 | 686622 | 24690950 | 1020430414 |
781fe484 | 2026-04-16 → 2026-04-17 | 1434 | 1341 | 603596 | 3739362 | 259708120 |
10175339 | 2026-03-28 → 2026-03-30 | 1318 | 1176 | 102469 | 2430047 | 110606429 |
5761d7ca | 2026-03-26 → 2026-03-28 | 1180 | 4363 | 137056 | 2196522 | 116605673 |
550c7bab | 2026-03-20 → 2026-03-22 | 1064 | 1466 | 104943 | 2059732 | 92991217 |
905ff169 | 2026-04-18 → 2026-04-19 | 650 | 1698 | 496929 | 1572668 | 63432376 |
d65ad15f | 2026-03-31 → 2026-04-04 | 752 | 558 | 78099 | 1845645 | 58334554 |
3b5e2947 | 2026-03-22 → 2026-03-23 | 1162 | 896 | 128068 | 1526203 | 102403205 |
0925455d | 2026-04-19 → 2026-04-19 | 440 | 830 | 262128 | 1226054 | 32943523 |
43541885 | 2026-03-31 → 2026-03-31 | 566 | 7353 | 82683 | 1096328 | 41667559 |
Parancsreferencia
Teljes referencia az összes PRECC parancshoz.
precc init
A PRECC inicializálása és a hook regisztrálása a Claude Code-ban.
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
Munkamenet-naplók bányászata hiba-javítás mintákért.
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
Automatizálási képességek kezelése.
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
Elemzési jelentés generálása.
precc report [--email]
Options:
--email Send the report via email (requires mail setup)
precc savings
Token megtakarítások megjelenítése.
precc savings [--all]
Options:
--all Show detailed per-command breakdown (Pro)
precc compress
Kontextusfájlok tömörítése a tokenhasználat csökkentése érdekében.
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
A PRECC licenc kezelése.
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
E-mail funkció.
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
A PRECC frissítése a legújabb verzióra.
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
Anonim telemetria kezelése.
precc telemetry consent
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 geofence megfelelőség (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
Animált GIF-ek rögzítése bash szkriptekből (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
Sikertelen GitHub Actions futások elemzése (Pro).
precc gha URL
Arguments:
URL GitHub Actions run URL
Example:
precc gha https://github.com/org/repo/actions/runs/12345678
precc cache-hint
Gyorsítótár-tipp információk megjelenítése az aktuális projekthez.
precc cache-hint
precc trial
Pro próbaverzió indítása.
precc trial EMAIL
Arguments:
EMAIL Email address for the trial
precc nushell
Nushell munkamenet indítása PRECC integrációval.
precc nushell
GYIK
Biztonságos a PRECC használata?
Igen. A PRECC a Claude Code hivatalos PreToolUse hook mechanizmusát használja – ugyanazt a bővítési pontot, amelyet az Anthropic pontosan erre a célra tervezett. A hook:
- Teljesen offline fut (nincs hálózati hívás a kritikus útvonalon)
- 5 ezredmásodperc alatt befejeződik
- Fail-open: ha bármi rosszul megy, az eredeti parancs módosítatlanul fut
- Csak módosítja a parancsokat, soha nem hajtja végre őket
- Adatokat helyben SQLite adatbázisokban tárol
Működik a PRECC más AI kódolóeszközökkel?
A PRECC kifejezetten a Claude Code-hoz készült. A Claude Code által biztosított PreToolUse hook protokollra támaszkodik. Nem működik a Cursor, Copilot, Windsurf vagy más AI kódolóeszközökkel.
Milyen adatokat küld a telemetria?
A telemetria csak opt-in. Ha engedélyezve van, elküldi:
- PRECC verzió, operációs rendszer és architektúra
- Összesített számok (elfogott parancsok, aktivált képességek)
- Átlagos hook késleltetés
Nem küld parancsszöveget, fájlútvonalakat, projektneveket vagy személyazonosításra alkalmas információt. A pontos adatcsomagot megtekintheti a precc telemetry preview paranccsal. Lásd Telemetria a részletekért.
Hogyan távolítom el a PRECC-et?
??faq_uninstall_a_intro??
-
Hook regisztráció eltávolítása:
# Delete the hook entry from Claude Code's settings # (precc init added it; removing it disables PRECC) -
Bináris fájl eltávolítása:
rm ~/.local/bin/precc ~/.local/bin/precc-hook ~/.local/bin/precc-learner -
Adatok eltávolítása (opcionális):
rm -rf ~/.local/share/precc/ rm -rf ~/.config/precc/
Lejárt a licencem. Mi történik?
A PRECC visszatér a Community szintre. Minden alapfunkció tovább működik:
- A beépített képességek aktívak maradnak
- A hook pipeline normálisan fut
- A
precc savingsaz összefoglaló nézetet mutatja - A
precc ingestés a munkamenet bányászat működik
A Pro funkciók a megújításig nem elérhetők:
precc savings --all(részletes bontás)precc compressprecc gifprecc ghaprecc geofence- E-mail jelentések
A hook nem tűnik futónak. Hogyan debugolok?
??faq_debug_a_intro??
-
Ellenőrizze, hogy a hook regisztrálva van-e:
precc init -
Tesztelje a hookot manuálisan:
echo '{"tool_input":{"command":"cargo build"}}' | precc-hook -
Ellenőrizze, hogy a bináris fájl a PATH-ban van-e:
which precc-hook -
Ellenőrizze a Claude Code hook konfigurációját a
~/.claude/settings.jsonfájlban.
Lassítja a PRECC a Claude Code-ot?
Nem. A hook 5 ezredmásodperc alatt (p99) befejeződik. Ez érzékelhetetlen ahhoz képest, mennyi időt tölt Claude a gondolkodással és a válaszok generálásával.
Használhatom a PRECC-et CI/CD-ben?
A PRECC interaktív Claude Code munkamenetekhez készült. CI/CD-ben nincs Claude Code példány, amihez csatlakozni lehetne. Azonban a precc gha bármilyen környezetből elemezheti a sikertelen GitHub Actions futásokat.
Miben különböznek a bányászott képességek a beépítettektől?
A beépített képességek a PRECC-el érkeznek és a gyakori rossz könyvtár mintákat fedik le. A bányászott képességek az Ön munkamenet-naplóiból tanultak – az Ön munkafolyamatára jellemző mintákat rögzítik. Mindkettő SQLite-ban van tárolva és azonos módon értékeli a hook pipeline.
Megoszthatom a képességeket a csapatommal?
Igen. Exportáljon bármilyen képességet TOML-ba a precc skills export NAME paranccsal és ossza meg a fájlt. A csapattagok elhelyezhetik a skills/ könyvtárukban vagy importálhatják a heurisztika adatbázisukba.