Skip to content
Back to skills

Libweb

ASecurity

libweb - Web extension utilities. authMiddleware validates JWT tokens. corsMiddleware handles cross-origin requests. validationMiddleware validates request bodies against JSON schema. createAuthMiddleware, createCorsMiddleware, createValidation are factories for customization. Use for securing HTTP APIs, request validation, and CORS handling with Hono framework.

  • 666 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 2, 2026
ai-agentsjavascriptjavaapi

Works with

  • api

Security analysis

A100/100

Scanned September 2, 2026

npx -y skills add majiayu000/claude-skill-registry --skill libweb --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Libweb?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Libweb
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-libweb/badge)](https://www.skillsdirectory.com/skills/majiayu000-libweb)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: libweb
description: >
  libweb - Web extension utilities. authMiddleware validates JWT tokens.
  corsMiddleware handles cross-origin requests. validationMiddleware validates
  request bodies against JSON schema. createAuthMiddleware,
  createCorsMiddleware, createValidation are factories for customization. Use
  for securing HTTP APIs, request validation, and CORS handling with Hono
  framework.
---

# libweb Skill

## When to Use

- Adding authentication to HTTP endpoints
- Configuring CORS for API access
- Validating request payloads
- Building secure REST APIs with Hono

## Key Concepts

**authMiddleware**: Validates JWT tokens from Authorization header.

**corsMiddleware**: Handles preflight requests and CORS headers.

**validationMiddleware**: Validates request body against JSON schema.

## Usage Patterns

### Pattern 1: Secure endpoint

```javascript
import { authMiddleware, corsMiddleware } from "@copilot-ld/libweb";

app.use(corsMiddleware({ origins: ["http://localhost:3000"] }));
app.use("/api/*", authMiddleware(authConfig));
```

### Pattern 2: Validate requests

```javascript
import { validationMiddleware } from "@copilot-ld/libweb";

const schema = {
  type: "object",
  required: ["message"],
  properties: { message: { type: "string", maxLength: 1000 } },
};

app.post("/api/chat", validationMiddleware(schema), handler);
```

## Integration

Used by Web and API extensions. Works with Hono framework middleware pattern.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.