kit-sdk

kit-sdk is a skill for Claude Code, Codex from mark3labs/kit. It costs 78 tokens per session (2,622 once invoked), scanned A, original, MIT.

A development guide for using Kit as a Go library inside standalone programs. Kit provides agent conversations, tool execution, session handling, streaming, and hooks to those programs.

In plain words
What is it for?
Use it to build Go services, scripts, command-line tools, or agents that send prompts, use tools, manage sessions, and process streamed responses.
Why use it?
It helps developers choose the library approach when they need Kit inside their own compiled application rather than as an in-app extension.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to build Go services, scripts, command-line tools, or agents that send prompts, use tools, manage sessions, and process streamed responses.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mark3labs/kit/kit-sdk
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 mark3labs/kit --skill kit-sdk
Clone the repo
git clone --depth 1 https://github.com/mark3labs/kit

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 kit-sdk

README.md
[![agentmods](https://agentmods.dev/badge/skills/mark3labs/kit/kit-sdk/github.svg)](https://agentmods.dev/skills/mark3labs/kit/kit-sdk)
Your own site
<a href="https://agentmods.dev/skills/mark3labs/kit/kit-sdk"><img src="https://agentmods.dev/badge/skills/mark3labs/kit/kit-sdk/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 kit-sdk

Your own site · 80×15
<a href="https://agentmods.dev/skills/mark3labs/kit/kit-sdk"><img src="https://agentmods.dev/badge/skills/mark3labs/kit/kit-sdk.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,622 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.00078 $0.02622
Opus 5.5 $0.00031 $0.01049
Sonnet 5.5 $0.00016 $0.00524
Haiku 4.5 $0.00008 $0.00262

Measured today against content hash fdfc4345f2cb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

kit-sdk 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 today.

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.

skills/kit-sdk/SKILL.md · 151 lines

How it starts

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

Kit SDK Development Guide

The Kit SDK (pkg/kit) lets you embed Kit's full agent capabilities — LLM interactions, tool execution, session management, streaming, hooks — into any Go application. Unlike extensions (which are interpreted scripts running inside Kit's TUI), SDK programs are standalone compiled Go binaries.

This file is the entry point. It gives the installation, a quick start, the core lifecycle, and the rules you must never miss. Detailed material lives in the references/ directory (see Reference files below). Read only the reference files that apply to your task.

Installation

go get github.com/mark3labs/kit

Import path (alias recommended):

import kit "github.com/mark3labs/kit/pkg/kit"

Quick Start

package main

import (
    "context"
    "fmt"
    "log"

    kit "github.com/mark3labs/kit/pkg/kit"
)

func main() {
    ctx := context.Background()

    host, err := kit.New(ctx, nil) // nil = normal config-file discovery and field resolution
    if err != nil {
        log.Fatal(err)
    }
    defer func() { _ = host.Close() }()

    response, err := host.Prompt(ctx, "What is 2+2?")
    if err != nil {
        log.Fatal(err)
    }
    fmt.Println(response)
}

Core Lifecycle

  1. Create: kit.New(ctx, opts) — loads config, initializes MCP servers, creates LLM provider, sets up agent
  2. Interact: host.Prompt(ctx, msg) — send messages, agent uses tools as needed
  3. Close: host.Close() — cleans up MCP connections, model resources, session file handle

Always defer Close():

defer func() { _ = host.Close() }()

API Map

Area Entry points Reference
Configure the instance kit.Options{Model, SystemPrompt, MaxSteps, Tools, ExtraTools, NoSession, ...}, kit.NewIsolatedAgent / kit.Isolated() for hermetic embeds references/options.md
Talk to the agent Prompt, PromptResult, PromptResultWithFiles, PromptWithOptions, Steer, FollowUp, PromptResultWithMessages references/prompt-methods.md
Observe (read-only) host.OnToolCall(...), host.OnMessageUpdate(...), host.Subscribe(...) references/events.md
Intercept (read-write) host.OnBeforeToolCall(priority, fn), OnAfterToolResult, OnBeforeTurn, OnPrepareStep, OnContextPrepare, OnBeforeCompact references/hooks.md
Add capabilities kit.NewTool(name, desc, fn), kit.TextResult, built-in tool constructors and bundles references/tools.md
Persist conversations SessionPath, Continue, NoSession, instance and package-level session methods references/sessions.md
Decision API kit.Decide, host.Decide, GetDecisionModels, typed question builders references/decisions.md
Models and MCP host.SetModel, model registry, custom provider backends (kit.RegisterProvider, Options.Providers), AddMCPServer, in-process servers, MCP OAuth references/models-and-mcp.md
Manage the context window EstimateContextTokens, Compact, AutoCompact, host.Subagent references/context-compaction-subagents.md

Read the full file on GitHub · 151 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. today Changed · +1 lines fdfc4345f2cb
  2. 14d ago Changed 3a8c5c5debe4
  3. 28d ago Changed a92587eea807
  4. 29d ago Changed 0fd54e4d7a44
  5. 1mo ago Changed · -1,281 lines scan D → A 8f48c517ee39
  6. 1mo ago Changed ae5247a32375
  7. 1mo ago Changed f3831ffaf2e6
  8. 1mo ago First seen · 1,431 lines · 78 tokens per session scan D 2058f1c6875f

Subscribe to this mod's changes

kit-sdk is a skill published in the GitHub repository mark3labs/kit (144 stars, last pushed today), licensed MIT. It adds 78 tokens to every session and 2,622 once invoked, about $0.0003 per session on Opus 5.5. 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-30.

Related

Other skills, from other repositories

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

ax-go-agent-optimize

Use when writing Go code with github.com/ax-llm/ax/packages/go for agent optimization, verified agent-playbook evolution, evaluators, judges, optimizer artifacts, BootstrapFewShot, and GEPA.

ax-llm/ax · 51 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

golang-uber-fx

Golang application framework using uber-go/fx — fx.New, fx.Provide, fx.Invoke, fx.Module, fx.Lifecycle hooks, fx.Annotate (name/group/As), fx.Decorate, fx.Supply, fx.Replace, fx.WithLogger, and signal-aware Run(). Apply when using or adopting uber-go/fx, when the codebase imports go.uber.org/fx, or when wiring…

samber/cc-skills-golang · 122 tokens

golang-samber-oops

Structured error handling in Golang with samber/oops — error builders, stack traces, error codes, error context, error wrapping, error attributes, user-facing vs developer messages, panic recovery, and logger integration. Apply when using or adopting samber/oops, or when the codebase already imports…

samber/cc-skills-golang · 74 tokens