adityahimaone/hermes-agent-rtk-caveman/caveman-rtk-integration
Claude Code and agent skill by adityahimaone/hermes-agent-rtk-caveman
- community
Checking that the SKILL.md file is still in the repository.
Integrates Caveman templating engine with RTK (Rust Token Killer) for token-optimized output formatting. Provides a wrapper script and patterns for using Caveman templates to compress CLI output.
Install
npx vskill@latest install adityahimaone/hermes-agent-rtk-caveman/caveman-rtk-integrationSKILL.md
Caveman + RTK Integration Skill
This skill provides a reusable approach for integrating the Caveman JS templating engine with RTK to minimize token output when formatting CLI command results.
Overview
When working with CLI tools that produce verbose output, combining Caveman templating with RTK can reduce token usage by 60-90% by:
- Using RTK to minimize noise from CLI commands
- Using Caveman templates to define output structure once
- Only transmitting the variable data between runs
Installation & Setup
1. Install Caveman globally
2. Create Caveman wrapper script
Create ~/bin/caveman with the following content:
Make it executable:
3. Ensure RTK is installed
Caveman Template Syntax Reference
Based on the Caveman documentation and practical usage, here are the key syntax elements:
Basic Variable Output
Loops (for arrays)
Loops (for objects/arrays with key access)
Conditionals
Loop Control Variables (available in both for and each loops)
_i= current index (zero-based)_len= total length of array/object_key= current key (in each loops)@last= true if current iteration is the last item
Conditional Loop Suffix (for separators)
Use {{- unless @last }}, {{/unless}} inside loops to add separators between items but not after the last item.
Escaping & Macros
Caveman supports custom macros and escaping, but for basic token optimization, the above is sufficient.
Usage Pattern for Token Optimization
Step 1: Create a Template File
Define your output structure once in a template file (e.g., gitstatus_template.txt):
Step 2: Prepare Data JSON
Create a JSON file with just the variable data (e.g., gitstatus_data.json):
Step 3: Generate Output with RTK + Caveman
Output:
Integration with Market Alpha Scout
The Market Alpha Scout skill uses this pattern to:
- Scrape data from Stockbro.id using Firecrawl
- Search for KOL recommendations via Google site-specific searches
- Format results using a Caveman template
- Apply RTK to minimize token output from all CLI commands
Example Caveman Template for Stock Output:
[ROCKET] Daily Stockpick Radar - {{d.date}} Kode Saham | Sumber | Strategi | Target Price / ARA | Stop Loss -----------|--------|----------|-------------------|---------- {{- for d.stocks as stock }} {{stock.code}} | {{stock.source}} | {{stock.strategy}} | {{stock.target}} | {{stock.stop_loss}} {{- end }}
{{- if d.high_conviction }} High Conviction Setup: {{- for d.high_conviction as conviction }}{{conviction}}{{- unless @last }}, {{/unless}}{{- end }} {{- end }} Risk Warning: Investasi saham memiliki risiko tinggi. Lakukan DYOR (Do Your Own Research) sebelum membuat keputusan investasi.
{ "date": "2026-04-08", "stocks": [ { "code": "BBCA", "source": "Google Search", "strategy": "Momentum Breakout", "target": "10.200", "stop_loss": "9.500" }, { "code": "TLKM", "source": "Technical Analysis", "strategy": "Support Bounce", "target": "4.250", "stop_loss": "3.900" }, { "code": "ASII", "source": "Broker Recommendation", "strategy": "Value Rebound", "target": "6.800", "stop_loss": "6.200" } ], "high_conviction": ["BBCA", "TLKM"] }
rtk ~/bin/caveman ~/templates/daily_stock_report.txt ~/data/stock_data.json
[ROCKET] Daily Stockpick Radar - 2026-04-08 Kode Saham | Sumber | Strategi | Target Price / ARA | Stop Loss -----------|--------|----------|-------------------|---------- BBCA | Google Search | Momentum Breakout | 10.200 | 9.500 TLKM | Technical Analysis | Support Bounce | 4.250 | 3.900 ASII | Broker Recommendation | Value Rebound | 6.800 | 6.200 High Conviction Setup: BBCA, TLKM Risk Warning: Investasi saham memiliki risiko tinggi. Lakukan DYOR (Do Your Own Research) sebelum membuat keputusan investasi.
git status --porcelain # Verbose output
1. Create template once
echo "{{- for d.staged as file }}\n+ {{file}}\n{{- end }}\n{{- for d.modified as file }}\n~ {{file}}\n{{- end }}" > ~/templates/gitstatus.txt
2. Get data (simplified example)
git status --porcelain | awk ' /^A/ {staged[++s]=$2} /^M/ {modified[++m]=$2} END { printf "{\"staged\":["; for(i=1;i<=s;i++) printf "%s\"%s\"\",i==s?\"\":\",",$2); printf "],\"modified\":["; for(i=1;i<=m;i++) printf "%s\"%s\"\",i==m?\"\":\",",$2); printf "]}" }' > /tmp/gitstatus_data.json
3. Format with RTK + Caveman
rtk ~/bin/caveman ~/templates/gitstatus.txt /tmp/gitstatus_data.json
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/development/caveman-rtk-integration/SKILL.md
Popularity
- Repository stars
- 82
- Repository forks
- 4
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/adityahimaone/hermes-agent-rtk-caveman/caveman-rtk-integration)