一键导入
frontend-javascript-quality
Implement reliable and maintainable JavaScript/clientside callback changes
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implement reliable and maintainable JavaScript/clientside callback changes
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Retrieve up-to-date library documentation with Context7 MCP and ground code changes. Use when tasks involve external APIs, version-sensitive behavior, migrations, deprecations, setup/configuration decisions, or framework/library best-practice questions.
Behavior-preserving refactoring guidance for burndown-chart with layered architecture and safety gates
Install and configure optional development tools for repository contributors. Use when asked to install ripgrep, rg, jq, yq, GitHub Copilot CLI, copilot, or any command-line dev tool. Also use when a tool is reported as "not found", when the user wants to set up their development workstation, or when searching / log-inspection tools are needed. Provides platform-specific install commands for Windows (winget, no admin required), macOS (Homebrew), and Linux (apt/rpm).
Optimally use rg (ripgrep), fd, jq, and yq for code exploration, file discovery, and structured data querying in any repository. Use when asked to search code, find files, grep for patterns, explore a codebase structure, parse JSON or YAML configs, inspect package.json or pyproject.toml, extract API response data, find all usages of a function or variable, or filter results across file types. Works with any language, framework, or project structure.
Create new Agent Skills for GitHub Copilot from prompts or by duplicating this template. Use when asked to "create a skill", "make a new skill", "scaffold a skill", or when building specialized AI capabilities with bundled resources. Generates SKILL.md files with proper frontmatter, directory structure, and optional scripts/references/assets folders.
Improve quality and reliability of Python backend changes in burndown-chart
| name | frontend-javascript-quality |
| description | Implement reliable and maintainable JavaScript/clientside callback changes |
Use this skill when working in assets/ with JavaScript files, clientside callbacks, or CSS.
get_errors and check for linting issuesassets/namespace_autocomplete_clientside.js - Complex autocomplete behaviorassets/viewport_detection.js - Responsive layout detectionassets/jql_editor_*.js - JQL editor clientside logicassets/update_*.js - Update UI handlingassets/modal_keyboard_fix.js - A11y improvementsassets/custom.css - Global stylesassets/components/*.css - Component-specific stylesassets/layout/*.css - Layout patternscallbacks/*.py - Server callbacks that work with clientside callbacksNamespace registration:
// ✓ GOOD: Namespaced with clear purpose
window.dash_clientside = window.dash_clientside || {};
window.dash_clientside.namespace_autocomplete = {
buildAutocompleteData: function(metadata) { ... }
};
// ❌ BAD: Global pollution
function myFunction() { ... }
Event handlers:
// ✓ GOOD: Clean up before adding
element.removeEventListener('click', handler);
element.addEventListener('click', handler);
// ❌ BAD: Memory leak (duplicate handlers)
element.addEventListener('click', handler);
React controlled inputs:
// ✓ GOOD: Use native setters + dispatch events
const nativeInputValueSetter = Object.getOwnPropertyDescriptor(
window.HTMLInputElement.prototype,
'value'
).set;
nativeInputValueSetter.call(input, newValue);
input.dispatchEvent(new Event('input', { bubbles: true }));
// ❌ BAD: Direct assignment (React won't detect)
input.value = newValue;
Performance:
// ✓ GOOD: Debounce expensive operations
function debounce(func, wait) {
let timeout;
return function (...args) {
clearTimeout(timeout);
timeout = setTimeout(() => func.apply(this, args), wait);
};
}
// Use for resize, scroll, input
window.addEventListener('resize', debounce(handler, 150));
BEM naming:
/* ✓ GOOD: Scoped, semantic */
.namespace-autocomplete-dropdown {
}
.namespace-autocomplete__item--active {
}
/* ❌ BAD: Generic, conflicts */
.dropdown {
}
.active {
}
CSS custom properties:
/* ✓ GOOD: DRY, themeable */
:root {
--primary-color: #007bff;
--spacing-unit: 8px;
}
.button {
background: var(--primary-color);
}
/* ❌ BAD: Hardcoded values everywhere */
.button {
background: #007bff;
}
| Metric | Target | Measurement |
|---|---|---|
| Event handler | <16ms | Browser profiler |
| DOM query cache | Always | Cache selectors |
| Debounce input | 150ms | User input handlers |
get_errors for changed filesWhen changing clientside callbacks in assets/, also review:
callbacks/ui/assets/ or assets/components/docs/architecture/javascript_guidelines.md - JavaScript coding standardsdocs/architecture/css_guidelines.md - CSS coding standardsdocs/design_system.md - Design system and UI patterns