Swift input. Sharp output. Every token counts.
Install • Modes • Usage • V3 DSL • Roadmap • Contributing
Marlin compresses what you send to the model — not what the model says back. It restructures verbose prompts into lean, schema-anchored representations. The model receives a cleaner, denser signal and returns sharper, more deterministic output.
Input tokens cost money. Verbose prompts waste context window. Marlin fixes the input side.
macOS / Linux / WSL / Git Bash:
curl -fsSL https://raw.githubusercontent.com/adisingh-cs/Marlin/main/install.sh | bashWindows (PowerShell):
irm https://raw.githubusercontent.com/adisingh-cs/Marlin/main/install.ps1 | iexDetects Claude Code, Gemini CLI, Cursor, Windsurf, Cline, Copilot, Codex, Antigravity, opencode, Roo, Kiro, and more. Runs each one's native install. Skips what you don't have. Safe to re-run.
bash install.sh --all # also drop always-on rule files into current repo
bash install.sh --minimal # skill only, no extras
bash install.sh --list # show all supported agent slugs| Agent | Command |
|---|---|
| Claude Code | npx skills add adisingh-cs/Marlin -g -a claude-code |
| Gemini CLI | gemini extensions install https://github.com/adisingh-cs/Marlin |
| Cursor | npx skills add adisingh-cs/Marlin -g -a cursor |
| Windsurf | npx skills add adisingh-cs/Marlin -g -a windsurf |
| Cline | npx skills add adisingh-cs/Marlin -g -a cline |
| GitHub Copilot | npx skills add adisingh-cs/Marlin -g -a github-copilot |
| Codex | npx skills add adisingh-cs/Marlin -g -a codex |
| Antigravity | npx skills add adisingh-cs/Marlin -g -a antigravity |
| opencode | npx skills add adisingh-cs/Marlin -g -a opencode |
| All agents | npx skills add adisingh-cs/Marlin -g |
- Download ZIP from github.com/adisingh-cs/Marlin
- Go to claude.ai/customize/skills
- Click
+→ uploadSKILL.mdfrom the ZIP - Done — use
/marlin swift,/marlin sharp,/marlin strike,/marlin sonar
npx skills remove marlin
# or
gemini extensions uninstall marlinFour modes. One command prefix. You pick the intensity.
| Command | Intensity | Target Reduction | Best For |
|---|---|---|---|
/marlin swift |
Light | ~20–35% | General prompts, first use |
/marlin sharp |
Mid | ~35–50% | API calls, repeated workflows |
/marlin strike |
Max | ~50–70% | High-volume, cost-sensitive |
/marlin sonar |
Domain | ~40–65% | Web-API, data, agent tasks |
/marlin swift
I want to build a login endpoint that takes email and password,
checks against the database, and returns a JWT token if valid.
Only use PostgreSQL. Output as JSON.
Output:
{
"goal": "build login endpoint",
"action": "create",
"inputs": ["email", "password"],
"domain": "authentication",
"constraints": ["PostgreSQL only"],
"format": "json"
}Original: ~38 tokens → Compressed: ~28 tokens → Saved: ~26%
/marlin sharp
I want to build a login endpoint that takes email and password,
checks against the database, and returns a JWT token if valid.
Only use PostgreSQL. Output as JSON.
Output:
{"g":"build login endpoint","a":"create","i":["email","password"],"d":"authentication","c":["PostgreSQL only"],"f":"json"}Original: ~38 tokens → Compressed: ~22 tokens → Saved: ~42%
/marlin strike
I want to build a login endpoint that takes email and password,
checks against the database, and returns a JWT token if valid.
Only use PostgreSQL. Output as JSON.
Output:
{"g":"build login ep","a":"create","i":"email,password","d":"auth","c":"PostgreSQL only","f":"json"}Original: ~38 tokens → Compressed: ~18 tokens → Saved: ~53%
/marlin sonar --schema web-api
Create a POST endpoint at /api/users/login that accepts email and
password in the request body, validates with JWT, returns tokens.
Requires Authorization header. Version 2.
Output:
{"m":"POST","ep":"/api/users/login","au":"jwt","pl":["email","password"],"hd":["Authorization"],"rf":"json","v":"2"}Original: ~42 tokens → Compressed: ~21 tokens → Saved: ~50%
Available schemas: --schema web-api · --schema data-pipeline · --schema agent-task
Append to any command:
| Flag | Returns |
|---|---|
--prompt |
Compressed prompt only — ready to paste |
--report |
Compressed + token savings report (default) |
--diff |
Original vs compressed side by side |
--all |
Everything |
Example: /marlin sharp --diff
For agent-to-agent passing and ultra-compact storage:
# Internal DSL (store/pass between agents)
G:build login ep|A:create|I:email,password|D:auth|F:json
# Bridge to JSON before sending to any LLM
/marlin bridge G:build login ep|A:create|I:email,password|D:auth|F:json
Append --dsl to any mode command for DSL output.
/marlin swift Normalize + structure (target: ~20–35%)
/marlin sharp Compact + short keys (target: ~35–50%)
/marlin strike Maximum compression (target: ~50–70%)
/marlin sonar Domain schema (target: ~40–65%)
--prompt Compressed prompt only
--report Prompt + savings report (default)
--diff Side-by-side comparison
--all Everything
--dsl V3 internal DSL format
Marlin compresses input. caveman compresses output. Run both — save on both ends.
🚧 Benchmark results pending. Run it yourself with OpenRouter:
python benchmarks/run.py --api-key "sk-or-..." --model "openai/gpt-4o-mini"You can also set
OPENROUTER_API_KEYandOPENROUTER_MODEL. The harness records heuristic token savings plus compression-system overhead.
- V1 (now): Single SKILL.md, four modes, npx install, V3 DSL
- V2: npm package + REST API — deterministic compression, no LLM needed
- V3: Multi-agent pipeline support, domain schema expansion
Contributions welcome — new domain schemas, key maps, examples, benchmark results. Read CONTRIBUTING.md first.
MIT License. Free to use, fork, and build on. If Marlin saves you tokens, a ⭐ or a mention helps others find it. ATTRIBUTION.md
Built by @adisingh-cs — Aditya Singh
