Skip to content

dangaogit/bun-server-skills

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Bun Server Skills

Agent skills for the Bun Server framework - a high-performance, decorator-driven DI web framework running on Bun Runtime.

Skill Entry Point

Skill Description
best-practices Start here - Workflow guide with all references for Bun Server development

The best-practices skill is the single entry point. It organizes all framework knowledge as a step-by-step workflow and references detailed guides in the references/ directory.

Reference Documents

All detailed guides are located in best-practices/references/:

Core Framework

Reference Description
quickstart Quick start guide for project setup and basic configuration
dependency-injection DI container, @Injectable, @Inject, scopes, Symbol+Interface pattern
controller-routing Controllers, routing, HTTP methods, parameter binding
module-system Module organization, imports/exports, forRoot pattern
middleware Middleware pipeline, interceptors, built-in middleware
validation Data validation, DTOs, validation decorators
error-handling HttpException, exception filters, error responses

Official Modules

Reference Description
security Authentication, authorization, JWT, OAuth2, guards, roles
database Database connections, ORM, entities, repositories, transactions
cache Caching with @Cacheable, cache eviction, Redis cache
queue Job queues, background tasks, @Cron scheduled tasks
session Session management, session stores, user state
events Event-driven architecture, EventModule, @OnEvent decorator
websocket WebSocket gateways, real-time communication
swagger API documentation, OpenAPI, Swagger UI
health-metrics Health checks, Prometheus metrics, monitoring
logger Logging, log levels, structured logging

Microservices

Reference Description
microservice Service discovery, config center, load balancing, circuit breaker, tracing

Troubleshooting

Reference Description
troubleshooting Common issues, debugging techniques, error resolution

Usage

These skills are designed to work with AI coding assistants (like Cursor) to provide context-aware help when developing with Bun Server.

When Skills Are Triggered

The best-practices skill is triggered for any Bun Server related task. It then guides the AI to load the appropriate reference documents based on the specific task:

  • Project setup: quickstart reference
  • DI / services: dependency-injection reference
  • Routing / controllers: controller-routing reference
  • Module organization: module-system reference
  • Middleware / interceptors: middleware reference
  • Validation / DTOs: validation reference
  • Error handling: error-handling reference
  • Authentication / JWT / OAuth2: security reference
  • Database / ORM: database reference
  • Caching / Redis: cache reference
  • Job queues / Cron: queue reference
  • Sessions: session reference
  • Events / pub-sub: events reference
  • WebSocket / real-time: websocket reference
  • API docs / Swagger: swagger reference
  • Health checks / metrics: health-metrics reference
  • Logging: logger reference
  • Microservices: microservice reference
  • Debugging / errors: troubleshooting reference

Directory Structure

bun-server-skills/
├── README.md
├── LICENSE
└── best-practices/
    ├── SKILL.md                       # Main workflow document
    └── references/
        ├── quickstart.md
        ├── dependency-injection.md
        ├── controller-routing.md
        ├── module-system.md
        ├── middleware.md
        ├── validation.md
        ├── error-handling.md
        ├── security.md
        ├── database.md
        ├── cache.md
        ├── queue.md
        ├── session.md
        ├── events.md
        ├── websocket.md
        ├── swagger.md
        ├── health-metrics.md
        ├── logger.md
        ├── microservice.md
        └── troubleshooting.md

Coverage

This skills collection covers the complete Bun Server framework including:

  • Core: Application, Context, DI Container, Router, Controllers
  • Modules: Config, Logger, Security, Database, Cache, Queue, Session, Events, Health, Metrics, Swagger
  • Microservices: Config Center, Service Registry, Service Client, Load Balancing, Circuit Breaker, Tracing
  • Features: Validation, WebSocket, Interceptors, Guards, Exception Filters

Related Documentation

Contributing

To add a new reference:

  1. Create a new .md file in best-practices/references/
  2. Add the reference link in best-practices/SKILL.md under the appropriate workflow step
  3. Update this README with the new reference

About

bun-server best practices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published