Thank you for contributing! This project aims to be the definitive resource for LLM code generation with JavaScript libraries.
- New library documentation - Popular, mobile-friendly JS libraries
- Updates to existing docs - New versions, API changes, better examples
- Improvements - Better formatting, clearer explanations, more examples
- Bug fixes - Broken links, incorrect info, typos
-
Check if it's suitable:
- ✅ Popular (10K+ npm weekly downloads OR 1K+ GitHub stars)
- ✅ Mobile-friendly (works well on touch devices)
- ✅ Available via CDN (jsDelivr, unpkg, etc.)
- ✅ Actively maintained (updated in last 6 months)
- ✅ Stable (not alpha/beta unless clearly marked)
-
Fork and clone:
git clone https://github.com/YUZU-Hub/awesome-js-libs-for-llms.git cd awesome-js-libs-for-llms npm install -
Add to index.json:
{ "id": "your-library", "name": "Your Library", "version": "1.2.3", "description": "One-line description (max 100 chars)", "category": "appropriate-category", "tags": ["tag1", "tag2"], "cdn": { "js": "https://cdn.jsdelivr.net/npm/...", "css": "https://cdn.jsdelivr.net/npm/..." // if applicable }, "docs": { "local": "libraries/your-library.md", "official": "https://...", "npm": "package-name" }, "mobile": { "friendly": true, "touch": true, "responsive": true }, "dependencies": [] } -
Create documentation:
cp templates/library-doc.md docs/libraries/your-library.md # Edit the file following the template -
Validate:
npm run validate npm run check-links
-
Submit PR:
- Create a descriptive PR title:
feat: add [Library Name] - Include why this library is useful
- Mention any special considerations
- Create a descriptive PR title:
Every library doc MUST have these sections in this order:
- Header - Name, version, category, size, dependencies
- 🎯 What It Does - Purpose, best uses, not suitable for
- 📦 Installation - CDN links (both CSS and JS if needed)
- ⚡ Quick Start - Minimal working example (5-10 lines)
- 🔧 Common Patterns - 3-5 real-world examples
- 📱 Mobile Considerations - Touch, responsive, iOS/Android gotchas
- 🐛 Common Gotchas - Mistakes and solutions
- 💡 Pro Tips - Best practices (optional but encouraged)
- 🔗 Resources - Official docs, GitHub, npm
- 📊 Browser Support - Compatibility table
- 🆚 Alternatives - When to use other libraries
⚠️ Breaking Changes - Major version changes
DO:
- ✅ Write for LLMs (concise, structured, token-efficient)
- ✅ Use working, copy-paste ready code examples
- ✅ Include comments in code explaining what it does
- ✅ Highlight common mistakes with ❌ and solutions with ✅
- ✅ Use emojis for visual scanning (🎯 📱 🐛 etc.)
- ✅ Keep examples realistic (actual use cases, not foo/bar)
- ✅ Test all code examples before submitting
DON'T:
- ❌ Write long prose paragraphs (LLMs prefer structured info)
- ❌ Include every possible API method (focus on 80% use cases)
- ❌ Copy-paste from official docs (summarize and optimize)
- ❌ Use placeholders like "your-api-key" without context
- ❌ Forget mobile considerations
- ❌ Include outdated syntax or deprecated methods
// ✅ GOOD: Real example with context
async function fetchUsers() {
try {
const response = await axios.get('https://api.example.com/users');
return response.data;
} catch (error) {
console.error('Failed to fetch:', error.message);
throw error;
}
}
// ❌ BAD: Too abstract
axios.get(url).then(callback).catch(errorCallback);Target: 500-2000 tokens per library
- Short libraries (simple utilities): 500-800 tokens
- Medium libraries (most cases): 800-1500 tokens
- Complex libraries (3D, charts, frameworks): 1500-2000 tokens
Use this prompt to check token count:
Count tokens in this markdown: [paste your doc]
-
Automated checks run on your PR:
- JSON schema validation
- CDN link verification
- Markdown format check
- Token count check
-
Human review looks for:
- Accuracy of information
- Quality of examples
- Completeness of mobile considerations
- Writing clarity and structure
-
Approval - Once approved, it auto-deploys!
When a library releases a new version:
- Update
versionindocs/index.json - Update CDN links if they changed
- Check if API changed (read changelog)
- Update code examples if syntax changed
- Add to "Breaking Changes" section if major version
- Update "Last Updated" date at bottom
- Open an issue describing the problem
- Submit a PR with the fix
- Reference the issue in your PR
Use one of these existing categories:
http- AJAX, fetch, API clientsanimation- Animations, transitions, effectscharts- Data visualization, graphsui-framework- CSS frameworks, component librariesslider-carousel- Sliders, carousels, galleriesforms- Form validation, input formattingmaps- Mapping librariesmedia- Video, audio playersutilities- Helper functions, data manipulation2d-graphics- 2D rendering, Canvas, sprites3d-graphics- 3D rendering, WebGLgame-engine- Game frameworks, physics enginesphysics- Physics simulation, collision detectionaudio- Sound effects, music playbacktouch-gestures- Touch/gesture recognitionnotifications- Toast, alerts, notificationsdate-time- Date/time handlingdrag-drop- Drag and drop functionalitymodals-alerts- Modals, dialogs, popupslazy-loading- Lazy loading images/contentsyntax-highlighting- Code syntax highlightinglightbox-gallery- Image lightboxesscrolling- Scroll effects, parallaxvalidation- Form/data validationstorage- Client-side storage, offline databackend- Backend-as-a-service clientscommunication- WebRTC, VoIP, real-timepwa- Progressive Web App utilitiesother- Doesn't fit above
- Library is popular and actively maintained
- Added to
docs/index.jsonwith all required fields - Created documentation following template
- All code examples tested and working
- Mobile considerations included
- Common gotchas documented
- CDN links verified working
- Token count is 500-2000
- Ran
npm run validatesuccessfully - Ran
npm run check-linkssuccessfully - No linting errors
- PR title follows format:
feat: add LibraryNameorfix: update LibraryName
# Library Name (H1 - only once at top)
## 🎯 Section Name (H2 - for main sections)
### Subsection (H3 - for subsections)
**Bold** for emphasis
`code` for inline codeUse these standard emojis:
- 🎯 What It Does
- 📦 Installation
- ⚡ Quick Start
- 🔧 Common Patterns
- 📱 Mobile Considerations
- 🐛 Common Gotchas
- 💡 Pro Tips
- 🔗 Resources
- 📊 Browser Support
- 🆚 Alternatives
⚠️ Breaking Changes
For inline:
- ✅ Correct way
- ❌ Wrong way
- 📝 Note
- 🔴 Important
- Libraries with < 1K GitHub stars AND < 5K weekly npm downloads
- Abandoned projects (no updates in 1+ year)
- Libraries that only work on desktop
- Beta/alpha software (unless extremely popular)
- Frameworks (React, Vue, Angular) - too complex for this format
- Build tools (Webpack, Vite) - different use case
- Backend-only libraries - this is for browser JavaScript
- GitHub Discussions: For general questions
- Issues: For specific problems or suggestions
- Twitter: @stefanlh
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for making the web more accessible for AI code generation! 🚀