Skip to content

Extensions and Skill loading ​

Choose by purpose, then use the relevant API guide. Skills, external tools and pets have distinct inputs and lifecycles.

Open
View on GitHub

Choose an extension ​

MechanismPurposeEntryAPI guide
SkillProcedures, checklists, conventionsSKILL.md and referencesThis page
MCP client/serverExternal tools or phone-tool exposureHTTP(S), JSON-RPCMCP
API 2 petFloating appearance, animation, feedbackZIP and ES modulePet runtime
Built-in toolPlatform/application capabilityKotlin schema/HandlerTools

Each follows its execution policy. Skills add no system permission; pet scripts do not own host approvals. Local MCP separately skips per-call chat approvals, as documented in its guide.

Skill package ​

text
SKILL.md
references/checklist.md
scripts/optional-script.sh

Describe triggers, prerequisites, steps and acceptance criteria in SKILL.md. Keep long references in relative files. Packaged scripts still require an execution environment and tools.

Import and management APIs ​

data/settings/AppSettings.kt provides these entries. Callers must handle Result failures:

APIContract
importSkillFile(uri) / importSkillZip(uri)Import Android URI
importSkillMarkdown(sourceName, skillText)Install nonempty Markdown
importSkillRepository(repositoryUrl)Resolve/download supported repository/raw URLs
importSkillZipBytes(sourceName, bytes)Install existing ZIP data
installedSkills()List installed metadata
setSkillEnabled(id, enabled) / updateSkillMeta(...)Enable/disable or edit metadata
deleteSkill(id)Delete installed content
listSkillFiles(id) / readSkillFile(id, path)Read by ID and relative path

Loading lifecycle ​

Import ​

Resolve source → stage directory → validate entry, archive paths and size → metadata → final directory → enable. Remove temporary files on failure. Do not register success before download/validation.

Request ​

activeSkillsPrompt(forcedSkillIds) provides available names/descriptions. The Agent reads relevant entries/references through list_skill_files and read_skill_file. Turn-selected IDs are retained by OpenAiAgent.chat and cleared in finally, without leaking to other requests.

Execution ​

Actual tools execute procedures within their capability/path limits. Adapt unavailable desktop tools to Android/Termux. Successful import does not prove the procedure can run on-device.

Import example ​

kotlin
// Existing host settings/text; perform downloads/reads on appropriate dispatchers.
val skill = settings.importSkillMarkdown("project-review.md", markdown).getOrThrow()
val files = settings.listSkillFiles(skill.id).getOrThrow()
val entry = settings.readSkillFile(skill.id, "SKILL.md").getOrThrow()

See the project review Skill for complete Markdown, checklist and ZIP. Verify metadata, enabled state, references, read-only execution and unmet dependencies, then check availability after updates/deletion.

Lyra Code. All rights reserved.