For the complete documentation index, see llms.txt. This page is also available as Markdown.

AI Skills

Skills are reusable markdown instruction files that can be injected into agent context automatically or loaded on demand.

Since BoxLang AI v3.0+

Skills are reusable markdown instruction files that give agents specialized knowledge and behavior. Each skill is a focused unit of expertise — like "SQL Optimization", "BoxLang Expert", or "Code Reviewer".

🎓 What are Skills?

A skill is a markdown file (named SKILL.md) containing instructions, examples, and domain knowledge. Skills follow the Agent Skills open standard — each skill lives in its own named subdirectory under .ai/skills/.

.ai/skills/
  sql-optimizer/
    SKILL.md
  coding/
    boxlang-expert/
      SKILL.md
    code-reviewer/
      SKILL.md

Skill File Format

Each SKILL.md uses optional YAML frontmatter followed by markdown content:

---
name: SQL Optimizer
description: >
  Expert at writing and optimizing SQL queries for performance.
  Use this skill when working with database queries, indexes,
  or query performance.
---

# SQL Optimization Expert

You are an expert SQL query optimizer. When writing or reviewing queries:

1. Always consider index usage — prefer index-covered queries
2. Avoid `SELECT *` — specify only required columns
3. Use `EXPLAIN` to analyze query plans
4. Prefer JOINs over subqueries where possible
5. Use CTEs (WITH clauses) for complex multi-step logic

## Common Patterns

**Pagination:**
Use keyset pagination instead of OFFSET for large tables:
```sql
SELECT * FROM orders WHERE id > :lastId ORDER BY id LIMIT 20

Lazy-Loaded Skills (availableSkills)

Available skills form a pool that the agent can load on demand via a built-in loadSkill() tool. The agent is shown skill names and descriptions and decides which are relevant to each query. This avoids inflating the context window with unneeded instructions.

When a user asks about SQL optimization, the agent finds the sql-optimizer skill and calls loadSkill("sql-optimizer") before answering.

Combining Both

Using the aiSkill() BIF

See aiSkill() Reference for full parameter documentation.

Global Skills

Global skills are automatically injected into every agent's system context — even agents that don't explicitly declare any skills. Configure them in module settings:

Use aiGlobalSkills() to inspect the current global pool at runtime:

Fluent API

🌐 Discover, Install, and Publish Community Skills

The open Agent Skills ecosystem lets you discover reusable skills at skills.sh and install them with the official CLI from vercel-labs/skills.

Discover Skills on skills.sh

Browse by topic, popularity, or repository owner:

Once you find a skill repository (for example owner/repo), install it into your project.

Install Skills with the npx CLI

Use the official skills CLI:

After install, wire the skill into your BoxLang AI agent as always-on or available-on-demand:

Create Your Own Skill

You can scaffold a skill quickly:

Then ensure frontmatter includes a clear name and description:

Publish to GitHub with BoxLang Tags

To make your skill easy to discover, publish it in a public GitHub repository and add relevant repository topics.

Recommended topics:

  • boxlang

  • agent-skills

  • ai

  • boxlang-ai (if the skill is specific to this module)

Repository layout can be either a single root SKILL.md or a skills/ directory containing one or more skills.

Then users can install directly from your repo:

Last updated