@nano-step/skill-manager 5.2.2 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: rtk
3
+ description: "Token optimizer for AI coding agents. Wraps common CLI commands with rtk to reduce LLM token consumption by 60-90%."
4
+ compatibility: "OpenCode with RTK binary installed"
5
+ metadata:
6
+ author: Sisyphus
7
+ version: "1.0.0"
8
+ ---
9
+
10
+ # RTK — Rust Token Killer
11
+
12
+ **Purpose**: Reduce token consumption by 60-90% on shell commands. RTK filters and compresses command output before it reaches your context.
13
+
14
+ ## When This Skill Activates
15
+
16
+ This skill is loaded automatically. Once active, **always** prefix supported commands with `rtk`.
17
+
18
+ ## Command Mappings (MANDATORY)
19
+
20
+ When running shell commands via Bash tool, use `rtk` prefix for these commands:
21
+
22
+ | Instead of | Use | Savings |
23
+ |-----------|-----|---------|
24
+ | `git status` | `rtk git status` | ~80% |
25
+ | `git diff` | `rtk git diff` | ~75% |
26
+ | `git log` | `rtk git log` | ~80% |
27
+ | `git add/commit/push/pull` | `rtk git add/commit/push/pull` | ~90% |
28
+ | `ls` / `ls -la` | `rtk ls` | ~80% |
29
+ | `cat file` | `rtk read file` | ~70% |
30
+ | `grep pattern .` | `rtk grep pattern .` | ~80% |
31
+ | `rg pattern` | `rtk grep pattern .` | ~80% |
32
+ | `npm test` / `cargo test` / `pytest` | `rtk test <cmd>` | ~90% |
33
+ | `npm run build` / `cargo build` | `rtk err <cmd>` | ~80% |
34
+ | `gh pr list/view` | `rtk gh pr list/view` | ~70% |
35
+ | `docker ps` | `rtk docker ps` | ~80% |
36
+ | `eslint` / `tsc` | `rtk lint` / `rtk tsc` | ~80% |
37
+
38
+ ## Searching Inside `node_modules` / Ignored Directories
39
+
40
+ By default, `rtk grep` respects `.gitignore` rules — meaning `node_modules`, `.nuxt`, `dist`, etc. are **excluded**. This is the right behavior 99% of the time.
41
+
42
+ When you **need** to search inside ignored directories (debugging a library, checking an API signature, tracing a dependency bug):
43
+
44
+ ```bash
45
+ # Search all files including node_modules (--no-ignore bypasses .gitignore)
46
+ rtk grep "defineStore" . --no-ignore
47
+
48
+ # Search a specific package only (combine --no-ignore with --glob)
49
+ rtk grep "defineStore" . --no-ignore --glob 'node_modules/pinia/**'
50
+ ```
51
+
52
+ **What does NOT work:**
53
+ - `rtk grep "pattern" node_modules/pinia/` — still excluded even with direct path
54
+ - `rtk grep "pattern" . --glob 'node_modules/**'` — glob alone doesn't override .gitignore
55
+
56
+ **Key flag: `--no-ignore`** — this is the ONLY way to search ignored directories with rtk grep.
57
+
58
+ ### Other useful `rtk grep` flags
59
+
60
+ ```bash
61
+ rtk grep "pattern" . -t ts # Filter by file type (ts, py, rust, etc.)
62
+ rtk grep "pattern" . -m 100 # Increase max results (default: 50)
63
+ rtk grep "pattern" . -u # Ultra-compact mode (even fewer tokens)
64
+ rtk grep "pattern" . -l 120 # Max line length before truncation (default: 80)
65
+ ```
66
+
67
+ ## Commands to NOT Wrap
68
+
69
+ Do NOT prefix these with `rtk` (unsupported or counterproductive):
70
+
71
+ - `npx`, `npm install`, `pip install` (package managers)
72
+ - `node`, `python3`, `ruby` (interpreters)
73
+ - `nano-brain`, `openspec`, `opencode` (custom tools)
74
+ - Heredocs (`<<EOF`)
75
+ - Piped commands (`cmd1 | cmd2`) — wrap only the first command if applicable
76
+ - Commands already prefixed with `rtk`
77
+
78
+ ## How RTK Works
79
+
80
+ ```
81
+ Without RTK: git status → 50 lines raw output → 2,000 tokens
82
+ With RTK: rtk git status → "3 modified, 1 untracked ✓" → 200 tokens
83
+ ```
84
+
85
+ RTK runs the real command, then filters/compresses the output. The agent sees a compact summary instead of verbose raw output.
86
+
87
+ ## Detection
88
+
89
+ Before using RTK commands, verify it's installed:
90
+ ```bash
91
+ rtk --version
92
+ ```
93
+
94
+ If `rtk` is not found, skip this skill — run commands normally without the `rtk` prefix.
95
+
96
+ ## Token Savings Reference
97
+
98
+ Typical 30-min coding session:
99
+ - Without RTK: ~150,000 tokens
100
+ - With RTK: ~45,000 tokens
101
+ - **Savings: ~70%**
102
+
103
+ Biggest wins: test output (`rtk test` — 90%), git operations (`rtk git` — 80%), file reading (`rtk read` — 70%).
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "rtk",
3
+ "version": "1.0.0",
4
+ "description": "Token optimizer for AI coding agents. Wraps common CLI commands with rtk to reduce LLM token consumption by 60-90%.",
5
+ "compatibility": "OpenCode with RTK binary installed",
6
+ "agent": null,
7
+ "commands": [],
8
+ "tags": [
9
+ "rtk",
10
+ "token-saving",
11
+ "optimization",
12
+ "cli",
13
+ "productivity"
14
+ ]
15
+ }