From harness-claude
Provides a simplified interface to complex subsystems by composing multiple subsystem calls into a single high-level API. Useful for reducing import complexity and hiding orchestration logic.
How this skill is triggered — by the user, by Claude, or both
Slash command
/harness-claude:js-facade-patternThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> Provide a simplified interface to a complex subsystem
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
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeSimplifies complex subsystems using the Facade pattern. Provides a clean, unified interface over multiple subsystems to reduce client coupling.
Provides a unified, simplified interface to a complex subsystem, reducing client coupling and hiding internal complexity. Useful for wrapping intricate APIs or libraries.
Generates Facade pattern classes and unit tests for PHP 8.4 to simplify interfaces for complex subsystems like order processing, notifications, or legacy APIs.