Skills, Custom Commands & MCP
Out of the box, Hya knows how to read files, edit code, search the web, and run shell commands. When you want to give it specialized know-how, reusable prompt shortcuts, or outside tools (like GitHub, Linear, Slack, or Postgres), you have three lightweight options—no coding required.
1. Skills (SKILL.md)
A Skill is a folder containing a SKILL.md instruction guide. Unlike AGENTS.md (which is loaded into every single chat), Skills stay out of the way until they are needed: Hya sees only a one-line name: description summary at startup, and loads the full SKILL.md instructions only when a task calls for it (or when you invoke it yourself).
Compatible out of the box
If you already have skills from Claude Code, Codex, or Pi, Hya finds them automatically! It checks these folders in order (first match wins):
<project>/.hya/skills/<name>/SKILL.md~/.config/hya/skills/<name>/SKILL.md~/.claude/skills/<name>/SKILL.md<project>/.agents/skills/<name>/SKILL.md~/.codex/skills/<name>/SKILL.md~/.agents/skills/<name>/SKILL.md
Browsing and running Skills
/skillsopens a full-screen browser showing every Skill found on your machine, where it came from, and any syntax warnings./skill:<name> <your request>forces Hya to load that Skill right now for your message:/skill:agent-bundle-authoring Help me package a read-only SQL helper bundle- Added or edited a
SKILL.mdwhile Hya was already open? Run/reload-skills.
2. Custom Slash Commands
Have a prompt you type ten times a week—like “Review staged git changes for bugs” or “Write release notes since the last tag”? Save it as a Markdown file and run it with /your-command!
Create .hya/commands/check-pr.md in your project (or ~/.config/hya/commands/check-pr.md for all projects):
---description: Review current branch changes before opening a PR---Run `git diff main...HEAD`, check every changed file for edge cases or missing tests, and give me a short checklist of anything to fix before merging.
Extra focus: $ARGUMENTSNow inside Hya (run /reload-commands if Hya is already open), just type:
/check-pr check SQL injection and null handlingHya also includes handy built-in commands like /init (drafts an AGENTS.md for your repo) and /review (reviews your working tree changes).
3. MCP Servers (Model Context Protocol)
MCP lets Hya plug into local stdio tool servers or remote HTTP MCP servers—database inspectors, browser automation, issue trackers, documentation search, and more.
Add MCP servers in [mcp.<name>] tables in ~/.config/hya/config.toml:
[mcp.memory]command = ["npx", "-y", "@modelcontextprotocol/server-memory"]
[mcp.github]command = ["npx", "-y", "@modelcontextprotocol/server-github"]env = { GITHUB_PERSONAL_ACCESS_TOKEN = "{env:GITHUB_TOKEN}" }
[mcp.docs-remote]url = "https://mcp.example.com/mcp"Every tool from an MCP server appears to Hya as mcp__<server>__<tool> (for example mcp__github__list_issues) and goes through Hya’s normal permission checks.
Managing MCP servers inside Hya (/mcp)
Type /mcp in the TUI to see every configured server:
- Press
Enteron a server to inspect all the tools it exposes. - Press
cto connect orxto disconnect a server live. - Press
aif a server asks for OAuth login.
4. Optional: Code Mode (tools.code.mode)
Code Mode lets an agent call several Hya tools in parallel, filter their
outputs, and return a summary in a single round. hya-app exposes the native
crates/hya-code-mode runtime through code-mode__run. It runs async
JavaScript in-process in a QuickJS-NG sandbox via rquickjs. Before execution,
an AST checker built on oxc_parser checks syntax, tool names, required
arguments, and available globals. Code Mode requires no Bun runtime.
Usage & Configuration
Enable it in ~/.config/hya/config.toml (then run hya server restart):
[tools.code]mode = "with_tools" # normal | with_tools | onlynormal(default):code-mode__runis not loaded.with_tools: offerscode-mode__runalongside the agent’s usual tools.only: offerscode-mode__runas the exclusive tool (with all other tools callable inside scripts viatools.*; direct model calls to hidden tools are refused).
Configure the optional judge for models.classify in the [tools.code.judge]
table in config.toml. When that table is omitted, Hya can read a deprecated
config.yml from the Code Mode config directory or the legacy bundle config
directory. Tool calls inside scripts follow the session’s Project boundaries
and permission rules. See Code Mode configuration.
Tool and Script Interface
Input to code-mode__run accepts one of four forms:
{ script: string, args?: object, save_as?: string }{ run: string, args?: object }{ list: true }{ show: string }
Each input must match exactly one form without extra fields. Saved script
names in save_as, run, and show match ^[a-z0-9][a-z0-9-]{0,63}$.
save_as stores a script even if it fails. show returns its source and
last error. Scripts are async function bodies with top-level await and
return.
Globals exposed inside the sandbox:
args: call arguments object (or{}).await tools.<name>(input): invokes any tool in the caller’s view (non-identifier characters become_).ALL_TOOLSlists callable tools as{name, description}objects.describeTool(name)returns{name, description, input_schema}orundefined.await agent(input)andawait agents.run(input)are available when a tool withToolPermission::Taskis registered. Pass{agent, prompt, description?, result?, model?, effort?, timeout_secs?}. The required fields are nonblank strings.description,model, andeffortare optional strings.resultmaps field names to descriptions.timeout_secsaccepts numbers from 0 through 1800, rounds up to whole seconds, and defaults to 600. The call returns{handle, session, status, report, result}, whereresultis the parsedRESULT: {...}from the report ornull.await models.classify({ state, questions })sends a JSON value instateto the configured judge.questionsis a nonempty object keyed by question ID. Each question has a nonblankinstructionsstring and atypeofbool,choice, orscore. Aboolquestion may supplycriteriamapping"true"and"false"to descriptions. Achoicequestion requires a nonempty label-to-description object, and ascorequestion requires a nonempty array of descriptions. The call returns{answers}, whereanswersmaps question IDs to objects. The answer shapes are{type: "bool", probability},{type: "choice", choice, probabilities, confidence}, and{type: "score", score, confidence}. Probabilities and confidence range from 0 to 1. A score ranges from 0 to the number of criteria minus one.text(value),return value,console.log(...): emit structured output and logs.
Example (code-mode__run input):
{ "script": "const [a, b] = await Promise.all([tools.read({ path: 'Cargo.toml' }), tools.grep({ pattern: 'hya-core' })]); return { hasCore: b.output.length > 0, bytes: a.output.length };"}Want to write your own Skills, Commands, or full Bundles? See Extending Hya.