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.

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.

agentmods
npx agentmods add skills/jkaninda/okapi-skills/std_compat
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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00000 $0.00717
Sonnet 5 $0.00000 $0.00287
Haiku 4.5 $0.00000 $0.00143

Measured 5d ago against content hash 6d7a3ca03209, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 5d 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. 5d 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 20d 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.

Related

Other skills, from other repositories

af-xdp

AFXDP skill for high-performance XDP sockets. Use when creating AFXDP sockets, configuring UMEM and XSK rings, XDPREDIRECT programs, copy vs zero-copy mode, or comparing with DPDK. Activates on queries about AFXDP, xskumem, XDPREDIRECT, libbpf xsk, or zero-copy XDP.

mohitmishra786/low-level-dev-skills · 81 tokens

golang-testing

Go testing best practices including table-driven tests, test helpers, benchmarking, race detection, coverage analysis, and integration testing patterns. Use when writing or improving Go tests.

affaan-m/ECC · 37 tokens

golang-patterns

Go-specific design patterns and best practices including functional options, small interfaces, dependency injection, concurrency patterns, error handling, and package organization. Use when working with Go code to apply idiomatic Go patterns.

affaan-m/ECC · 45 tokens

ast-grep

Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for…

JanDeDobbeleer/oh-my-posh · 80 tokens

gen-test

Generate idiomatic tests for Go packages and handlers in the Meshery project.

meshery/meshery · 18 tokens

golang-testing

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…

samber/cc-skills-golang · 115 tokens