chayuto

Vibe Sort — AI skill for Claude Code

AI community

Proof-of-concept Ruby gem that sorts arrays using LLM APIs: OpenAI, Anthropic Claude, Google Gemini, Groq, and SpaceXAI Grok.

How to install Vibe Sort

This entry records only its repository, not the path inside it, so there is no exact command to give. Open chayuto/vibe-sort and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Vibe Sort does

Proof-of-concept Ruby gem that sorts arrays using LLM APIs: OpenAI, Anthropic Claude, Google Gemini, Groq, and SpaceXAI Grok.

Alternatives in AI

  • WindsurfAPI — Turn Windsurf / Devin Desktop's 100+ AI models (Claude, GPT, Gemini, DeepSeek, Kimi, GLM, SWE) into OpenAI-, A 3k ★
  • Anthropic SDK TypeScript — Access to Anthropic's safety-first language model APIs in TypeScript 2.1k ★
  • Adopt AI Properly — Workflow recipe — the org-side AI adoption arc, policy to proof, by chaining 4 skills 1.3k ★

README

VibeSort

**AI-powered array sorting using OpenAI, Anthropic Claude, Google Gemini, Groq, SpaceXAI Grok, or OpenRouter**

VibeSort is a proof-of-concept Ruby gem that demonstrates sorting arrays by leveraging LLM APIs. Instead of using traditional sorting algorithms, it asks an AI model to do the work. Supports the OpenAI Chat Completions API, the Anthropic Messages API, the Google Gemini API, and the OpenAI-compatible Groq, SpaceXAI (xAI), and OpenRouter APIs, with zero dependencies beyond Faraday.

[![Gem Version](https://badge.fury.io/rb/vibe-sort.svg)](https://badge.fury.io/rb/vibe-sort) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Disclaimer

This is a **proof-of-concept** and educational project. It is not intended for production use. Traditional sorting algorithms are far more efficient, reliable, and cost-effective. Use this gem to explore AI capabilities, not to sort arrays in real applications.

Features

  • AI-Powered Sorting: Uses OpenAI, Anthropic Claude, Google Gemini, Groq, SpaceXAI Grok, or OpenRouter models to sort arrays
  • Multi-Provider: Switch providers with a single provider: option, no extra dependencies
  • Key Format Detection: Omit provider: and VibeSort infers it from your API key's prefix
  • Simple Interface: Clean, intuitive API with a single sort method
  • Configurable: Custom model, temperature, and an extra_params: escape hatch for any provider-native request parameter
  • Error Handling: Comprehensive error handling with clear error messages
  • Structured Output: Uses JSON mode for reliable, parsable responses
  • Type Validation: Validates input and output to ensure data integrity
  • Mixed-Type Support: Sorts arrays containing integers, floats, and strings

Requirements

  • Ruby 3.0 or newer (MRI)
  • Bundler 2.0+
  • An API key for at least one supported provider (OpenAI, Anthropic, Google Gemini, Groq, SpaceXAI, or OpenR