/harness-claude:resilience-chaos-testingfrom harness-claude
Injects controlled failures to validate that fallbacks, retries, and circuit breakers work under real conditions.
Claude never picks this skill on its own
Its frontmatter has no description. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /harness-claude:resilience-chaos-testing still runs it.
What the skill costs in Claude's context, stage by stage
No description Claude Code can read, so Claude's list leaves it out: only you can start it.
SKILL.md joins the conversation and stays.
Validate resilience by injecting controlled failures to verify that fallbacks, retries, and circuit breakers work under real conditions
// chaos/fault-injector.ts
interface FaultConfig {
enabled: boolean;
latencyMs?: number; // Add artificial latency
errorRate?: number; // 0.0 to 1.0 probability of error
errorCode?: number; // HTTP status to return
timeoutRate?: number; // 0.0 to 1.0 probability of timeout
targetServices?: string[]; // Only affect specific services
}
export class FaultInjector {
private config: FaultConfig = { enabled: false };
configure(config: Partial<FaultConfig>) {
this.config = { ...this.config, ...config };
}
async maybeInjectFault(serviceName: string): Promise<void> {
if (!this.config.enabled) return;
if (this.config.targetServices && !this.config.targetServices.includes(serviceName)) return;
// Inject latency
if (this.config.latencyMs) {
await new Promise((r) => setTimeout(r, this.config.latencyMs));
}
// Inject timeout (never resolves until AbortController cancels)
if (this.config.timeoutRate && Math.random() < this.config.timeoutRate) {
await new Promise(() => {}); // Hang forever — caller's timeout should catch this
}
// Inject error
if (this.config.errorRate && Math.random() < this.config.errorRate) {
throw new ChaosError(`Injected fault for ${serviceName}`, this.config.errorCode ?? 500);
}
}
}
export class ChaosError extends Error {
constructor(
message: string,
public readonly statusCode: number
) {
super(message);
this.name = 'ChaosError';
}
}
// Integration with services
const faultInjector = new FaultInjector();
// Enable in test/staging via environment variable
if (process.env.CHAOS_ENABLED === 'true') {
faultInjector.configure({
enabled: true,
targetServices: ['payment-api'],
errorRate: 0.3, // 30% of payment API calls fail
latencyMs: 2000, // Add 2s latency to all calls
});
}
// Wrap service calls
export async function callPaymentAPI(orderId: string): Promise<PaymentResult> {
await faultInjector.maybeInjectFault('payment-api');
return fetch(`https://payment.example.com/charge/${orderId}`).then((r) => r.json());
}
// Chaos test scenario
describe('checkout resilience', () => {
it('completes checkout when payment service has 50% error rate', async () => {
faultInjector.configure({
enabled: true,
targetServices: ['payment-api'],
errorRate: 0.5,
});
// Circuit breaker + retry should handle transient failures
const result = await checkout(testOrder);
expect(result.status).toBe('completed');
faultInjector.configure({ enabled: false });
});
it('uses cached prices when pricing service is down', async () => {
faultInjector.configure({
enabled: true,
targetServices: ['pricing-api'],
errorRate: 1.0, // 100% failure
});
const result = await getProductPrice('sku-123');
expect(result.source).toBe('cache');
expect(result.price).toBeGreaterThan(0);
faultInjector.configure({ enabled: false });
});
});
Chaos engineering principles (Netflix):
Failure types to test:
Tools: toxiproxy (TCP proxy with configurable toxics), chaos-mesh (Kubernetes-native), litmus (Kubernetes chaos), gremlin (SaaS platform), pumba (Docker container chaos).
Production chaos safety:
https://principlesofchaos.org/
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeRead when SKILL.md points to them.
793 skills in this plugin
/a11y-aria-patternsARIA Patterns> Apply ARIA roles, states, and properties correctly to enhance assistive technology support for custom widgets/a11y-color-contrastColor Contrast and Color Independence> Ensure sufficient color contrast ratios and never use color as the sole means of conveying information/a11y-form-patternsAccessible Form Patterns> Build accessible forms with proper labeling, grouped controls, inline validation, and clear error communicationOther plugins' skills for the same job