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 hook ယန္တရားမှတဆင့် Claude Code bash ညွှန်ကြားချက်များကို ကြားဖြတ်ယူသည့် Rust tool ဖြစ်သည်။

အသိုင်းအဝိုင်းသုံးစွဲသူများအတွက် အခမဲ့။

ပြဿနာ

Claude Code wastes significant tokens on preventable mistakes:

  • Wrong-directory errors – Running cargo build in a parent directory that has no Cargo.toml, then retrying after reading the error.
  • Retry loops – A failed command produces verbose output, Claude reads it, reasons about it, and retries. Each cycle burns hundreds of tokens.
  • Verbose output – Commands like find or ls -R dump thousands of lines that Claude must process.

မဏ္ဍိုင်လေးခု

Context ပြင်ဆင်ခြင်း (cd-prepend)

cargo build သို့မဟုတ် npm test ကဲ့သို့ command များ directory မှားတွင် run နေကြောင်း ရှာဖွေပြီး execution မတိုင်မီ cd /မှန်ကန်သော/path && ကို ထည့်ပေးသည်။

GDB အမှားရှာခြင်း

Detects opportunities to attach GDB for deeper debugging of segfaults and crashes, providing structured debug information instead of raw core dumps.

Session ကို တူးဖော်ခြင်း

Mines Claude Code session logs for failure-fix pairs. When the same mistake recurs, PRECC already knows the fix and applies it automatically.

အလိုအလျောက် ကျွမ်းကျင်မှုများ

A library of built-in and mined skills that match command patterns and rewrite them. Skills are defined as TOML files or SQLite rows, making them easy to inspect, edit, and share.

How It Works (30-Second Version)

  1. Claude Code is about to run a bash command.
  2. The PreToolUse hook sends the command to precc-hook as JSON on stdin.
  3. precc-hook runs the command through the pipeline (skills, directory correction, compression) in under 3 milliseconds.
  4. The corrected command is returned as JSON on stdout.
  5. Claude Code executes the corrected command instead.

Claude never sees the error. No tokens wasted.

Adaptive Compression

command တစ်ခု compression ပြီးနောက် fail ဖြစ်ပါက PRECC သည် နောက်တစ်ကြိမ် retry တွင် compression ကို အလိုအလျောက် ကျော်ပစ်ပြီး Claude အတွက် debug ရန် output အပြည့်အစုံကို ပေးသည်။

Live Usage Statistics

MetricValue
Hook invocations
Tokens saved
Saving ratio%
RTK rewrites
CD corrections
Hook latency ms (p50)

ကိန်းဂဏန်းများသည် ခန့်မှန်းချက်များဖြစ်သည်။ ကာကွယ်ထားသော failure တိုင်းသည် retry cycle တစ်ခုလုံးကို ရှောင်ရှားပေးသည်။ These numbers update automatically from anonymized telemetry.

ထည့်သွင်းခြင်း

အမြန်ထည့်သွင်းခြင်း (Linux / macOS)

curl -fsSL https://raw.githubusercontent.com/peria-ai/precc-cc/main/scripts/install.sh | bash

ဤအရာသည် သင့်ပလက်ဖောင်းအတွက် နောက်ဆုံးထွက်ဗားရှင်းကို ဒေါင်းလုဒ်လုပ်ပြီး SHA256 checksum ကို စစ်ဆေးကာ ~/.local/bin/ တွင် ထားပေးပါသည်။

ထည့်သွင်းပြီးနောက် PRECC ကို စတင်ပါ:

precc init

precc init သည် PreToolUse hook ကို Claude Code တွင် မှတ်ပုံတင်ပြီး ဒေတာလမ်းညွှန်များ ဖန်တီးကာ ကျွမ်းကျင်မှုဒေတာဘေ့စ်ကို စတင်ပါသည်။

ထည့်သွင်းမှုရွေးချယ်စရာများ

SHA256 အတည်ပြုခြင်း

ပုံမှန်အားဖြင့် installer သည် ထုတ်ဝေထားသော SHA256 နှင့် binary checksum ကို စစ်ဆေးပါသည်။ စစ်ဆေးခြင်းကို ကျော်လွှားရန် (အကြံပြုမထားပါ):

curl -fsSL https://raw.githubusercontent.com/peria-ai/precc-cc/main/scripts/install.sh | bash -s -- --no-verify

စိတ်ကြိုက်ထည့်သွင်းမှုလမ်းကြောင်း

စိတ်ကြိုက်နေရာတွင် ထည့်သွင်းရန်:

curl -fsSL https://raw.githubusercontent.com/peria-ai/precc-cc/main/scripts/install.sh | bash -s -- --prefix /opt/precc

လက်တွဲကိရိယာများ (–extras)

PRECC တွင် ရွေးချယ်နိုင်သော လက်တွဲကိရိယာများ ပါဝင်ပါသည်။ --extras ဖြင့် ထည့်သွင်းပါ:

curl -fsSL https://raw.githubusercontent.com/peria-ai/precc-cc/main/scripts/install.sh | bash -s -- --extras

ဤအရာသည် အောက်ပါတို့ကို ထည့်သွင်းပါသည်:

ကိရိယာရည်ရွယ်ချက်
RTKCommand ပြန်လည်ရေးသားခြင်း toolkit
lean-ctxCLAUDE.md နှင့် prompt ဖိုင်များအတွက် context ချုံ့ခြင်း
nushellအဆင့်မြင့် pipeline များအတွက် ဖွဲ့စည်းထားသော shell
cocoindex-codeပိုမြန်သော context ဖြေရှင်းခြင်းအတွက် code indexing

Windows (PowerShell)

irm https://raw.githubusercontent.com/peria-ai/precc-cc/main/scripts/install.ps1 | iex

ထို့နောက် စတင်ပါ:

precc init

လက်ဖြင့်ထည့်သွင်းခြင်း

  1. သင့်ပလက်ဖောင်းအတွက် release binary ကို GitHub Releases မှ ဒေါင်းလုဒ်လုပ်ပါ။
  2. release ရှိ .sha256 ဖိုင်နှင့် SHA256 checksum ကို စစ်ဆေးပါ။
  3. binary ကို သင့် PATH ရှိ directory တွင် ထားပါ (ဥပမာ ~/.local/bin/)။
  4. precc init ကို run ပါ။

အပ်ဒိတ်လုပ်ခြင်း

precc update

အတိအကျ version တစ်ခုသို့ အတင်း update လုပ်ရန်:

precc update --force --version 0.3.0

အလိုအလျောက် update များကို ဖွင့်ရန်:

precc update --auto

ထည့်သွင်းမှုကို အတည်ပြုခြင်း

$ precc --version
precc 0.3.0

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

precc ကို ရှာမတွေ့ပါက ~/.local/bin သည် သင့် PATH တွင် ရှိမရှိ စစ်ဆေးပါ။

အမြန်စတင်ခြင်း

PRECC ကို မိနစ် ၅ အတွင်း စတင်ပါ။

အဆင့် ၁: တပ်ဆင်ခြင်း

curl -fsSL https://raw.githubusercontent.com/peria-ai/precc-cc/main/scripts/install.sh | bash

အဆင့် ၂: စတင်ခြင်း

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

အဆင့် ၃: Hook အလုပ်လုပ်နေသည်ကို စစ်ဆေးခြင်း

$ 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

အဆင့် ၄: Claude Code ကို ပုံမှန်အတိုင်း အသုံးပြုခြင်း

Claude Code ကိုဖွင့်ပြီး ပုံမှန်အတိုင်း အလုပ်လုပ်ပါ။ PRECC သည် နောက်ကွယ်တွင် တိတ်ဆိတ်စွာ အလုပ်လုပ်နေသည်။ Claude က ပျက်ကွက်မည့် command တစ်ခုကို ထုတ်သောအခါ PRECC က လုပ်ဆောင်မှုမတိုင်မီ ပြင်ဆင်ပေးသည်။

ဥပမာ: မှားယွင်းသော directory တွင် Cargo Build

သင့်ပရောဂျက်သည် ~/projects/myapp/ တွင်ရှိပြီး Claude က အောက်ပါ command ကို ထုတ်သည်ဟု ယူဆပါ:

cargo build

~/projects/ မှ (အဆင့်တစ်ခု မြင့်လွန်းပြီး ထိုနေရာတွင် Cargo.toml မရှိပါ)။

PRECC မရှိဘဲ: Claude သည် could not find Cargo.toml in /home/user/projects or any parent directory error ကိုရရှိပြီး ဖတ်ပြီး ခွဲခြမ်းစိတ်ဖြာကာ cd myapp && cargo build ဖြင့် ပြန်ကြိုးစားသည်။ ကုန်ကျစရိတ်: token ~၂,၀၀၀ ဖြုန်းတီး။

PRECC ဖြင့်: Hook သည် ပျောက်ဆုံးနေသော Cargo.toml ကို ရှာဖွေတွေ့ရှိပြီး myapp/ တွင် တွေ့ကာ command ကို ပြန်လည်ရေးသားသည်:

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

Claude သည် error ကို ဘယ်တော့မှ မမြင်ရပါ။ token ဖြုန်းတီးမှု သုညဖြစ်သည်။

အဆင့် ၅: သင့်ချွေတာမှုကို စစ်ဆေးခြင်း

session တစ်ခုပြီးနောက် PRECC က token ဘယ်လောက် ချွေတာခဲ့သည်ကို ကြည့်ပါ:

$ 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)

နောက်ထပ် အဆင့်များ

  • ကျွမ်းကျင်မှုများ – ရရှိနိုင်သော ကျွမ်းကျင်မှုအားလုံးနှင့် သင့်ကိုယ်ပိုင် ဖန်တီးနည်းကို ကြည့်ပါ။
  • Hook Pipeline – အတွင်းပိုင်းတွင် ဘာဖြစ်နေသည်ကို နားလည်ပါ။
  • ချွေတာမှု – Token ချွေတာမှု အသေးစိတ် ခွဲခြမ်းစိတ်ဖြာမှု။

လိုင်စင်

PRECC သည် အဆင့်နှစ်ခုပေးသည်: Community (အခမဲ့) နှင့် Pro။

Community အဆင့် (အခမဲ့)

Community အဆင့်တွင် ပါဝင်သည်:

  • ပါဝင်သော ကျွမ်းကျင်မှုအားလုံး (directory ပြင်ဆင်ခြင်း၊ jj ဘာသာပြန်ခြင်း စသည်)
  • Pillar 1 နှင့် Pillar 4 အပြည့်အဝ ထောက်ပံ့သည့် Hook pipeline
  • အခြေခံ precc savings အကျဉ်းချုပ်
  • precc ingest ဖြင့် session mining
  • အကန့်အသတ်မရှိ local အသုံးပြုမှု

Pro အဆင့်

Pro သည် အပိုအင်္ဂါရပ်များကို ဖွင့်ပေးသည်:

  • အသေးစိတ်ချွေတာမှုခွဲခြမ်းစိတ်ဖြာမှုprecc savings --all command တစ်ခုချင်းစီ ခွဲခြမ်းစိတ်ဖြာမှုနှင့်
  • GIF မှတ်တမ်းတင်ခြင်းprecc gif animated terminal GIF များ ဖန်တီးရန်
  • IP geofence လိုက်နာမှု – ထိန်းချုပ်ထားသော ပတ်ဝန်းကျင်များအတွက်
  • အီးမေးလ် အစီရင်ခံစာများprecc mail report analytics ပို့ရန်
  • GitHub Actions ခွဲခြမ်းစိတ်ဖြာမှုprecc gha မအောင်မြင်သော workflow debugging အတွက်
  • Context ချုံ့ခြင်းprecc compress CLAUDE.md optimization အတွက်
  • ဦးစားပေး ပံ့ပိုးမှု

လိုင်စင် အသက်သွင်းခြင်း

$ 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 email မှတဆင့် လိုင်စင်ကို အလိုအလျောက် အသက်သွင်းပေးသည်။ key မလိုအပ်ပါ – sponsor email တူညီကြောင်း သေချာပါ:

$ 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 ကိုကြည့်ပါ။

Hook Pipeline

precc-hook binary သည် PRECC ၏ အဓိကအစိတ်အပိုင်းဖြစ်သည်။ Claude Code နှင့် shell ကြားတွင်ရှိပြီး bash command တိုင်းကို 5 millisecond အတွင်း လုပ်ဆောင်သည်။

Claude Code က Hook ကို ခေါ်ယူပုံ

Claude Code သည် PreToolUse hook များကို ပံ့ပိုးသည် – လုပ်ဆောင်မှုမတိုင်မီ tool input များကို စစ်ဆေးပြီး ပြင်ဆင်နိုင်သော ပြင်ပပရိုဂရမ်များဖြစ်သည်။ Claude က bash command ကို run မည့်အခါ stdin မှတဆင့် precc-hook သို့ JSON ပေးပို့ပြီး stdout မှ တုံ့ပြန်မှုကို ဖတ်သည်။

Pipeline အဆင့်များ

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 Input နှင့် Output

Input (Claude Code မှ)

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

PRECC သည် လက်ရှိ directory တွင် Cargo.toml မရှိသော်လည်း ./myapp/Cargo.toml ရှိကြောင်း ရှာဖွေတွေ့ရှိသည်။

Output (Claude Code သို့)

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

ပြင်ဆင်ရန် မလိုအပ်ပါက updatedInput.command သည် ဗလာဖြစ်ပြီး Claude Code သည် မူရင်း command ကို အသုံးပြုသည်။

အဆင့်အသေးစိတ်

အဆင့် 1: JSON ခွဲခြမ်းစိတ်ဖြာ

stdin မှ JSON object အပြည့်အစုံကို ဖတ်သည်။ tool_input.command ကို ထုတ်ယူသည်။ parsing မအောင်မြင်ပါက hook ချက်ချင်းထွက်ပြီး Claude Code သည် မူရင်း command ကို အသုံးပြုသည် (fail-open ဒီဇိုင်း)။

အဆင့် 2: Skill တိုက်ဆိုင်ခြင်း

trigger pattern နှင့် command ကိုက်ညီသော skill များအတွက် SQLite heuristics database ကို query လုပ်သည်။ Skill များကို ဦးစားပေးအစီအစဥ်အတိုင်း စစ်ဆေးသည်။

အဆင့် 3: Directory ပြင်ဆင်ခြင်း

Build command များ (cargo, go, make, npm, python စသည်) အတွက် လက်ရှိ directory တွင် မျှော်လင့်ထားသော project file ရှိမရှိ စစ်ဆေးသည်။ မရှိပါက အနီးအနား directory များကို scan ပြီး cd <dir> && ကို ရှေ့တွင် ထည့်သည်။

Directory scan သည် မြန်ဆန်မှုကို ထိန်းသိမ်းရန် 5 စက္ကန့် TTL ပါသော cached filesystem index ကို အသုံးပြုသည်။

အဆင့် 4: GDB စစ်ဆေးခြင်း

Command သည် crash ဖြစ်နိုင်ခြေရှိပါက (ဥပမာ debug binary run ခြင်း)၊ PRECC သည် raw crash log များအစား structured debug output ကို ဖမ်းယူရန် GDB wrapper များကို အကြံပြုခြင်း သို့မဟုတ် ထည့်သွင်းနိုင်သည်။

အဆင့် 5: RTK ပြန်လည်ရေးသားခြင်း

RTK (Rewrite Toolkit) စည်းမျဉ်းများကို အသုံးပြုပြီး verbose command များကို အတိုချုံ့ခြင်း၊ noisy output ကို ဖိနှိပ်ခြင်း သို့မဟုတ် token efficiency အတွက် command များကို ပြန်လည်ဖွဲ့စည်းခြင်း ပြုလုပ်သည်။

အဆင့် 6: JSON ထုတ်လွှတ်ခြင်း

ပြင်ဆင်ထားသော command ကို JSON သို့ ပြန်လည် serialize ပြုလုပ်ပြီး stdout သို့ ရေးသည်။ ပြောင်းလဲမှုမရှိပါက output သည် Claude Code ကို မူရင်း command အသုံးပြုရန် အချက်ပြသည်။

စွမ်းဆောင်ရည်

Pipeline တစ်ခုလုံးသည် 5 millisecond (p99) အတွင်း ပြီးမြောက်သည်။ အဓိက optimization များ:

  • Lock-free concurrent reads အတွက် WAL mode ဖြင့် SQLite
  • Skill matching အတွက် ကြိုတင် compile ပြုလုပ်ထားသော regex pattern များ
  • Cached filesystem scans (5 စက္ကန့် TTL)
  • Hot path တွင် network call များမရှိ
  • Fail-open: error တစ်ခုခုဖြစ်ပါက မူရင်း command သို့ ပြန်သွားသည်

Hook ကို လက်ဖြင့် စမ်းသပ်ခြင်း

Hook ကို တိုက်ရိုက် ခေါ်ယူနိုင်သည်:

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

ကျွမ်းကျင်မှုများ

ကျွမ်းကျင်မှုများသည် PRECC က command များကိုရှာဖွေပြင်ဆင်ရန်အသုံးပြုသော ပုံစံတိုက်ဆိုင်စစ်ဆေးခြင်းစည်းမျဉ်းများဖြစ်သည်။

ပါဝင်သော ကျွမ်းကျင်မှုများ

ကျွမ်းကျင်မှုအစပျိုးခြင်းလုပ်ဆောင်ချက်
cargo-wrong-dirRust ပရောဂျက်ပြင်ပတွင် cargo build/test/clippyအနီးဆုံး Cargo.toml လမ်းကြောင်းသို့ cd ထည့်ခြင်း
git-wrong-dirgit repo ပြင်ပတွင် git *အနီးဆုံး .git လမ်းကြောင်းသို့ cd ထည့်ခြင်း
go-wrong-dirGo module ပြင်ပတွင် 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-colocated repo တွင် git *ညီမျှသော jj command သို့ ပြန်ရေးခြင်း
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 command

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

ထပ်နေသောပုံစံများကိုသိရှိရန် ဆင်တူသောကျွမ်းကျင်မှုများကိုအုပ်စုဖွဲ့သည်။

တူးဖော်ရရှိသောနှင့်ပါဝင်သောကျွမ်းကျင်မှုများ

ပါဝင်သောကျွမ်းကျင်မှုများသည် PRECC နှင့်အတူပါဝင်ပြီး skills/builtin/*.toml တွင်သတ်မှတ်ထားသည်။

တူးဖော်ရရှိသောကျွမ်းကျင်မှုများကို precc ingest သို့မဟုတ် precc-learner daemon မှဖန်တီးသည်။ ~/.local/share/precc/heuristics.db တွင်သိမ်းဆည်းထားသည်။ အသေးစိတ်အတွက် Mining ကိုကြည့်ပါ။

ချွေတာမှု

PRECC သည် ကြားဖြတ်မှုတိုင်းမှ ခန့်မှန်းတိုကင်ချွေတာမှုကို ခြေရာခံသည်။ PRECC မည်မျှ ဖြုန်းတီးမှုကို တားဆီးခဲ့သည်ကို ကြည့်ရန် precc savings ကို သုံးပါ။

အကျဉ်းချုပ်

$ 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သိထားသော ကျရှုံးမှုပုံစံကို ရှောင်လွှဲသည်

ဤအရာများသည် ခန့်မှန်းချက်များဖြစ်ပြီး အမှန်တကယ်ချွေတာမှုသည် ပိုများနိုင်သည်။

စုဆောင်းချွေတာမှု

ချွေတာမှုများသည် PRECC ဒေတာဘေ့စ်တွင် session များအကြား ဆက်လက်ရှိနေသည်။ အချိန်ကြာလာသည်နှင့်အမျှ စုစုပေါင်းသက်ရောက်မှုကို ခြေရာခံနိုင်သည်:

$ 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

ချုံ့ခြင်း

precc compress သည် Claude Code တင်သောအခါ token အသုံးပြုမှုကို လျှော့ချရန် CLAUDE.md နှင့် အခြား context ဖိုင်များကို ချုံ့သည်။ ၎င်းသည် 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 လုပ်ဆောင်ချက်နှင့် token ချွေတာမှုကို အကျဉ်းချုပ် ခွဲခြမ်းစိတ်ဖြာမှု ဒတ်ရှ်ဘုတ် ဖန်တီးသည်။

အစီရင်ခံစာ ဖန်တီးခြင်း

$ 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 daemon

precc-learner daemon သည် နောက်ခံတွင် အလုပ်လုပ်ပြီး ဆက်ရှင်မှတ်တမ်းအသစ်များကို အလိုအလျောက် စောင့်ကြည့်သည်:

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

Daemon သည် ဖိုင်စနစ်အကြောင်းကြားချက်များ (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 အတွက် သင့်အကောင့် စကားဝှက်အစား App Password ကို အသုံးပြုပါ။

အစီရင်ခံစာများ ပေးပို့ခြင်း

$ 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 relay ပံ့ပိုးမှု

သင့်စက်သည် SMTP ဆာဗာကို တိုက်ရိုက် ချိတ်ဆက်၍ မရပါက (ဥပမာ- ကုမ္ပဏီ firewall နောက်ကွယ်တွင်)၊ PRECC သည် SSH tunnel မှတစ်ဆင့် relay ပေးပို့ခြင်းကို ပံ့ပိုးသည်:

[smtp]
host = "localhost"
port = 2525

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

PRECC သည် ပေးပို့ခြင်းမပြုမီ SSH tunnel ကို အလိုအလျောက် ထူထောင်မည်ဖြစ်သည်။

GIF ရိုက်ကူးခြင်း

precc gif သည် bash script များမှ terminal session များ၏ animated 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)

ပထမ argument သည် run ရမည့် command များပါဝင်သော bash script ဖြစ်သည်။ ဒုတိယ argument သည် အများဆုံး ရိုက်ကူးမှု အရှည်ဖြစ်သည်။

Script ပုံစံ

Script သည် standard bash ဖိုင်ဖြစ်သည်:

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

Input Simulation

Interactive command များအတွက်၊ input တန်ဖိုးများကို argument အပိုများအဖြစ် ပေးပါ:

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

Script က input တောင်းသောအခါ argument အပိုတစ်ခုစီကို stdin စာကြောင်းတစ်ကြောင်းအဖြစ် ထည့်သွင်းသည်။

Output ရွေးချယ်စရာများ

Output ဖိုင်သည် default အားဖြင့် script အမည်အတိုင်း သတ်မှတ်သည် (script.gif)။ GIF သည် standard 80x24 အတိုင်းအတာဖြင့် dark terminal theme ကို အသုံးပြုသည်။

ဘာကြောင့် asciinema အစား GIF သုံးသလဲ?

Built-in skill asciinema-gif သည် asciinema rec ကို precc gif သို့ အလိုအလျောက် ပြန်ရေးသည်။ GIF ဖိုင်များသည် ပိုမို portable ဖြစ်သည် – GitHub README, Slack နှင့် email တွင် player မလိုဘဲ inline ပြသနိုင်သည်။

GitHub Actions ခွဲခြမ်းစိတ်ဖြာခြင်း

precc gha သည် ပျက်ကွက်သော GitHub Actions run များကို ခွဲခြမ်းစိတ်ဖြာပြီး ပြုပြင်ချက်များ အကြံပြုသည်။ ၎င်းသည် Pro အင်္ဂါရပ်ဖြစ်သည်။

အသုံးပြုပုံ

ပျက်ကွက်သော GitHub Actions run ၏ 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 run URL ကို parse လုပ်ပြီး owner, repo နှင့် run ID ကို ထုတ်ယူသည်။
  2. GitHub API မှတစ်ဆင့် run log များကို ရယူသည် (GITHUB_TOKEN သတ်မှတ်ထားလျှင် အသုံးပြုသည်၊ မဟုတ်ပါက public access)။
  3. ပျက်ကွက်သော step ကို ဖော်ထုတ်ပြီး သက်ဆိုင်ရာ error line များကို ထုတ်ယူသည်။
  4. Error ကို ခွဲခြမ်းစိတ်ဖြာပြီး အသုံးများသော CI failure pattern များကို အခြေခံ၍ ပြုပြင်ချက် အကြံပြုသည်။

ပံ့ပိုးသော failure pattern များ

  • ပျောက်ဆုံးနေသော service container များ (databases, Redis စသည်)
  • မမှန်ကန်သော runner OS သို့မဟုတ် architecture
  • ပျောက်ဆုံးနေသော environment variables သို့မဟုတ် secrets
  • Dependency installation ပျက်ကွက်ခြင်းများ
  • Test timeout များ
  • Permission error များ
  • Cache miss များကြောင့် build နှေးခြင်း

Geofence

PRECC တွင် ထိန်းချုပ်ထားသော ပတ်ဝန်းကျင်များအတွက် IP geofence လိုက်နာမှု စစ်ဆေးခြင်း ပါဝင်သည်။ ၎င်းသည် Pro အင်္ဂါရပ်ဖြစ်သည်။

ခြုံငုံသုံးသပ်ချက်

အချို့အဖွဲ့အစည်းများသည် ဖွံ့ဖြိုးရေးကိရိယာများ အတည်ပြုထားသော ပထဝီဝင်ဒေသများအတွင်းသာ အလုပ်လုပ်ရန် လိုအပ်သည်။ PRECC ၏ geofence feature သည် လက်ရှိစက်၏ 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.

Geofence ဒေတာ ပြန်လည်ရယူခြင်း

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

Geofence အချက်အလက် ကြည့်ရှုခြင်း

$ 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

Cache ရှင်းလင်းခြင်း

$ precc geofence clear
[precc] Geofence cache cleared.

ပြင်ဆင်သတ်မှတ်ခြင်း

Geofence မူဝါဒကို ~/.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 နှင့် ဗိသုကာ
  • စုစုပေါင်း အရေအတွက်: ကြားဖြတ်သည့် ကွန်မန်းများ၊ အသက်ဝင်သော ကျွမ်းကျင်မှုများ
  • ပျမ်းမျှ hook ကြန့်ကြာချိန်
  • ဆက်ရှင် အရေအတွက်

မစုဆောင်းသော ဒေတာ

  • ကွန်မန်း စာသား သို့မဟုတ် အငြင်းပွားချက်များ မပါ
  • ဖိုင်လမ်းကြောင်း သို့မဟုတ် ဖိုင်တွဲအမည်များ မပါ
  • ပရောဂျက်အမည် သို့မဟုတ် repository URL များ မပါ
  • ကိုယ်ရေးကိုယ်တာ သတင်းအချက်အလက် (PII) မပါ
  • IP လိပ်စာများ မပါ

ပတ်ဝန်းကျင် ကိန်းရှင်ဖြင့် အစားထိုးခြင်း

ကွန်မန်း မလုပ်ဆောင်ဘဲ အဝေးမှတိုင်းတာခြင်းကို ပိတ်ရန် (CI သို့မဟုတ် မျှဝေ ပတ်ဝန်းကျင်များတွင် အသုံးဝင်):

export PRECC_NO_TELEMETRY=1

ဤအရာသည် သဘောတူညီချက် ဆက်တင်ထက် ဦးစားပေးသည်။

ဒေတာ သွားရောက်ရာနေရာ

အဝေးမှတိုင်းတာခြင်း ဒေတာကို HTTPS မှတစ်ဆင့် https://telemetry.peria.ai/v1/precc သို့ ပေးပို့သည်။ ဒေတာကို အသုံးပြုပုံ နားလည်ရန်နှင့် ဖွံ့ဖြိုးရေး ဦးစားပေးရန်အတွက်သာ အသုံးပြုသည်။

ကွန်မန်း ရည်ညွှန်းချက်

PRECC ကွန်မန်း အားလုံးအတွက် ရည်ညွှန်းချက် အပြည့်အစုံ။


precc init

PRECC ကို စတင်ပြီး Claude Code နှင့် hook မှတ်ပုံတင်ပါ။

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

Session log များမှ failure-fix ပုံစံများ ရှာဖွေပါ။

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

Automation ကျွမ်းကျင်မှုများ စီမံပါ။

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

Token ချွေတာမှု ပြသပါ။

precc savings [--all]

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

precc compress

Token အသုံးပြုမှု လျှော့ချရန် context ဖိုင်များ ချုံ့ပါ။

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 geofence လိုက်နာမှု (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 script များမှ animated 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

လက်ရှိ ပရောဂျက်အတွက် cache hint သတင်းအချက်အလက် ပြသပါ။

precc cache-hint

precc trial

Pro အစမ်းသုံးမှု စတင်ပါ။

precc trial EMAIL

Arguments:
  EMAIL           Email address for the trial

precc nushell

PRECC ပေါင်းစပ်ထားသော Nushell session စတင်ပါ။

precc nushell

မေးလေ့ရှိသော မေးခွန်းများ

PRECC ကို သုံးရန် လုံခြုံပါသလား?

ဟုတ်ကဲ့။ PRECC သည် Claude Code ၏ တရားဝင် PreToolUse hook ယန္တရားကို အသုံးပြုသည်။ Hook သည်:

  • အင်တာနက်မလိုဘဲ အပြည့်အဝ လုပ်ဆောင်သည်
  • 5 မီလီစက္ကန့်အတွင်း ပြီးစီးသည်
  • Fail-open ဖြစ်သည်: ပြဿနာတစ်ခုခု ဖြစ်ပေါ်ပါက မူလ ကွန်မန်းသည် မပြောင်းလဲဘဲ လုပ်ဆောင်သည်
  • ကွန်မန်းများကိုသာ ပြင်ဆင်ပြီး ကိုယ်တိုင် မလုပ်ဆောင်ပါ
  • ဒေတာကို SQLite တွင် ဒေသတွင်း သိမ်းဆည်းသည်

PRECC သည် အခြား AI ကုဒ်ရေးသည့် ကိရိယာများနှင့် အလုပ်လုပ်ပါသလား?

PRECC ကို Claude Code အတွက် အထူးသဖြင့် ဒီဇိုင်းထုတ်ထားသည်။ Cursor၊ Copilot၊ Windsurf သို့မဟုတ် အခြား AI ကုဒ်ရေးသည့် ကိရိယာများနှင့် အလုပ်မလုပ်ပါ။

အဝေးမှတိုင်းတာခြင်းက ဘာဒေတာ ပေးပို့သလဲ?

အဝေးမှတိုင်းတာခြင်းသည် ရွေးချယ်မှသာ ဖြစ်သည်။ ဖွင့်ထားသောအခါ ပေးပို့သည်:

  • PRECC ဗားရှင်း၊ OS နှင့် ဗိသုကာ
  • စုစုပေါင်း အရေအတွက်များ
  • ပျမ်းမျှ hook ကြန့်ကြာချိန်

ကွန်မန်းစာသား၊ ဖိုင်လမ်းကြောင်းများ သို့မဟုတ် ကိုယ်ရေးကိုယ်တာ သတင်းအချက်အလက် ပေးပို့ခြင်း မရှိပါ

PRECC ကို ဘယ်လို ဖယ်ရှားမလဲ?

??faq_uninstall_a_intro??

  1. Hook မှတ်ပုံတင်ခြင်း ဖယ်ရှားရန်:

    # Delete the hook entry from Claude Code's settings
    # (precc init added it; removing it disables PRECC)
    
  2. Binary ဖိုင် ဖယ်ရှားရန်:

    rm ~/.local/bin/precc ~/.local/bin/precc-hook ~/.local/bin/precc-learner
    
  3. ဒေတာ ဖယ်ရှားရန် (ရွေးချယ်နိုင်):

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

ကျွန်ုပ်၏ လိုင်စင် သက်တမ်းကုန်သွားပါပြီ။ ဘာဖြစ်မလဲ?

PRECC သည် Community အဆင့်သို့ ပြန်သွားသည်။ အဓိက လုပ်ဆောင်ချက်များ ဆက်လုပ်ဆောင်သည်:

  • Built-in ကျွမ်းကျင်မှုများ အသက်ဝင်နေဆဲ
  • Hook pipeline ပုံမှန် လုပ်ဆောင်သည်

Pro လုပ်ဆောင်ချက်များ သက်တမ်းတိုးသည်အထိ မရရှိနိုင်ပါ။

Hook အလုပ်မလုပ်သလို ဖြစ်နေသည်။ ဘယ်လို debug လုပ်မလဲ?

??faq_debug_a_intro??

  1. Hook မှတ်ပုံတင်ထားသလား စစ်ဆေးပါ:

    precc init
    
  2. Hook ကို ကိုယ်တိုင် စမ်းသပ်ပါ:

    echo '{"tool_input":{"command":"cargo build"}}' | precc-hook
    
  3. Binary ဖိုင် PATH ထဲတွင် ရှိမရှိ စစ်ဆေးပါ:

    which precc-hook
    
  4. ~/.claude/settings.json ရှိ Claude Code hook ဖွဲ့စည်းပုံကို စစ်ဆေးပါ။

PRECC က Claude Code ကို နှေးစေပါသလား?

မဟုတ်ပါ။ Hook သည် 5 မီလီစက္ကန့်အတွင်း ပြီးစီးသည်။

CI/CD တွင် PRECC ကို သုံးနိုင်ပါသလား?

PRECC ကို interactive Claude Code session များအတွက် ဒီဇိုင်းထုတ်ထားသည်။ CI/CD တွင် precc gha သည် GitHub Actions ကို ခွဲခြမ်းစိတ်ဖြာနိုင်သည်။

ရှာဖွေတွေ့ရှိသော ကျွမ်းကျင်မှုများသည် built-in ကျွမ်းကျင်မှုများနှင့် ဘယ်လို ကွာခြားသလဲ?

Built-in ကျွမ်းကျင်မှုများသည် PRECC နှင့်အတူ ပါဝင်ပြီး ဘုံ wrong-directory ပုံစံများကို ကာမိသည်။ Mined ကျွမ်းကျင်မှုများသည် သင့် session log များမှ သင်ယူသည်။

အဖွဲ့နှင့် ကျွမ်းကျင်မှုများ မျှဝေနိုင်ပါသလား?

ဟုတ်ကဲ့။ precc skills export NAME ဖြင့် TOML သို့ export လုပ်ပြီး ဖိုင်ကို မျှဝေနိုင်သည်။

အခြားဘာသာ