Lib Directory

Provide reusable Node.js and TypeScript utilities for database, authentication, and validation.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/nguyenquy0710/dakia-academy --skill lib-directory
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Lib Directory
Source: https://github.com/nguyenquy0710/dakia-academy/tree/main/lib
Command: npx skills add https://github.com/nguyenquy0710/dakia-academy --skill lib-directory

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bcrypt, jsonwebtoken, mongoose, nodemailer, unified, remark-parse, remark-rehype, rehype-stringify, rehype-highlight, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides essential, reusable utility functions and modules that power the core operations of the DAKIA Academy application, ensuring consistency and efficiency.

Core Features & Use Cases

  • Database Management: Handles secure connections and disconnections to MongoDB.
  • Authentication Utilities: Implements secure password hashing and JWT token generation/verification.
  • Content Processing: Converts Markdown to HTML and extracts frontmatter.
  • Validation & Sanitization: Ensures input data is safe and correctly formatted.
  • Use Case: When a user registers, the lib utilities hash their password before storing it, and when they log in, they verify the provided password against the stored hash.

Quick Start

Use the lib skill to validate the email address '[email protected]'.

Frequently Asked Questions about Lib Directory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I securely hash passwords and handle JWT authentication in a TypeScript backend?

Secure password hashing and JWT authentication in a TypeScript backend require utilities that wrap bcrypt for hashing and jsonwebtoken for token generation and verification. This Skill provides these reusable functions to manage user registration and login securely.

What's the best way to connect and disconnect a MongoDB database in Node.js?

Connecting and disconnecting a MongoDB database in Node.js is handled through mongoose connection management utilities. This Skill provides dedicated functions to securely establish and close MongoDB connections, ensuring consistent database lifecycle handling.

Can I convert markdown to HTML and extract frontmatter in a Node.js application?

Converting markdown to HTML and extracting frontmatter in Node.js is fully supported using the unified, remark-parse, and rehype-stringify libraries. This Skill processes markdown content into sanitized HTML with syntax highlighting.

How do I validate and sanitize input data for backend APIs?

Validating and sanitizing input data for backend APIs ensures submitted information is safe and correctly formatted before processing. This Skill includes built-in validation and sanitization utilities to check inputs like email addresses efficiently.

Do I need environment variables configured to use these TypeScript backend utilities?

Environment variables are required to configure these TypeScript backend utilities. You must set up your Node.js environment with the necessary variables before executing database connections, JWT handling, or nodemailer operations.

Why does my markdown to HTML conversion fail to highlight code blocks?

Markdown to HTML conversion fails to highlight code blocks when the rehype-highlight plugin is not properly integrated into the processing pipeline. This Skill includes rehype-highlight to ensure code blocks receive proper syntax highlighting during conversion.