finfocus-plugin

A guide for creating FinFocus plugins in Go. FinFocus is a cost-tracking tool, and its plugins are separate programs that communicate with it through gRPC, a way for programs to call each other.

In plain words
What is it for?
Use it to scaffold a plugin, implement cost-estimation methods, choose how the plugin starts, understand its lifecycle, and work from the recorder example.
Why use it?
It explains the required setup and communication details, reducing guesswork when building, installing, or debugging a cost plugin.

Skill for Claude CodeCodex

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/rshade/finfocus/finfocus-plugin
Any agent
npx skills add rshade/finfocus --skill finfocus-plugin
Clone the repo
git clone --depth 1 https://github.com/rshade/finfocus

Made for: Claude Code, Codex.

Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,049 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 $0.00098 $0.01049
Opus 5 $0.00049 $0.00524
Sonnet 5 $0.00020 $0.00210
Haiku 4.5 $0.00010 $0.00105

Measured 2d ago against content hash 5ca1cb3482ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

finfocus-plugin 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 2d 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.

.claude/skills/finfocus-plugin/finfocus-plugin/SKILL.md · 143 lines

How it starts

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

FinFocus Plugin Development

Plugin Architecture

Plugins communicate with finfocus-core via gRPC using protocol buffers from finfocus-spec. Each plugin is a standalone binary that implements the CostSourceService.

Core CLI -> gRPC -> Plugin Binary
                    (CostSourceService)

Two launcher types:

  • ProcessLauncher (TCP) - Plugin listens on a port
  • StdioLauncher (stdin/stdout) - Plugin communicates over stdio

Quick Start: New Plugin

  1. Create Go module with finfocus-spec dependency
  2. Embed pluginsdk.BasePlugin for common functionality
  3. Implement required gRPC methods
  4. Build binary and install to ~/.finfocus/plugins/<name>/<version>/
import (
    "github.com/rshade/finfocus-spec/sdk/go/pluginsdk"
    pbc "github.com/rshade/finfocus-spec/sdk/go/proto/finfocus/v1"
)

type MyPlugin struct {
    *pluginsdk.BasePlugin
    logger zerolog.Logger
    mu     sync.Mutex
}

func (p *MyPlugin) Name() string { return "my-plugin" }

Required Methods

Every plugin must implement these CostSourceService methods:

Method Purpose
GetProjectedCost Estimate future costs from resource descriptors
GetActualCost Return historical costs for a time range
GetRecommendations Return cost optimization recommendations
GetPluginInfo Return plugin metadata (name, version, providers)
Shutdown Clean up resources on termination

Request Validation

Use pluginsdk validation helpers before processing:

func (p *MyPlugin) GetProjectedCost(ctx context.Context, req *pbc.GetProjectedCostRequest) (*pbc.GetProjectedCostResponse, error) {
    p.mu.Lock()
    defer p.mu.Unlock()

    if err := pluginsdk.ValidateProjectedCostRequest(req); err != nil {
        return nil, status.Errorf(codes.InvalidArgument, "validation: %v", err)
    }
    // Process request...
}

Plugin Installation

Plugins install to ~/.finfocus/plugins/<name>/<version>/:

# Build and install
make build-recorder
make install-recorder  # -> ~/.finfocus/plugins/recorder/0.1.0/

# Verify
./bin/finfocus plugin list
./bin/finfocus plugin validate

Read the full file on GitHub · 143 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 143 lines · 98 tokens per session scan A 5ca1cb3482ea

Subscribe to this mod's changes

finfocus-plugin is a skill published in the GitHub repository rshade/finfocus (5 stars, last pushed 16d ago), licensed Apache-2.0. It adds 98 tokens to every session and 1,049 once invoked, about $0.0005 per session on Opus 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-31.

Related

Other skills, from other repositories

aws-cost-ops

AWS Cost Explorer — spending analysis, service breakdowns, forecasts, cost anomalies. Use when analyzing AWS spending, investigating cost spikes, reviewing network cost drivers like NAT Gateway, or forecasting next month's bill.

automateyournetwork/netclaw · 45 tokens

cost-change-investigation

Use when investigating a cost change to explain what changed, when, and the best-supported drivers with contribution, timing, usage, metric, event, alert, and terminology evidence. Call getskill with skillId "cost-change-investigation" before starting the investigation.

costory-io/costory-finops-mcp-skills · 57 tokens

virtual-dimensions

Use when creating, editing, previewing, or publishing Costory virtual dimensions (custom cost axes) with ordered CEL rules, leftover buckets, overlap/shadowing checks, or telemetry split-by-usage allocations. Call getskill with skillId "virtual-dimensions" before createvirtualdimensiondraft or…

costory-io/costory-finops-mcp-skills · 72 tokens

recipes

Use when a user states a FinOps outcome rather than a tool. Route to one recipe card, then hand off: bill jump / what changed → explain-period-change (previewreportwidget DIGEST, not query+compare); marketplace / private-offer → marketplace-spend; K8s namespace showback → namespace-cost; credits runway →…

costory-io/costory-finops-mcp-skills · 216 tokens

cost-optimization

Cloud Cost Optimization & FinOps: Helps analyze and reduce cloud infrastructure costs, optimize resource usage, implement FinOps practices, and find savings opportunities. Use whenever the user mentions 'cloud costs', 'AWS bill', 'cost optimization', 'FinOps', 'right-sizing', 'reserved instances', 'savings plans'…

camilooscargbaptista/cto-toolkit · 117 tokens

ccxt-go

CCXT cryptocurrency exchange library for Go developers. Covers both REST API (standard) and WebSocket API (real-time). Helps install CCXT, connect to exchanges, fetch market data, place orders, stream live tickers/orderbooks, handle authentication, and manage errors in Go projects. Use when working with crypto…

ccxt/ccxt · 78 tokens