协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
generic-static-feature-developer【开发与工程】Guide feature development for static HTML/CSS/JS sites. Covers patterns, automation workflows, and content validation. Use when adding features, modifying automation, or planning changes.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Guide feature development for minimalist static sites.
Extends: Generic Feature Developer - Read base skill for development workflow, scope assessment, and build vs integrate decisions.
project/
├── index.html # Main page
├── style.css # All styles
├── script.js # All interactions
├── assets/ # Images, icons
├── .github/workflows/ # Automation (optional)
└── docs/ # Documentation
Edit → Save → Deploy (that's it)
node_modules in production# Start local server (cross-platform options)
python -m http.server 8000 # Windows
python3 -m http.server 8000 # macOS/Linux
npx serve . # Node.js (recommended - all platforms)
# Visit http://localhost:8000
<!-- Works without JS -->
<details>
<summary>Menu</summary>
<nav>
<a href="#about">About</a>
<a href="#contact">Contact</a>
</nav>
</details>
// Enhancement: Custom animation when JS available
if ("IntersectionObserver" in window) {
// Progressive enhancement
}
// One listener for many elements
document.body.addEventListener("click", (e) => {
if (e.target.matches(".menu-toggle")) {
toggleMenu();
}
if (e.target.matches(".close-btn")) {
closeModal();
}
});
// Modern approach
document.addEventListener("DOMContentLoaded", () => {
initApp();
});
// Or: script at end of body (no event needed)
// Toggle visibility
element.classList.toggle("visible");
// Add/remove
element.classList.add("active");
element.classList.remove("active");
# .github/workflows/deploy.yml
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./
# Optimize before committing
# PNG
pngquant --quality=65-80 image.png
# JPEG
jpegoptim --max=80 image.jpg
# WebP conversion
cwebp -q 80 image.png -o image.webp
Before Starting:
During Development:
Before Completion:
| Metric | Target |
|---|---|
| Total weight | < 50KB |
| First Contentful Paint | < 1s |
| Lighthouse Performance | 95+ |