Skip to content

Commit cf51e2c

Browse files
Initial public release: RTK integration for Command Code CLI
Teaches Command Code CLI to route shell commands through RTK (Rust Token Killer) for 60-90% token savings — either as an always-on AGENTS.md memory or an on-demand skill. Contents: - AGENTS.md + references/ RTK command-rewrite and analytics references - SKILL.md on-demand skill definition - install.sh / install.ps1 installers (run from a clone, or curl|bash / iwr|iex) - .github/, community-health files, and the Apache-2.0 license
0 parents  commit cf51e2c

18 files changed

Lines changed: 1251 additions & 0 deletions

.gitattributes

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Normalize line endings in the repository.
2+
# OneDrive sync had introduced mixed CRLF/LF; these rules keep the stored
3+
# blobs consistent (LF) and check files out with the right endings per type.
4+
5+
# Default: treat as text, store as LF in the repo.
6+
* text=auto eol=lf
7+
8+
# Shell scripts MUST be LF — CRLF breaks shebangs and heredocs.
9+
*.sh text eol=lf
10+
11+
# PowerShell scripts use CRLF in the working tree (native on Windows).
12+
*.ps1 text eol=crlf
13+
14+
# Documentation / config — explicit LF.
15+
*.md text eol=lf
16+
*.yml text eol=lf
17+
*.yaml text eol=lf
18+
*.json text eol=lf
19+
*.txt text eol=lf
20+
LICENSE text eol=lf
21+
.gitignore text eol=lf
22+
.gitattributes text eol=lf
23+
24+
# Binary assets — never normalize or diff as text.
25+
*.png binary
26+
*.jpg binary
27+
*.jpeg binary
28+
*.gif binary
29+
*.ico binary
30+
*.zip binary
31+
*.gz binary
32+
*.pdf binary

.github/CODEOWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Code owners for rtk-command-code.
2+
# Listed owners are automatically requested for review on PRs that touch
3+
# matching paths. Replace @Coding-Dev-Tools with the maintainer's GitHub
4+
# username or an org team (e.g. @Coding-Dev-Tools/maintainers) if different.
5+
6+
* @Coding-Dev-Tools
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Something in the integration, docs, or installer isn't working
4+
title: "[bug] "
5+
labels: bug
6+
---
7+
8+
## What happened
9+
10+
A clear description of the problem.
11+
12+
## Steps to reproduce
13+
14+
1.
15+
2.
16+
17+
## Expected behavior
18+
19+
What you expected instead.
20+
21+
## Environment
22+
23+
- OS: <!-- e.g. macOS 14, Ubuntu 22.04, Windows 11 -->
24+
- Install method: <!-- skill / install.sh / install.ps1 / manual -->
25+
- `rtk --version`: <!-- output, or "not installed" -->
26+
- Command Code CLI version: <!-- if known -->
27+
28+
## Logs / output
29+
30+
```
31+
paste relevant output here
32+
```
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature request
3+
about: Suggest a new command mapping, installer improvement, or doc change
4+
title: "[feature] "
5+
labels: enhancement
6+
---
7+
8+
## What's missing
9+
10+
Describe the gap or the improvement you'd like.
11+
12+
## Proposed change
13+
14+
What should be added or changed? If this is a new RTK command mapping, include
15+
the bare command and the `rtk` equivalent.
16+
17+
| Instead of | Use |
18+
|---|---|
19+
| `example` | `rtk example` |
20+
21+
## Why it helps
22+
23+
How this improves token savings, reliability, or clarity.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Summary
2+
3+
What does this PR change, and why?
4+
5+
## Type of change
6+
7+
- [ ] Command mapping added/corrected (`references/commands.md`)
8+
- [ ] Installer change (`install.sh` / `install.ps1`)
9+
- [ ] Documentation (`README.md` / `SKILL.md` / `AGENTS.md`)
10+
- [ ] Other:
11+
12+
## Checklist
13+
14+
- [ ] Line endings are correct (LF everywhere except `*.ps1`); ran
15+
`git add --renormalize .` if my editor changed endings
16+
- [ ] `SKILL.md` still has valid frontmatter (`name:`, `description:`)
17+
- [ ] References stay in sync (no duplicated tables across files)
18+
- [ ] CI passes (installer lint + `SKILL.md` / `AGENTS.md` validation)
19+
- [ ] I tested any installer change end to end

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
8+
jobs:
9+
validate:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Lint install.sh
16+
run: bash -n install.sh
17+
18+
- name: Lint install.ps1
19+
shell: pwsh
20+
run: |
21+
$errors = $null
22+
[System.Management.Automation.PSParser]::Tokenize((Get-Content -Raw install.ps1), [ref]$errors) | Out-Null
23+
if ($errors) { $errors | Format-List; exit 1 }
24+
25+
- name: Validate AGENTS.md @import targets exist
26+
run: |
27+
set -euo pipefail
28+
fail=0
29+
while IFS= read -r ref; do
30+
path="${ref#@}"
31+
if [ ! -f "$path" ]; then
32+
echo "::error file=AGENTS.md::missing @import target: $path"
33+
fail=1
34+
fi
35+
done < <(grep -aoE '^@[A-Za-z0-9._/-]+' AGENTS.md || true)
36+
[ "$fail" -eq 0 ] && echo "AGENTS.md @imports OK"
37+
exit $fail
38+
39+
- name: Validate SKILL.md frontmatter and referenced files
40+
run: |
41+
set -euo pipefail
42+
head -1 SKILL.md | grep -qx -- '---' || { echo "SKILL.md: missing frontmatter block"; exit 1; }
43+
grep -qE '^name:' SKILL.md || { echo "SKILL.md: missing required 'name:'"; exit 1; }
44+
grep -qE '^description:' SKILL.md || { echo "SKILL.md: missing required 'description:'"; exit 1; }
45+
for f in $(grep -aoE 'references/[A-Za-z0-9._/-]+\.md' SKILL.md | sort -u); do
46+
[ -f "$f" ] || { echo "SKILL.md: referenced file not found: $f"; exit 1; }
47+
done
48+
echo "SKILL.md OK"

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Machine-local agent/editor scratch (not part of the published integration).
2+
# NOTE: AGENTS.md is intentionally NOT ignored — it is a tracked deliverable.
3+
.agents/
4+
5+
# OS / editor cruft
6+
.DS_Store
7+
Thumbs.db
8+
*.swp

AGENTS.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# RTK Token Optimization for Command Code
2+
3+
RTK (Rust Token Killer) is installed on this system. It reduces LLM token
4+
consumption by 60-90% by filtering and compressing shell command output.
5+
6+
## Prerequisite
7+
8+
RTK must be installed and in PATH. Verify with: `rtk --version`
9+
10+
If not installed, direct the user to https://github.com/rtk-ai/rtk#installation.
11+
12+
## Core Rule
13+
14+
Always prefix supported shell commands with `rtk`. Instead of running
15+
`git status`, run `rtk git status`. Instead of `ls -la`, run `rtk ls`.
16+
17+
@references/commands.md
18+
@references/analytics.md
19+
20+
## Ultra-Compact Mode
21+
22+
Add `-u` or `--ultra-compact` for maximum savings:
23+
```bash
24+
rtk git status -u
25+
```
26+
27+
## Exclusions
28+
29+
- Agent built-in file tools (non-Bash) do not pass through RTK
30+
- Use shell equivalents: `rtk read <file>`, `rtk grep <pattern>`, `rtk find <pattern>`
31+
- Piped commands (`|`) and heredocs (`<<`) bypass RTK rewrite
32+
- Commands already prefixed with `rtk` are left as-is

CODE_OF_CONDUCT.md

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official email address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement through GitHub's
63+
[report abuse](https://github.com/contact/report-abuse) flow, or privately via
64+
the repository's **Security** tab. All complaints will be reviewed and
65+
investigated promptly and fairly.
66+
67+
All community leaders are obligated to respect the privacy and security of the
68+
reporter of any incident.
69+
70+
## Enforcement Guidelines
71+
72+
Community leaders will follow these Community Impact Guidelines in determining
73+
the consequences for any action they deem in violation of this Code of Conduct:
74+
75+
### 1. Correction
76+
77+
**Community Impact**: Use of inappropriate language or other behavior deemed
78+
unprofessional or unwelcome in the community.
79+
80+
**Consequence**: A private, written warning from community leaders, providing
81+
clarity around the nature of the violation and an explanation of why the
82+
behavior was inappropriate. A public apology may be requested.
83+
84+
### 2. Warning
85+
86+
**Community Impact**: A violation through a single incident or series of
87+
actions.
88+
89+
**Consequence**: A warning with consequences for continued behavior. No
90+
interaction with the people involved, including unsolicited interaction with
91+
those enforcing the Code of Conduct, for a specified period of time. This
92+
includes avoiding interactions in community spaces as well as external channels
93+
like social media. Violating these terms may lead to a temporary or permanent
94+
ban.
95+
96+
### 3. Temporary Ban
97+
98+
**Community Impact**: A serious violation of community standards, including
99+
sustained inappropriate behavior.
100+
101+
**Consequence**: A temporary ban from any sort of interaction or public
102+
communication with the community for a specified period of time. No public or
103+
private interaction with the people involved, including unsolicited interaction
104+
with those enforcing the Code of Conduct, is allowed during this period.
105+
Violating these terms may lead to a permanent ban.
106+
107+
### 4. Permanent Ban
108+
109+
**Community Impact**: Demonstrating a pattern of violation of community
110+
standards, including sustained inappropriate behavior, harassment of an
111+
individual, or aggression toward or disparagement of classes of individuals.
112+
113+
**Consequence**: A permanent ban from any sort of public interaction within the
114+
community.
115+
116+
## Attribution
117+
118+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119+
version 2.1, available at
120+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
121+
122+
Community Impact Guidelines were inspired by
123+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124+
125+
For answers to common questions about this code of conduct, see the FAQ at
126+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
127+
[https://www.contributor-covenant.org/translations][translations].
128+
129+
[homepage]: https://www.contributor-covenant.org
130+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131+
[Mozilla CoC]: https://github.com/mozilla/diversity
132+
[FAQ]: https://www.contributor-covenant.org/faq
133+
[translations]: https://www.contributor-covenant.org/translations

0 commit comments

Comments
 (0)