{
  "markdown": "# <img src=\"slim.png\" width=\"400\" alt=\"slim logo\">\n\n[![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue.svg)](https://www.typescriptlang.org/)\n[![Node.js](https://img.shields.io/badge/Node.js-20+-green.svg)](https://nodejs.org/)\n\n**slim** is a lightweight TypeScript-based extension for AI CLIs (Gemini, Qwen, Claude) that dramatically reduces Model Context Protocol (MCP) token usage by compressing tool exposure.\n\n---\n\n## 🚀 The Problem: Token Bloat\nWhen you use multiple MCP servers, AI CLIs inject every single tool schema into the LLM prompt. For large servers like `github` or `filesystem`, this can consume **thousands of tokens** before you even start typing.\n\n**Example Raw Exposure:**\n- `read_file`, `write_file`, `list_directory`, `search_code`, `git_diff`, `create_issue`, `get_pull_request`... (50+ tools)\n\n## 💎 The Solution: Skill Compression\n**slim** consolidates an entire MCP server into a single **Skill Signature**. Instead of 50 schemas, the LLM sees one:\n\n`github_tools(action, params)`\n\nWhen the LLM calls `github_tools(\"create_issue\", { ... })`, the **slim** runtime routes the call to the correct MCP tool. \n\n**Result: ~95% reduction in MCP-related token overhead.**\n\n---\n\n## 🛠 Features\n\n- **Native CLI Detection:** Automatically identifies if you are running in Gemini, Qwen, or Claude environments.\n- **Automated Discovery:** Scans your host CLI `settings.json` to find and connect to your MCP servers.\n- **On-the-fly Generation:** Spawns MCP servers via JSON-RPC to fetch tool lists and generate skill definitions.\n- **Safe Execution:** Manages MCP process lifecycles and standardizes routing via a local registry.\n- **Zero Latency:** High-performance TypeScript implementation with minimal dependencies.\n\n---\n\n## 📦 Installation\n\n1. **Clone and Build:**\n   ```bash\n   git clone https://github.com/your-repo/slim.git\n   cd slim\n   npm install\n   npm run build\n   ```\n\n2. **Link Globally:**\n   ```bash\n   npm link\n   ```\n\n---\n\n## 🚦 Usage\n\n### 1. Initialize\nScan your host CLI settings and generate compressed skills.\n```bash\nslim init\n```\n*Note: You can specify a CLI manually with `--cli [gemini|qwen|claude]`.*\n\n### 2. Inspect\nView your generated skills and the actions they contain.\n```bash\nslim inspect\n```\n\n### 3. Usage in Prompt\nOnce initialized, you can reference the skills in your AI CLI:\n> \"Use `github_tools` to create a new issue for the bug we found.\"\n\n---\n\n## 📂 Project Structure\n\n- `src/cli/`: Command handlers (`init`, `inspect`, `status`).\n- `src/core/`: Business logic for MCP scanning, tool fetching, and skill generation.\n- `src/storage/`: Path management and JSON persistence.\n- `src/types/`: Shared TypeScript interfaces.\n- `~/.slim/`: Local state directory where registries and schemas are stored.\n\n---\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) (coming soon) for details on our code of conduct and the process for submitting pull requests.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n---\n\n## 📄 License\n\nDistributed under the **ISC License**. See `LICENSE` for more information.\n\n---\n*Built with ❤️ for the AI Engineer community.*\n",
  "bytes": 3458,
  "sha": "bfcfa211efde66d24cf0993b6abcc08dcb51d3f680027f14c7bf8952b5a63fb7",
  "repo_slug": "jayanthchandra/slim",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_jayanthchandra_slim_41c17a00/readme"
}