roots-skills

内容来源:README.md(说明文档) · 原始地址 · 查看安装指南

原始内容

Roots Skills

The root layer of procedural knowledge for AI agents. This repository contains a curated collection of universal, high-quality skills designed to standardize development workflows, focusing on robust architecture, security, and proven patterns.

These skills are designed to be "stack-agnostic" where possible, meaning the HTMX patterns work for Python/Go/Node, and the Handlebars patterns apply to any engine usage.

Installation

To install this collection into your AI agent (OpenCode, Cursor, Cline, etc.), run:

npx skills add ecelayes/roots-skills

You can also install specific modules individually if you only need one technology:

npx skills add ecelayes/roots-skills --skill htmx-universal-patterns

Included Skills

1. htmx-universal-patterns

The definitive guide for building Hypermedia-Driven Applications (HDA).

  • Universal: Works with any backend (Django, Rails, Go, Node, etc.).
  • Security First: Enforces CSRF protection in headers or forms and output escaping.
  • UX Patterns: Automates the use of hx-indicator for visual feedback.
  • Architecture: Enforces the "Partials over JSON" rule and correct HTTP status code handling (422 for errors, 200 for swaps).

2. koa-advanced-patterns

Professional standards for Node.js backend development using Koa.

  • Reliability: Enforces Graceful Shutdown implementation (SIGTERM/SIGINT) to prevent data loss.
  • Middleware: Teaches the correct async/await chain and "Onion Model" execution.
  • Context: strict guidelines on using ctx.state vs ctx.body to avoid pollution.
  • Security: usage of signed cookies and centralized error handling.

3. handlebars-pure-patterns

Best practices for logic-less templating.

  • Philosophy: Prevents logic leakage into views.
  • Componentization: Encourages the use of atomic partials for cleaner code and HTMX compatibility.
  • Syntax: Clarifies escaping ({{}}) vs raw ({{{}}}) usage to prevent XSS.

Usage

Once installed, the agent will automatically reference these skills when relevant. You can verify they are active by prompting:

  • "Create a secure form with HTMX that handles validation errors."
  • "Setup a robust Koa server with graceful shutdown."
  • "Refactor this HTML block into a reusable Handlebars partial."

License

MIT