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
Sales Safari
Mine watering holes for product opportunities; observe conversations, sort findings into pain killers vs money
Plugin Sort Hat
Sort incoming ideas into the right marketplace house (agent/command/skill/update/skip)
Arxiv Search
Search arXiv by free text; surfaces published DOIs ready to verify. Args: "query" [--max=10] --sort=relevance
Agent Sort
Legacy slash-entry shim for the agent-sort skill. Prefer the skill directly.
Related Agents
Subdomain Enumeration
subfinder -d {domain} -silent sort -u subs.txt amass enum -passive -d {domain} subs.txt sort -u subs.txt -o su
Research Locator
Discovers relevant documents in rpi/ directory (We use this for all sorts of metadata storage!). This is reall
Compile-time Profiling
clang++ -ftime-trace -ftime-trace-granularity=1 file.cpp chrome://tracing # Load the JSON bloaty binary -d sym