/harness-claude:js-decorator-patternfrom harness-claude
Applies the JavaScript Decorator pattern to extend object behavior dynamically via higher-order functions and TC39 class decorators, covering composition, stacking, and edge cases.
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:js-decorator-pattern 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.
Extend object behavior dynamically without modifying its source
@decorator.const enhanced = decorate(original).// Functional decorator — adds logging
function withLogging(fn) {
return function (...args) {
console.log(`Calling ${fn.name} with`, args);
const result = fn.apply(this, args);
console.log(`${fn.name} returned`, result);
return result;
};
}
function add(a, b) {
return a + b;
}
const loggedAdd = withLogging(add);
loggedAdd(2, 3); // logs call and return
const fn = withAuth(withLogging(handler)).name and length with Object.defineProperty if needed.The Decorator pattern adds behavior to individual objects without affecting other objects of the same class. In JavaScript, this is most naturally expressed as higher-order functions — functions that take a function and return a new function with added behavior.
Trade-offs:
.name and .length unless explicitly preservedwithAuth(withLogging(fn)) logs before auth checksWhen NOT to use:
https://patterns.dev/javascript/decorator-pattern
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