Integrate RTK CLI for token-smart shell
Why
rtk (https://github.com/rtk-ai/rtk) is a thin shell wrapper that produces compact, agent-friendly output for read/grep/find/git/npm. Cuts ~40–70% of tokens during exploration and validation without losing technical signal. Standard tool across all wesleysimplicio/* AI-facing repos.
Reference: https://github.com/wesleysimplicio/llm-project-mapper/blob/main/AGENTS.md (section "Shell token-smart").
Scope
- Add RTK section to
AGENTS.md (mirror in CLAUDE.md / .github/copilot-instructions.md):
## Shell token-smart (RTK CLI, opcional)
Se `rtk` estiver instalado na máquina, prefira-o em tarefas shell-heavy e de exploração:
\`\`\`bash
rtk read AGENTS.md
rtk grep "pattern" src/
rtk find "*.ts" .
rtk git status
rtk git diff
rtk git log -n 10
rtk npm test
\`\`\`
Regras:
- Use `rtk read|grep|find|git ...` como primeira opção para inspeção textual compacta.
- Use `rtk <comando>` em validações verbosas quando o output resumido basta.
- **Não** passe por RTK comandos interativos, streaming, ou em que o output bruto é a evidência principal (`curl`, `playwright`, `gh pr view --web`, logs longos verbatim).
- Se `rtk` não estiver instalado, siga com os comandos normais sem bloquear a task.
- (Optional) Add
.skills/rtk-cli/SKILL.md skill manifest:
---
name: rtk-cli
description: Use RTK CLI to reduce tokens during repo exploration (read/grep/find/git/npm).
trigger: any task involving repo inspection, git status/diff/log, grep/find across files, or verbose CLI validation.
---
## Steps
1. Detect `rtk` on PATH: `command -v rtk`.
2. Replace `cat <file>` with `rtk read <file>`.
3. Replace `grep -r "x" .` with `rtk grep "x" .`.
4. Replace `find . -name "*.ts"` with `rtk find "*.ts" .`.
5. Replace `git status|diff|log` with `rtk git status|diff|log`.
6. Replace verbose `npm test` smoke runs with `rtk npm test`.
## Do not RTK
- Interactive prompts (login flows, REPL).
- Streaming logs you need verbatim as evidence.
- Playwright runners (need full trace/screenshot output).
- `curl` calls where response body is the artifact.
## DoD
- AGENTS.md references RTK section.
- Skill manifest committed under `.skills/rtk-cli/SKILL.md`.
- README/skill index lists `rtk-cli` skill.
- Update onboarding/setup docs to mention RTK install path (optional, never required):
https://github.com/rtk-ai/rtk.
Acceptance Criteria
References
Integrate RTK CLI for token-smart shell
Why
rtk(https://github.com/rtk-ai/rtk) is a thin shell wrapper that produces compact, agent-friendly output forread/grep/find/git/npm. Cuts ~40–70% of tokens during exploration and validation without losing technical signal. Standard tool across allwesleysimplicio/*AI-facing repos.Reference: https://github.com/wesleysimplicio/llm-project-mapper/blob/main/AGENTS.md (section "Shell token-smart").
Scope
AGENTS.md(mirror inCLAUDE.md/.github/copilot-instructions.md):.skills/rtk-cli/SKILL.mdskill manifest:https://github.com/rtk-ai/rtk.Acceptance Criteria
AGENTS.mdhas the "Shell token-smart (RTK CLI)" section.CLAUDE.md/.github/copilot-instructions.mdif those exist..skills/rtk-cli/SKILL.mdexists and is referenced in.skills/README.md.rtk— repo still works fully ifrtkis not installed.References