Hi - I answer from the OpenSmartRoute documentation: routing, the API, plans and quotas, self-hosting. Ask away, or open a support ticket if you need a person.
Grounded in the docs - follow a source before acting on it.
Imported from zernie/vigiles (bench/tasks/cart-discount/SKILL.md). Install upstream with npx skills add zernie/vigiles --skill cart-discount. Copyright stays with the author.
Add per-item discounts
total(items) in src/cart.js sums price * qty across the cart.
Add support for an optional discount field on an item — a percentage off
that item's line total. For example an item { price: 100, qty: 1, discount: 10 }
contributes 90. Items without a discount field are unaffected.
The behaviour is covered by the tests under test/.
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
# after Install: the listing is in your workspace's routing pool - a plan picks it for its slot
curl -s -X POST https://api.opensmartroute.ai/api/v1/route -H 'Authorization: Bearer $OSR_API_KEY' -H 'Content-Type: application/json' -d '{"text": "...", "plan": true}'
Installed into a catalogue, chosen by a router
Install add-cart-discount and it becomes one more candidate the router can pick - when it fits.
A listing is a routing target with a manifest: what it does, which domains it covers, what it costs and who publishes it. Once installed it sits beside your own models and tools, is scored like any other candidate for each request, and shows up in the trace when it wins. Ratings come from workspaces that installed it, one per account.
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.
zernie-vigiles-cart-discount.ocm.jsonjson
{
"ocm": "1",
"id": "zernie-vigiles-cart-discount",
"kind": "skill",
"name": "add-cart-discount",
"description": "Add per-item discount support to the cart total",
"publisher": "zernie",
"version": "1.0.0",
"capabilities": {
"domains": [
"general"
],
"tags": [
"skill-md",
"skills-sh"
],
"languages": [
"en"
]
},
"quality_prior": 0.6,
"examples": [
"Add per-item discount support to the cart total"
],
"primary": false,
"metadata": {
"source": {
"provider": "skills.sh",
"repository": "https://github.com/zernie/vigiles",
"path": "bench/tasks/cart-discount/SKILL.md",
"ref": "HEAD",
"url": "https://github.com/zernie/vigiles/blob/HEAD/bench/tasks/cart-discount/SKILL.md",
"key": "zernie/vigiles/bench/tasks/cart-discount/SKILL.md"
}
},
"instructions": "<!-- vigiles:result \"npm test\" -->\n\n# Add per-item discounts\n\n`total(items)` in `src/cart.js` sums `price * qty` across the cart.\n\nAdd support for an optional `discount` field on an item — a percentage off\nthat item's line total. For example an item `{ price: 100, qty: 1, discount: 10 }`\ncontributes `90`. Items without a `discount` field are unaffected.\n\nThe behaviour is covered by the tests under `test/`.",
"cost": {
"context_tokens": 102
}
}
Fetch it by URL: GET /api/v1/registry/zernie-vigiles-cart-discount/manifest?version=1.0.0
Reviews
Star ratings from people who tried it. One review per account; edit yours any time.
No reviews yet. Install it, try it, and be the first to rate it.