From harness-claude
Guides JavaScript Facade pattern to simplify complex subsystems with unified high-level APIs. Use for grouping frequent related calls and hiding implementation details.
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeThis skill uses the workspace's default tool permissions.
> Provide a simplified interface to a complex subsystem
Implements GOF Facade pattern in TypeScript to provide simplified interfaces over complex subsystems like video encoders/uploaders or backend services with Prisma/Redis/Stripe. Use to reduce client coupling.
Generates Facade pattern classes and unit tests for PHP 8.4 to simplify interfaces for complex subsystems like order processing, notifications, or legacy APIs.
Guides modern JavaScript (ES6+) patterns for refactoring legacy code, functional programming, async operations, performance optimization, and maintainable code.
Share bugs, ideas, or general feedback.
Provide a simplified interface to a complex subsystem
// Facade for a complex video conversion subsystem
class VideoConverter {
convert(filename, format) {
const file = new VideoFile(filename);
const codec = CodecFactory.extract(file);
const compressor = new BitrateCompressor();
const mixer = new AudioMixer();
const result = codec.transcode(file, format);
compressor.compress(result);
mixer.normalize(result);
return result;
}
}
// Client uses one call instead of four subsystem interactions
const converter = new VideoConverter();
converter.convert('video.ogg', 'mp4');
The Facade pattern is a structural pattern that provides a unified interface to a set of interfaces in a subsystem. In JavaScript, this is often a module that re-exports a curated subset of a library's API or orchestrates multiple service calls behind a single function.
Trade-offs:
When NOT to use:
https://patterns.dev/javascript/facade-pattern