بنقرة واحدة
c-slop
Token-minimal programming language for full-stack web apps using symbols (@, $,
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Token-minimal programming language for full-stack web apps using symbols (@, $,
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | c-slop |
| description | Token-minimal programming language for full-stack web apps using symbols (@, $, |
| license | MIT |
| compatibility | opencode |
| metadata | {"author":"Oorosh","original-project":"C-slop","original-author":"bigboggy","repo":"https://github.com/bigboggy/C-slop","website":"https://c-slop.dev"} |
This skill helps OpenCode agents understand and work with C-slop, a token-optimized programming language for full-stack web applications.
C-slop is designed for machine efficiency - minimizing tokens while maintaining expressiveness. It provides:
Token Savings: 75-82% fewer tokens than JavaScript
* — Route definition — */users+ — POST method — */users +^ — PUT method — */users/:id ^- — DELETE method — */users/:id -@ — Database table — @users$ — Request/Input data — $.body, $.id# — Response/Output — #json, #201> — Pipeline operator — @users > #json? — Query/Filter — @users?{active:true}! — @users!$.body~ — PUT method (backend) / Effect (frontend) — ~ fetch("/api")<? — Template separator (UI) — Separates state from markup@@ — Component usage — @@Counter:= — Computed value — $doubled := $count * 2.slop — Backend API routes — api.slop.ui — Frontend components — Counter.uirouter.slop — Client-side routing — router.slopslop.json — Configuration — Project settings# GET routes - fetch data
*/ > #json({message: "Hello!"})
*/users > @users > #json
*/users/:id > @users[$.id] > #json
# POST route - create
*/users + @users!$.body > #json
# PUT route - update
*/users/:id ~ @users[$.id]!$.body > #json
# DELETE route
*/users/:id - @users[$.id]!- > #204
@users # Select all
@users[123] # Select by ID
@users[$.id] # Select by request param
@users?{active:true} # Filter
@users!{name:"Alice"} # Insert
@users[123]!{name:"Bob"} # Update
@users[123]!- # Delete
$.body # Request body
$.params # URL parameters
$.id # Shorthand for $.params.id
$.query # Query string
$.headers # Headers
#json(data) # JSON response
#html(content) # HTML response
#201 # Status code 201 Created
#204 # Status code 204 No Content
#404("Not found") # Status with message
# Simple pipeline
@users > #json
# With filtering
@users?{active:true} > #json
# Create and return
@users!$.body > #json
# Error handling
@users[$.id] >| #404 > #json
$count:0 # Reactive state
$doubled := $count * 2 # Computed value
~ fetch("/api") > $data # Effect (runs on mount)
$count:0
<?
.counter
h1["Count: @{$count}"]
button["+" @click($count++)]
button["-" @click($count--)]
# Reactive interpolation
h1["Hello, @{$name}"]
# Event handlers
button["Click" @click($count++)]
input[@input($text:e.target.value)]
form[@submit(handleSubmit)]
# Dynamic attributes
img[src{$imageUrl} alt{"Avatar"}]
div[class{$activeClass}]
# Conditionals
? $loading
p["Loading..."]
: $error
p["Error!"]
:
p["Content"]
# Loops
ul
@users >>
li["{@name} - {@email}"]
# Client-side SPA routing
/ > @@Home
/counter > @@Counter
/users/:id > @@UserDetail
Navigation:
# Auto-generates href and click handler
a["Go to Counter" @nav(/counter)]
button["Back" @nav(/)]
# api.slop - Full REST API in 5 lines
*/users > @users > #json
*/users/:id > @users[$.id] > #json
*/users + @users!$.body > #json
*/users/:id ~ @users[$.id]!$.body > #json
*/users/:id - @users[$.id]!- > #204
# Installation (from compiler/ directory)
cd compiler && npm install && npm link
# Create project
cslop create my-app
# Development server with hot reload
cslop watch
# Production server
cslop start
# Compile single file
cslop app.slop
cslop build app.slop -o out.js
# Run tests
cd compiler && npm test
my-app/
├── slop.json # Configuration
├── api.slop # Backend API routes
├── router.slop # Frontend routing
├── components/ # UI components
│ ├── Home.ui
│ └── Counter.ui
└── dist/ # Compiled output
{
"name": "my-app",
"database": {
"type": "memory"
},
"server": {
"port": 3000,
"static": "./dist"
},
"theme": {
"light": {
"primary": "#3b82f6",
"success": "#22c55e"
},
"dark": {
"primary": "#60a5fa",
"success": "#4ade80"
}
}
}
*/api/* > $.headers.auth ? {user:jwt?($.headers.auth)} : #401
*/users + {
$.body.name ?? #400("name required")
@users!$.body > #201
}
@users[$.id] >| #404 > #json
import axios from "axios"
*/github > axios.get("https://api.github.com") > #json
The skill is automatically installed when you create a new project:
cslop create my-app
# Creates .claude/skills/c-slop/SKILL.md automatically
For existing projects, copy the skill manually:
# From C-slop repo root
cp -r .opencode/skills/c-slop /path/to/your/project/.claude/skills/
Install once for all projects:
# OpenCode
cp -r .opencode/skills/c-slop ~/.config/opencode/skills/
# Claude Code
cp -r .opencode/skills/c-slop ~/.claude/skills/
compiler/
├── src/
│ ├── cli.js # CLI commands
│ ├── compiler.js # Backend parser
│ └── runtime.js # Express wrapper
├── frontend/
│ ├── parser.js # .ui parser
│ ├── codegen.js # JS generator
│ ├── router-parser.js
│ └── router-codegen.js
├── runtime/
│ ├── signals.js # Reactive signals (~1.5KB)
│ ├── dom.js # DOM helpers (~1KB)
│ └── router.js # Client-side router
└── slopui/
├── base.css # CSS reset & utilities
├── components.css # Component styles
└── theme.js # Theme generator
C-SLOP.md in this repoUSAGE.md in this repoUse this skill when:
.slop or .ui filesNote: This is a quick reference. For complete documentation, see C-SLOP.md and USAGE.md in this repository.