agentleFS
renatoworksrenatoworks/strudel-claude/.claude/skills/api/SKILL.md

api

Skill61 starsChanged 10 months agoMITView on GitHub

Control the Strudel REPL via REST APIs. Use when you need to push code, start/stop playback, or check status.

  • Sends data out

22 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use cli, mcp and 6 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • tieroSkill

    cli

    Also in 5 projects that use this

  • VercelSkill

    mcp

    MCP Apps integration for json-render. Use when building MCP servers that render interactive UIs in Claude, ChatGPT, Cursor, or VS Code, or when integrating json-render with the Model Context Protocol.

    Also in 4 projects that use this

  • 0xSeroSkill

    security

    Also in 3 projects that use this

  • Microsoft AzureSkill

    design

    Design rules and conventions for the API Center Portal. Use when editing detail pages, card components, badges, layout, navigation, sidebars, or headers. Covers badge styling, metadata placement, page navigation patterns, and layout alignment.

    Also in 4 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 3 projects that use this

  • SentrySkill

    review

    Fixture review skill.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Rule of thumb: If you need a literal backslash in the code, escape it as \\

    line 68

“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Strudel API

Talk to the REPL at http://localhost:3000.


Endpoints

EndpointMethodWhat it does
/api/codePOSTPush new code
/api/codeGETRead current code
/api/playPOSTStart playback
/api/stopPOSTStop playback
/api/statusGETGet current state
/api/eventsGETSSE stream (real-time updates)

Real-time sync: The browser connects to /api/events via Server-Sent Events. When you push code or trigger play/stop, the browser updates automatically.


Push Code

curl -X POST http://localhost:3000/api/code \
  -H "Content-Type: application/json" \
  -d '{"code": "YOUR_CODE_HERE"}'

JSON Escaping Rules (CRITICAL)

The API uses JSON.parse(). Invalid escape sequences will cause 500 errors.

Valid JSON escapes (these work):

EscapeMeaning
\"Double quote
\\Backslash
\nNewline
\tTab
\rCarriage return
\/Forward slash

Invalid escapes (these BREAK the API):

  • \x, \a, \s, \d, \w, or any backslash + letter not in the table above
  • Unescaped backslashes

Examples:

# ✅ GOOD - properly escaped
curl -X POST http://localhost:3000/api/code \
  -H "Content-Type: application/json" \
  -d '{"code": "$: s(\"bd sd hh hh\")"}'

# ❌ BAD - \s is not a valid JSON escape
curl -X POST http://localhost:3000/api/code \
  -H "Content-Type: application/json" \
  -d '{"code": "$: s(\"bd\sd\")"}'

Rule of thumb: If you need a literal backslash in the code, escape it as \\


Play / Stop

curl -X POST http://localhost:3000/api/play
curl -X POST http://localhost:3000/api/stop

Typical Flow

  1. Push code
  2. Play

That's it. The REPL handles the rest.


Multi-line Example

curl -X POST http://localhost:3000/api/code \
  -H "Content-Type: application/json" \
  -d '{"code": "setcpm(130/4)\n\n$: s(\"bd*4, hh*8\").bank(\"RolandTR909\")\n\n$: note(\"<c2 g1 ab1 bb1>\").s(\"sawtooth\").lpf(400)"}'

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.