surface-testing

Test HTTP endpoints, CLIs, and library exports without internal calls.

11|Updated Sep 5, 2025
One-click install
npx skills add https://github.com/thrawn01/claude-dotfiles --skill surface-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: surface-testing
Source: https://github.com/thrawn01/claude-dotfiles/tree/main/skills/surface-testing
Command: npx skills add https://github.com/thrawn01/claude-dotfiles --skill surface-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Tests are written to exercise the system through its surface — HTTP endpoints, CLI entry points, and exported functions — while avoiding internal function calls. This approach preserves behavior across refactors and ensures users experience the system as intended.

Core Features & Use Cases

  • Enforce testing through the surface that users actually interact with.
  • Support multiple surface types (HTTP, CLI, libraries) and emphasize observability for asynchronous behavior.
  • Provide confidence by validating observable outcomes rather than internals, and by surfacing important metrics when async work is in flight.

Quick Start

Run surface tests against the application to verify public API behavior and end-user outcomes.

Frequently Asked Questions about surface-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is surface testing and how does it differ from testing internal functions?

Surface testing validates system behavior by exercising end-user interfaces like HTTP endpoints, CLIs, and exported functions rather than internal components. This approach preserves test validity across refactors and ensures the system works as users actually experience it.

How do I test HTTP endpoints and CLI entry points without calling internal functions?

To test HTTP endpoints and CLIs without internal calls, you run tests strictly against the public surface. You validate observable outcomes from protocols and entry points, enforcing no direct calls to internal functions during the test run.

Can I use surface testing for asynchronous behavior that isn't immediately visible?

Yes, surface testing supports asynchronous behavior by emphasizing observability. When async work is in flight, the approach promotes surfacing important metrics to validate observable outcomes rather than relying on internal state checks.

Does surface testing work for validating library exports across different protocols?

Surface testing works across multiple surface types including HTTP, CLIs, and library exports. It ensures observable results across protocols by validating the behavior of exported functions as end-users interact with them.

When should I avoid testing internal components and switch to surface-level testing?

You should switch to surface-level testing when you need confidence that refactors preserve behavior and end-user outcomes. Avoid internal testing when validating observable results across HTTP, CLI, or library surfaces is more critical than checking internal logic.