Guard The Spend Paths logo

Guard The Spend Paths

Community
randommonicle
guard-the-spend-paths

When creating or reviewing any endpoint or control that touches money or shared state, two rules apply together. Every endpoint that spends money (LLM, email, SMS, payment) or writes shared state (bookings, slots) gets a per-IP volume cap the day it is created — anyone can POST directly, bypassing the UI. And any guardrail on that path written to fail open (origin allowlist defaulting to permit, auth that skips on a missing header) is inert until explicitly closed, and its failure is silent — name the real primary defence. Does not fire on internal-only endpoints behind service-role auth with no paid upstream; internal fan-out caps belong to lock-at-the-chokepoint.

Overview

Publisherrandommonicle
Repositoryclaude-skills
Skill nameguard-the-spend-paths
Stars
27
Forks
3
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by randommonicle on GitHub. Read the source before you install it.

Installation

Install the Guard The Spend Paths AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/randommonicle/claude-skills/tree/main/guard-the-spend-paths
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/randommonicle/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/guard-the-spend-paths .claude/skills/guard-the-spend-paths
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Guard The Spend Paths in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Guard The Spend Paths on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Guard The Spend Paths is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Guard the spend paths

From a public-facing AI site: the obvious LLM endpoint was capped, but the booking endpoints were not — an open invitation to slot-griefing by direct POST. And the controls that looked like defences were not: the origin allowlist failed open until its env var was set, and the storage token's auth failed open too, so a misconfiguration was invisible in the UI and discoverable only in function logs.

Rule 1 — cap every spend path at creation

Any endpoint that spends money (a paid model call, email, SMS, payment) or writes shared state (bookings, calendar slots, counters) gets a per-IP volume cap the day it is created, not when abuse appears. The UI is not a gate: anyone can POST directly in a loop. Rate-limiting is volume protection layered under auth and validation — it substitutes for neither.

Rule 2 — a fail-open guardrail is not a control until closed

For every control with a permissive default — an origin allowlist that permits when unset, an auth check that skips on a missing header, anything that warns and continues:

  • Name the real primary defence. Until the fail-open control is closed, something else is doing the protecting (or nothing is). Say which, in the code or the config comment.
  • Close it before launch, explicitly, and verify from the live surface that it now rejects (env-change-verification applies — setting the variable is not the control being live).
  • Route its failures to logs or alerts. An inert guardrail looks healthy from the UI; only its own telemetry reveals it stopped guarding.

What this skill does not do

It does not cap internal fan-out (lock-at-the-chokepoint) and does not design auth. It ensures the money and shared-state surfaces have a working volume gate and that no inert control is being counted as a defence.

Why

An uncapped spend path is an open tap on the bill, and a fail-open guardrail is worse than none because it is counted as protection. Both failure modes are silent until the invoice or the incident. Evidence: ICC LESSONS_LEARNED L-001, L-006, L-007 (L-007 shared evidence with honest-failure-surfacing).

Additions from the misses-log sweep (2026-10-22)

  • Review the whole money path. A money-path review or brief covers every statement from the settle call to the last byte of the response: what each can throw, and what the caller is then told. A defect class spans the path, not the component the brief named. (AI domain L-105.)

Frequently asked questions

What does the Guard The Spend Paths AI skill do?

When creating or reviewing any endpoint or control that touches money or shared state, two rules apply together. Every endpoint that spends money (LLM, email, SMS, payment) or writes shared state (bookings, slots) gets a per-IP volume cap the day it is created — anyone can POST directly, bypassing the UI. And any guardrail on that path written to fail open (origin allowlist defaulting to permit, auth that skips on a missing header) is inert until explicitly closed, and its failure is silent — name the real primary defence. Does not fire on internal-only endpoints behind service-role auth wi...

Why use Guard The Spend Paths on TypingMind?

Because you install it once and use it with any model. Guard The Spend Paths is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Guard The Spend Paths in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/randommonicle/claude-skills/tree/main/guard-the-spend-paths. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Guard The Spend Paths?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Guard The Spend Paths?

As many as you like. As long as a model supports skills, you can use Guard The Spend Paths with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Guard The Spend Paths AI skill free?

Yes. It is published on GitHub by randommonicle under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇