std_compat

std_compat is a skill for Claude Code, Codex from jkaninda/okapi-skills. It costs 0 tokens per session (1,433 once invoked), scanned A, original, MIT.

A compatibility layer for Okapi, a Go web framework, and Go’s standard net/http package. It lets Okapi use standard HTTP handlers and middleware.

In plain words
What is it for?
It helps mount an Okapi application in a standard Go server, register existing handlers, and serve files with standard HTTP tools.
Why use it?
It removes the need to rewrite existing net/http code all at once. You can move parts of a web application to Okapi gradually.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps mount an Okapi application in a standard Go server, register existing handlers, and serve files with standard HTTP tools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jkaninda/okapi-skills/std_compat
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jkaninda/okapi-skills --skill std_compat
Clone the repo
git clone --depth 1 https://github.com/jkaninda/okapi-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for std_compat

README.md
[![agentmods](https://agentmods.dev/badge/skills/jkaninda/okapi-skills/std_compat/github.svg)](https://agentmods.dev/skills/jkaninda/okapi-skills/std_compat)
Your own site
<a href="https://agentmods.dev/skills/jkaninda/okapi-skills/std_compat"><img src="https://agentmods.dev/badge/skills/jkaninda/okapi-skills/std_compat/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for std_compat

Your own site · 80×15
<a href="https://agentmods.dev/skills/jkaninda/okapi-skills/std_compat"><img src="https://agentmods.dev/badge/skills/jkaninda/okapi-skills/std_compat.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,433 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01433
Opus 5.5 $0.00000 $0.00573
Sonnet 5.5 $0.00000 $0.00287
Haiku 4.5 $0.00000 $0.00143

Measured 1mo ago against content hash 6d7a3ca03209, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

std_compat scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

std_compat/SKILL.md · 149 lines

How it starts

The opening of the file, as written. The whole thing — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Okapi ↔ net/http Compatibility

Okapi implements http.Handler and accepts standard handlers and middleware, so a net/http codebase can be migrated incrementally.

Okapi as an http.Handler

o := okapi.Default()
o.Get("/hello", handler)

http.ListenAndServe(":8080", o)                // Okapi mounted in net/http
// or hand Okapi a pre-built server
o.StartServer(&http.Server{Addr: ":8080", ReadTimeout: 5 * time.Second})

Registering Standard Handlers

Available on both *Okapi and *Group:

o.HandleStd(method, path string, h func(http.ResponseWriter, *http.Request), opts ...RouteOption)
o.HandleHTTP(method, path string, h http.Handler, opts ...RouteOption)
o.HandleStd("GET", "/greet", func(w http.ResponseWriter, r *http.Request) {
    w.Write([]byte("Hello from Okapi!"))
})

type MyHandler struct{}
func (h *MyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { /* ... */ }

o.HandleHTTP("GET", "/custom", &MyHandler{})

// Whole subtree handed to a file server (catch-all segment)
o.HandleHTTP("GET", "/assets/{any...}",
    http.StripPrefix("/assets/", http.FileServer(http.Dir("./public"))))

Standard handlers still get the full middleware chain, routing, CORS registration, and OpenAPI entry.

Path Parameters in a Standard Handler

Both accessors work:

o.HandleStd("GET", "/users/{id}", func(w http.ResponseWriter, r *http.Request) {
    id := r.PathValue("id")        // works: Okapi copies captured params onto the request
    _ = id
})

import "github.com/jkaninda/njia"

o.HandleStd("GET", "/users/{id}", func(w http.ResponseWriter, r *http.Request) {
    id := njia.Param(r, "id")      // reads the router context directly — no map allocation
    _ = id
})

Okapi's router captures parameters into the request context rather than through http.ServeMux, so it copies them onto the request with SetPathValue before invoking a standard handler (HandleStd and HandleHTTP, on the app and on groups alike). That bridge costs one map allocation per request and is paid only by routes that use a standard handler and declare parameters. njia.Param is the allocation-free accessor for new code; r.PathValue exists so an unmodified net/http handler keeps working.

Read the full file on GitHub · 149 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 149 lines · 0 tokens per session scan A 6d7a3ca03209

Subscribe to this mod's changes

std_compat is a skill published in the GitHub repository jkaninda/okapi-skills (3 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,433 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.