From e48bff46cf09efd181f737bc544a5010b9ff0111 Mon Sep 17 00:00:00 2001 From: Marko Djordjevic Date: Mon, 16 Feb 2026 16:37:15 +0100 Subject: [PATCH] docs: document RTK npm run bug workaround --- AI-grep | 1 - CLAUDE.md | 103 ++---------------------------------------------------- 2 files changed, 3 insertions(+), 101 deletions(-) delete mode 160000 AI-grep diff --git a/AI-grep b/AI-grep deleted file mode 160000 index b512548..0000000 --- a/AI-grep +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b512548cf3ae90983631d0d2ca359a183b25d87c diff --git a/CLAUDE.md b/CLAUDE.md index ab16a3e..ce95e91 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -8,108 +8,11 @@ use context7, lightweight charts Always use Context7 MCP when I need library/API documentation, code generation, setup or configuration steps without me having to explicitly ask. +## RTK Known Issues +- **npm run bug**: Instead of `rtk npm run build`, use `rtk npm build` (RTK has a bug with the `run` subcommand) + commit after every task. pause after every section. CLAUDE_DESCRIPTION.md is used for LLMs to understand the project faster. Keep it up to date with the latest changes and updates. - - -# RTK (Rust Token Killer) - Token-Optimized Commands - -## Golden Rule - -**Always prefix commands with `rtk`**. If RTK has a dedicated filter, it uses it. If not, it passes through unchanged. This means RTK is always safe to use. - -**Important**: Even in command chains with `&&`, use `rtk`: -```bash -# ❌ Wrong -git add . && git commit -m "msg" && git push - -# ✅ Correct -rtk git add . && rtk git commit -m "msg" && rtk git push -``` - -## RTK Commands by Workflow - -### Build & Compile (80-90% savings) -```bash -rtk tsc # TypeScript errors grouped by file/code (83%) -rtk lint # ESLint/Biome violations grouped (84%) -rtk prettier --check # Files needing format only (70%) -rtk next build # Next.js build with route metrics (87%) -``` - -### Test (90-99% savings) -```bash -rtk playwright test # Playwright failures only (94%) -rtk test # Generic test wrapper - failures only -``` - -### Git (59-80% savings) -```bash -rtk git status # Compact status -rtk git log # Compact log (works with all git flags) -rtk git diff # Compact diff (80%) -rtk git show # Compact show (80%) -rtk git add # Ultra-compact confirmations (59%) -rtk git commit # Ultra-compact confirmations (59%) -rtk git push # Ultra-compact confirmations -rtk git pull # Ultra-compact confirmations -rtk git branch # Compact branch list -rtk git fetch # Compact fetch -rtk git stash # Compact stash -rtk git worktree # Compact worktree -``` - -Note: Git passthrough works for ALL subcommands, even those not explicitly listed. - - - -### JavaScript/TypeScript Tooling (70-90% savings) -```bash -rtk pnpm list # Compact dependency tree (70%) -rtk pnpm outdated # Compact outdated packages (80%) -rtk pnpm install # Compact install output (90%) -rtk npm build # ⚠️ BUG: Use "rtk npm build" NOT "rtk npm run build" -rtk npx # Compact npx command output -rtk prisma # Prisma without ASCII art (88%) -``` - -**Known RTK Bug**: For npm scripts, use `rtk npm build` instead of `rtk npm run build`. The `run` keyword causes RTK to fail. - -### Files & Search (60-75% savings) -```bash -rtk ls # Tree format, compact (65%) -rtk read # Code reading with filtering (60%) -rtk grep # Search grouped by file (75%) -rtk find # Find grouped by directory (70%) -``` - -### Analysis & Debug (70-90% savings) -```bash -rtk err # Filter errors only from any command -rtk log # Deduplicated logs with counts -rtk json # JSON structure without values -rtk deps # Dependency overview -rtk env # Environment variables compact -rtk summary # Smart summary of command output -rtk diff # Ultra-compact diffs -``` - -### Infrastructure (85% savings) -```bash -rtk docker ps # Compact container list -rtk docker images # Compact image list -rtk docker logs # Deduplicated logs -rtk kubectl get # Compact resource list -rtk kubectl logs # Deduplicated pod logs -``` - -### Network (65-70% savings) -```bash -rtk curl # Compact HTTP responses (70%) -rtk wget # Compact download output (65%) -``` - -