seams

seams is a skill for Claude Code from mikestangdevs/craft-skills. It costs 137 tokens per session (1,523 once invoked), scanned A, original, MIT.

A guide for splitting business decisions from actions that use a database, network, clock, or other outside system. This separation creates a seam, meaning a place where behavior can be changed or tested independently.

In plain words
What is it for?
Use it when a function fetches data, applies rules, and writes results all together, or when unit tests require real external dependencies.
Why use it?
It makes logic testable without live services or large collections of mocks. It also reduces the risk that a small policy change affects unrelated input/output behavior.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the craft-skills plugin — 17 skills shipped together

Good fit Use it when a function fetches data, applies rules, and writes results all together, or when unit tests require real external dependencies.

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

Made for: Claude Code.

Or install craft-skills, the plugin that ships this one along with the rest of its 17 skills.

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 seams

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/mikestangdevs/craft-skills/seams"><img src="https://agentmods.dev/badge/skills/mikestangdevs/craft-skills/seams.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 137 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,523 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.00137 $0.01523
Opus 5 $0.00068 $0.00762
Sonnet 5 $0.00027 $0.00305
Haiku 4.5 $0.00014 $0.00152

Measured 9d ago against content hash 19373167e69b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

seams 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 9d 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.

skills/craft/seams/SKILL.md · 115 lines

How it starts

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

Seams

The failure mode this fixes

"I can't test this" almost always means "this code has no seams." A seam is a place where you can change behavior without editing the code around it — the joint between deciding what to do and actually doing it. When decision and action are fused (the function fetches, computes, branches on policy, and writes, all in one breath), every test needs a database, every change risks five behaviors, and the logic you actually care about is impossible to isolate.

Agents fuse decision and action constantly, because it's the shortest path to working code. This skill finds the seam and splits along it: pure decisions you can test with plain inputs, thin actions that just carry out the decision.

When to Use This Skill

  • You want to write a unit test but the code demands a live dependency
  • A function mixes I/O (network, disk, db) with branching business logic
  • A small change ripples into unrelated behaviors
  • You're about to extract a function and want it to be testable from birth
  • Policy ("when do we refund?") is buried inside mechanics ("how do we call Stripe?")

Don't use when: the code is already a thin pure function or a thin I/O shim. Don't add indirection where there's nothing to separate — that's just ceremony.

Instructions

1. Classify every line as DECISION or ACTION

Read the target and tag each chunk:

  • DECISION — computes a result from inputs; no side effects. (validation, branching, calculation, choosing what should happen)
  • ACTION — touches the outside world. (read/write db, network calls, file I/O, logging, time, randomness)

The seam is the boundary between them.

2. Pull the decision out as a pure function

Extract the DECISION into a function that:

  • Takes everything it needs as explicit arguments (no reaching into globals, db, or clock)
  • Returns a description of what should happen, not the act of doing it (e.g. return { action: "refund", cents: 1200 }, don't call Stripe)
  • Has zero side effects → testable with plain values, no mocks

Read the full file on GitHub · 115 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. 9d ago First seen · 115 lines · 137 tokens per session scan A 19373167e69b

Subscribe to this mod's changes

seams is a skill published in the GitHub repository mikestangdevs/craft-skills (4 stars, last pushed 3mo ago), licensed MIT. It adds 137 tokens to every session and 1,523 once invoked, about $0.0007 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

craft-testing

Craftsman standard for automated testing: strategy, unit/integration/e2e selection, refactor-proof design, flaky tests, mocking boundaries, deterministic data, and merge-gate policy. Use WHENEVER work touches tests: writing/reviewing tests, strategy, "add tests", "why is this flaky", "what should I test", "tests pass…

gul-labs/craftsman-marketplace · 162 tokens

brooks-test

Test quality review drawing on twelve classic engineering books — with primary focus on xUnit Test Patterns, The Art of Unit Testing, How Google Tests Software, and Working Effectively with Legacy Code — that diagnoses structural problems in an existing test suite: brittleness, mock abuse, coverage illusions, slow…

hyhmrright/brooks-lint · 161 tokens

testing-r-packages

Best practices for writing R package tests using testthat version 3+. Use when writing, organizing, or improving tests for R packages. Covers test structure, expectations, fixtures, snapshots, mocking, and modern testthat 3 patterns including self-sufficient tests, proper cleanup with withr, and snapshot testing.

posit-dev/skills · 67 tokens

r-package-development

R package development with devtools, testthat, and roxygen2. Use when the user is working on an R package, running tests, writing documentation, or building package infrastructure.

posit-dev/skills · 41 tokens

test-implement

Implements React/TypeScript unit, integration, and browser E2E tests with the repository's configured runner, mocks, setup, and browser harness. Use when creating or completing frontend tests and generated test skeletons.

shinpr/claude-code-workflows · 48 tokens

craft-pest

Testing Craft CMS 5 plugins and modules with Pest — test isolation, database safety, and the markhuot/craft-pest-core harness. ALWAYS load when writing, running, fixing, or reviewing tests for a Craft plugin or module, and whenever a suite touches a real Craft install. Covers why rollback is opt-in, tests/Pest.php +…

michtio/craftcms-claude-skills · 353 tokens