context-witness

Guide Context Tag witness versus capability pattern choices in TypeScript/Effect codebases.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/front-depiction/claude-setup --skill context-witness
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-witness
Source: https://github.com/front-depiction/claude-setup/tree/main/skills/context-witness
Command: npx skills add https://github.com/front-depiction/claude-setup --skill context-witness

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams decide when to apply the Context Tag witness (existence) versus capability patterns (behavior) for dependency injection, enabling safer coupling and clearer architecture in Effect-style code.

Core Features & Use Cases

  • Decision framework for choosing Witness vs Capability in Context Tags within applications.
  • Clear guidance and concrete examples for structuring schemas and runtime context to minimize hard coupling while preserving testability.
  • Use Case: selecting between injecting a serial or request identifier via a witness versus embedding it in the persisted schema.

Quick Start

Start with a small TypeScript project using Effect, decide whether a Context value should be modeled as a Witness or a Capability, and implement a minimal example reflecting that choice.

Frequently Asked Questions about context-witness

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

FAQPage Schema
What is the witness pattern for Context Tags in Effect?

The witness pattern uses Context Tags to assert the existence of a dependency for injection without exposing behavior. It balances hard and soft coupling to preserve testability in Effect-style code.

How do I choose between a witness and a capability pattern for dependency injection?

Choose by evaluating coupling needs: use a witness for existence-based Context Tags, and use a capability pattern for behavior. This framework guides structuring domain schemas versus runtime context accordingly.

Should I inject a serial identifier via a witness or embed it in a persisted schema?

Inject a serial or request identifier via a witness to separate persisted data from runtime context. This minimizes hard coupling while preserving testability and composability in your domain schemas.

Does this Context Tag guidance work with TypeScript and Effect for domain schemas?

Yes, this guidance is designed for TypeScript and Effect-based codebases. It provides concrete examples for structuring schemas and runtime context to minimize hard coupling while preserving testability.

When should I not use the witness pattern for dependency injection?

Avoid the witness pattern when your dependency injection requires explicit behavior modeling rather than mere existence. In these cases, a capability pattern provides safer coupling and clearer architecture for runtime context.