Skills

Luna's skill system — what built-in skills are available, how they're loaded, and how they shape model behavior.

Overview

A skill is a markdown file (SKILL.md) that lives in a named folder under skills/. When Luna detects that a user's request matches a skill's purpose, the skill's instructions are injected into the system prompt — no code changes, no redeployment.

Skills add context, workflow rules, and tool guidance without hardcoding behaviour in the backend. They're the primary extension point for giving Luna specialised capabilities.

How skills work

  1. The skill manager scans skills/*/SKILL.md on startup and caches all skill definitions.
  2. On each chat turn, the chat router calls list_skills() to expose skill names and descriptions to the LLM.
  3. The LLM decides whether to invoke a skill tool call based on the user's request.
  4. When invoked, the skill's SKILL.md content is injected as additional system context for that turn.
  5. Skills that have a dedicated endpoint (e.g. the coding agent) can also be called directly via their own route.
skills/ directory layout
skills/
  coding-agent/
    SKILL.md          ← workflow rules + tool list
  research/
    SKILL.md
  desktop-agent/
    SKILL.md
  workspace-suite/
    SKILL.md
  file-builder/
    SKILL.md
  document-drafter/
    SKILL.md
  dataset-builder/
    SKILL.md
  resume-checker/
    SKILL.md
  job-application-assistant/
    SKILL.md

Built-in skills

Luna ships nine built-in skills covering code, research, desktop automation, cloud productivity, and documents.

coding-agent

Activated for code-writing, debugging, editing, review, and technical explanation requests. Uses a dedicated Ollama model (CODING_MODEL in .env, default: qwen2.5-coder:7b).

Has its own streaming endpoint: POST /api/coding/stream.

Tools

ToolDescription
code_read_file(path)Read a workspace file (max 100 KB).
code_edit_file(path, old_string, new_string)Exact-string replacement. Fails if string not found or ambiguous.
code_write_file(path, content)Write or overwrite a workspace file.
code_list_files(path)List a workspace directory.
code_search(pattern, path)Regex search across workspace files (up to 50 matches).
code_run_shell(command)Run a shell command (read-only by default; confirms before destructive ops).

research

Activated for current-information questions, comparisons, source-backed answers, and website research.

Workflow: search → fetch relevant pages → compare sources → summarise with citations. Always includes a References section for web-backed answers.

Uses web_search for quick lookups and web_research for deep, cited context.

desktop-agent

Multi-step desktop automation. Asks for confirmation before clicks, typing, shell commands, destructive file operations, or sending external messages. Records meaningful actions to the audit log and verifies results before declaring completion.

workspace-suite

Google Workspace and Microsoft 365 integration. Automatically routes requests to the correct provider (Gmail/Outlook, Google Calendar/Microsoft Calendar, Drive/OneDrive, Sheets/Excel, Tasks/To Do). Requires OAuth tokens in .env.

📌
If a workspace tool returns an auth error, Luna tells the user which OAuth token is missing rather than silently failing.

file-builder

Creates, organises, and manages files in the workspace sandbox. Handles text, code, CSV, JSON, markdown, and other file types. Keeps all output inside data/workspace/.

document-drafter

Drafts structured documents — reports, emails, summaries, memos, meeting notes, technical specs. Applies formatting and structure appropriate to the document type. Can export to Google Docs or Markdown.

dataset-builder

Assembles datasets from web sources, APIs, and uploaded files. Searches dataset portals (Kaggle, Hugging Face, UCI, data.gov, NOAA, World Bank), downloads CSVs, and organises output in the workspace.

resume-checker

Reviews resume content, structure, phrasing, and ATS keyword density against a job description. Highlights gaps and suggests specific improvements. Works with uploaded PDF or plain-text resumes.

job-application-assistant

End-to-end job application workflow: tailors the resume to a job description, drafts a cover letter, prepares talking points for common interview questions, and tracks application status. Saves output to the workspace.

list_skills API

The backend exposes the skill registry via a tool call and via HTTP:

HTTP
GET /api/skills
# Returns JSON array of { name, description, has_dedicated_endpoint }
Python
from backend.services.skill_manager import list_skills

skills = list_skills()
for s in skills:
    print(s["name"], "—", s["description"])