Skip to content
Skillv1.0.0

lib

src/lib Agent Guidelines

by mcotse(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from mcotse/dishrank (src/lib/AGENTS.md). Install upstream with npx skills add mcotse/dishrank --skill lib. Copyright stays with the author.

src/lib Agent Guidelines

places.ts

  • Google Places script must be loaded before calling API methods
  • Uses loadGooglePlaces() which returns a promise - await it before using searchPlaces()
  • Place predictions return place_id which maps to google_place_id in restaurants table

elo.ts

  • K-factor is dynamic: 40 (< 10 comparisons) → 24 (< 30) → 16 (30+)
  • New dishes start at cuisine average Elo, defaulting to 1200
  • calculateNewElo() returns both new ratings as a tuple [winnerNew, loserNew]

supabase.ts

  • Client is a singleton, import from here rather than creating new instances
  • Auth state changes are handled via onAuthStateChange subscription in useAuth hook

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/mcotse-dishrank-lib/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

mcotse-dishrank-lib.ocm.jsonjson
{
  "ocm": "1",
  "id": "mcotse-dishrank-lib",
  "kind": "skill",
  "name": "lib",
  "description": "src/lib Agent Guidelines",
  "publisher": "mcotse",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "github-agents"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "src/lib Agent Guidelines"
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "github-agents",
      "repository": "https://github.com/mcotse/dishrank",
      "path": "src/lib/AGENTS.md",
      "ref": "edd57e8e8b5209640880ba04c8eb44871910ada8",
      "url": "https://github.com/mcotse/dishrank/blob/edd57e8e8b5209640880ba04c8eb44871910ada8/src/lib/AGENTS.md",
      "key": "mcotse/dishrank/src/lib/AGENTS.md"
    }
  },
  "instructions": "# src/lib Agent Guidelines\n\n## places.ts\n- Google Places script must be loaded before calling API methods\n- Uses `loadGooglePlaces()` which returns a promise - await it before using `searchPlaces()`\n- Place predictions return `place_id` which maps to `google_place_id` in restaurants table\n\n## elo.ts\n- K-factor is dynamic: 40 (< 10 comparisons) → 24 (< 30) → 16 (30+)\n- New dishes start at cuisine average Elo, defaulting to 1200\n- `calculateNewElo()` returns both new ratings as a tuple [winnerNew, loserNew]\n\n## supabase.ts\n- Client is a singleton, import from here rather than creating new instan",
  "cost": {
    "context_tokens": 172
  }
}

Fetch it by URL: GET /api/v1/registry/mcotse-dishrank-lib/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.