Skip to main content

Una Skills

Una Skills are AI-powered commands that you can invoke inside an AI chat session. A skill bundles a name, a description, detailed instructions, and optional supporting files into a single folder. When you invoke a skill, those instructions are automatically loaded into the conversation, giving the AI deep context for a specific task — without you having to explain anything.

This guide covers how to use skills and how to write your own.


Invoking a Skill

Type the skill name as a slash command, followed by your request:

/skill-name your request here

Examples:

/model-query Show me Revenue vs Budget for all departments in Q1 2025
/dashboard-model Create a Revenue Overview dashboard with a KPI tile, a bar chart, and a period filter
/code-review Review the changes in the last commit

The AI reads the skill's instructions and uses them to handle your request with full context — no additional setup required.


Skill Folder Structure

Every skill lives in its own folder under /Local AI/Skills/:

/Local AI/Skills/
my-skill/
skill.md ← required: main skill file
reference.md ← optional: supporting documentation
schema.json ← optional: supporting data
helper.py ← optional: scripts or tools
...

The only required file is skill.md. Everything else is optional.


The skill.md File

skill.md has two parts: a frontmatter block at the top, and the skill instructions below it.

---
name: My Skill
description: A short description of what this skill does and when to invoke it.
---

# My Skill

You are an expert in X. When the user invokes this skill...

(full instructions here)

Frontmatter Fields

FieldRequiredDescription
nameYesDisplay name of the skill.
descriptionYesOne or two sentences. Explains what the skill does and when it should be triggered. This is what the AI reads to decide whether to auto-invoke a skill.

Keep the description precise. Vague descriptions lead to the skill being invoked for the wrong prompts, or not invoked when it should be.


How Skills Are Loaded

Skills load in three stages, optimized to keep context lean:

Stage 1 — Frontmatter

The name and description from skill.md are always available to the AI. This is how the AI knows the skill exists and when to suggest or auto-invoke it.

Stage 2 — Skill Instructions

When the skill is invoked, the full body of skill.md is loaded into the conversation. This is where your main instructions, reference tables, examples, and guidance live.

Stage 3 — Extra Files (on demand)

Supporting files (other .md files, schemas, scripts) are only loaded when the AI determines they are needed for the specific request. This keeps the context window efficient — a large reference file is only pulled in when the user's request actually requires it.

Implication for skill authors: Put the core instructions in skill.md. Move large reference material (e.g. full API schemas, long example lists) into separate files and name them clearly so the AI can decide when to load them.


Best Practices

Writing the Instructions

Start with a role statement. Tell the AI who it is in the context of this skill:

"You are an expert in the Una ModelQuery system. Your job is to..."

Define the approach. Describe what the AI should do step by step when the skill is invoked:

  1. Understand the user's request
  2. Ask clarifying questions if critical information is missing
  3. Produce the output
  4. Explain what was generated

Enumerate valid values. For skills that produce structured output (JSON, code, SQL), list every allowed value for every enum/property. Don't assume the AI already knows them — make them explicit.

Include worked examples. At least one complete input→output example dramatically improves output quality. For skills that generate JSON or code, include a full, realistic example, not a skeleton.

State your assumptions. Tell the AI what to assume when the user doesn't specify something (e.g. "If no model is specified, use Main.").

Tell the AI what to ask. List which pieces of information are required before it can produce output, and which are optional. The AI should ask for required information rather than guessing.

Structuring the File

  • Use ## headings to separate major sections (reference tables, examples, guidelines)
  • Use tables for property references — they're easier to scan than prose
  • Use fenced code blocks for JSON/code examples
  • Keep the instructions in skill.md focused on how to behave; move large static reference data (e.g. a 200-row schema doc) to a separate file

What to Put in Extra Files

Extra files are good for:

  • Large property/enum reference tables that aren't needed for every request
  • Example libraries (many worked examples)
  • Data schemas or JSON schemas
  • Scripts the AI might be asked to run
  • Background documentation the AI should reference but rarely needs in full

Name extra files descriptively: property-reference.md, examples.md, schema.json.

Naming the Skill

Use lowercase kebab-case for the folder and command name: model-query, dashboard-model, code-review.

The command users type is the folder name, so keep it short and intuitive.


Example: A Short, Useful Skill

Here's a complete example of a small skill that helps format SQL queries consistently.

Folder: /Local AI/Skills/format-sql/

skill.md:

---
name: Format SQL
description: Formats a SQL query according to Una coding standards — uppercase keywords, consistent indentation, alias conventions. Invoke when the user asks to format, clean up, or review a SQL query.
---

# Format SQL

You are a SQL formatting assistant for the Una platform. When the user provides a SQL query, reformat it according to the rules below and return the cleaned version.

## Formatting Rules

- Keywords (`SELECT`, `FROM`, `WHERE`, `JOIN`, `ON`, `AND`, `OR`, `GROUP BY`, `ORDER BY`, `HAVING`, `WITH`) must be **uppercase**
- Each clause starts on a new line
- Column lists are indented 4 spaces, one column per line
- `JOIN` conditions are indented 4 spaces under the `JOIN` keyword
- Use `=` for equality, `<>` for inequality (not `!=`)
- Aliases use `AS` explicitly: `SomeTable AS st`
- Subqueries are indented 4 spaces and wrapped in parentheses on their own lines

## Approach

1. Parse the query the user provides
2. Reformat it according to the rules above
3. Return the formatted query in a fenced SQL code block
4. If the query has obvious issues (missing alias, `SELECT *`, unused joins), mention them briefly after the formatted block

## Example

**Input:**
```sql
select a.id, a.name, b.total from accounts a join orders b on a.id=b.account_id where a.active=1 order by b.total desc

Output:

SELECT
a.id,
a.name,
b.total
FROM accounts AS a
JOIN orders AS b
ON a.id = b.account_id
WHERE a.active = 1
ORDER BY b.total DESC

---

## Checklist Before Publishing a Skill

- [ ] `skill.md` has valid frontmatter with `name` and `description`
- [ ] Description is precise enough for auto-invocation to work correctly
- [ ] Instructions include a role statement
- [ ] All valid values for enums/properties are listed explicitly
- [ ] At least one complete worked example is included
- [ ] The AI is told what to ask the user if information is missing
- [ ] Large reference material is in a separate file, not inline in `skill.md`
- [ ] Skill folder name matches the intended `/skill-name` command
- [ ] Folder is placed under `/Local AI/Skills/<skill-name>/`