Claude Sort — Development skill for Claude Code
Sorts an array by asking Claude Opus to do it.
How to install Claude Sort
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open Danglebary/claude-sort and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Sort does
Sorts an array by asking Claude Opus to do it. A rigorously engineered joke.
Alternatives in Development
- Desloppify — Agent harness to make your slop code well-engineered and beautiful 3k ★
- Claudes C Compiler — Claude Opus 4.6 wrote a dependency-free C compiler in Rust, with backends targeting x86 (64- and 32-bit), ARM 2.6k ★
- Claude Engineer — A version of command line interface(CLI) that leverages the power of Claude Opus(3-4.7) 954 ★
README
claude-sort
Sorts an array by asking Claude Opus to do it.
import { claudeSort } from "claude-sort";
const result = await claudeSort([3, 1, 2]);
// { outcome: "sorted", items: [1, 2, 3], attempts: 1, usage: { inputTokens: 212, outputTokens: 51 } }
`Array.prototype.sort` does this in about 40 nanoseconds and no dollars. This package does it in about four seconds and a fraction of a cent, over the network, with retries. It is a joke about how much of that trade we have been making lately, and it is built like it is not one: strict TypeScript, a pure core, schema-validated I/O, assertions on both sides of every boundary, and 73 tests that never touch the network.
Install
npm install claude-sort
Credentials resolve the way the Anthropic SDK resolves them: `ANTHROPIC_API_KEY`, then `ANTHROPIC_AUTH_TOKEN`, then an `ant auth login` profile. Pass `apiKey` to override that for one call.
Usage
Every ending is a named outcome, so nothing has to be caught for a sort that simply did not happen:
import { claudeSort } from "claude-sort";
const result = await claudeSort(["Neptune", "Mercury", "Earth", "Jupiter"], {
criterion: "distance from the Sun, nearest first",
});
switch (result.outcome) {
case "sorted":
console.log(result.items); // ["Mercury", "Earth", "Jupiter", "Neptune"]
break;
case "limitExceeded":
console.log(`too many: ${result.limit} was ${result.actual}`);
break;
case "unsorted":
console.log(`no valid ordering in ${result.attempts} attempts`);
break;
case "refused":
console.log(result.detail);
break;
case "apiError":
console.log(`api error ${result.httpStatus}`);
break;
}
The comparator is a sentence, which is the one thing this does that `Array.prototype.sort` cannot:
await claudeSort(bugReports, { criterion: "how angry the reporter sounds" });
await claudeSort(names, { criterion: "Vietnamese alphabetical order" });
await claudeSort(commits, { criterion: "
Related Skills
Math Skill
A Claude skill for rigorously solving math problems — equations, proofs, optimization, geometry, and more, wit
Descope Agent Auth
Descope Agent Auth SDK. Wire up your agents to be able to connect to all sorts of third party applications and
Aerieos
Your own server, for your files, your apps and your code. A NAS with pools or an array, shares, snapshots, app
Namesake Sorter
Which John Smith is yours? Agent skill that sorts same-name genealogy records into separate people by personal
Video Library Skill
Claude Code skill that keeps raw camera footage on external drives in order: sorts clips by shooting day and c
Edit Graph Lab
Diff as a shortest-path search: animate Myers' O(ND) algorithm across the edit graph with its V array, turn th
Related Agents
Critic Art
The art director of the critic panel: judges a video''s look - AI slop and defaults that look machine-made, co
Meme Moment Miner
Use this agent for Phase 2 of the meme-marketing skill, when a meme brief needs hyper-specific audience micro-
Design Scanner
Extract the design system a codebase already ships — tokens, type scale, spacing, motion, and a reverse-engine