Install
$ agentstack add skill-ngxtm-devkit-fiber-framework ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ● Network access Used
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Fiber Framework Standards
Application Setup
package main
import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/logger"
"github.com/gofiber/fiber/v2/middleware/recover"
)
func main() {
app := fiber.New(fiber.Config{
ErrorHandler: customErrorHandler,
ReadTimeout: 10 * time.Second,
WriteTimeout: 10 * time.Second,
})
// Middleware
app.Use(logger.New())
app.Use(recover.New())
// Routes
app.Get("/", homeHandler)
app.Get("/users/:id", getUser)
app.Post("/users", createUser)
// Route groups
api := app.Group("/api/v1")
api.Get("/items", listItems)
app.Listen(":3000")
}
Handlers
// Path parameters
func getUser(c *fiber.Ctx) error {
id := c.Params("id")
user, err := findUser(id)
if err != nil {
return c.Status(404).JSON(fiber.Map{"error": "Not found"})
}
return c.JSON(user)
}
// Query parameters
func listUsers(c *fiber.Ctx) error {
page := c.QueryInt("page", 1)
limit := c.QueryInt("limit", 10)
users := fetchUsers(page, limit)
return c.JSON(users)
}
// JSON body
type CreateUserRequest struct {
Name string `json:"name"`
Email string `json:"email"`
}
func createUser(c *fiber.Ctx) error {
var req CreateUserRequest
if err := c.BodyParser(&req); err != nil {
return c.Status(400).JSON(fiber.Map{"error": "Invalid request"})
}
user := insertUser(req)
return c.Status(201).JSON(user)
}
Middleware
// Built-in middleware
app.Use(logger.New())
app.Use(recover.New())
app.Use(cors.New())
app.Use(compress.New())
app.Use(limiter.New(limiter.Config{
Max: 100,
Expiration: 1 * time.Minute,
}))
// Custom middleware
func authMiddleware(c *fiber.Ctx) error {
token := c.Get("Authorization")
if token == "" {
return c.Status(401).JSON(fiber.Map{"error": "Unauthorized"})
}
user, err := validateToken(token)
if err != nil {
return c.Status(401).JSON(fiber.Map{"error": "Invalid token"})
}
c.Locals("user", user)
return c.Next()
}
// Apply middleware
api := app.Group("/api", authMiddleware)
Error Handling
// Custom error handler
func customErrorHandler(c *fiber.Ctx, err error) error {
code := fiber.StatusInternalServerError
message := "Internal Server Error"
if e, ok := err.(*fiber.Error); ok {
code = e.Code
message = e.Message
}
return c.Status(code).JSON(fiber.Map{
"error": message,
})
}
// In handlers, return fiber.Error
func handler(c *fiber.Ctx) error {
if notFound {
return fiber.NewError(404, "Resource not found")
}
return c.JSON(data)
}
Validation
import "github.com/go-playground/validator/v10"
var validate = validator.New()
type CreateItemRequest struct {
Name string `json:"name" validate:"required,min=1,max=100"`
Price int `json:"price" validate:"required,min=0"`
}
func createItem(c *fiber.Ctx) error {
var req CreateItemRequest
if err := c.BodyParser(&req); err != nil {
return c.Status(400).JSON(fiber.Map{"error": "Invalid JSON"})
}
if err := validate.Struct(&req); err != nil {
return c.Status(400).JSON(fiber.Map{"error": err.Error()})
}
item := insertItem(req)
return c.Status(201).JSON(item)
}
WebSocket Support
import "github.com/gofiber/websocket/v2"
app.Get("/ws", websocket.New(func(c *websocket.Conn) {
for {
mt, msg, err := c.ReadMessage()
if err != nil {
break
}
if err := c.WriteMessage(mt, msg); err != nil {
break
}
}
}))
Best Practices
- fasthttp awareness: Fiber uses fasthttp, not net/http - some incompatibilities
- Context reuse: Don't store
*fiber.Ctx- it's reused across requests - Prefork: Use
app.Listen(":3000", fiber.Config{Prefork: true})for multi-core - Graceful shutdown: Use
app.ShutdownWithTimeout(30 * time.Second) - Memory: fasthttp is optimized for low memory, high concurrency
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: ngxtm
- Source: ngxtm/devkit
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.