Skills
Skills
A skill is a folder of instructions and files your agents can use. Its entry point is a SKILL.md file.
Create a skill #
POST
/v1/skills Uploads a skill as separate files or as one ZIP. Each upload creates a new skill. The files are stored, never run.
Body
-
files[]file - One field per file. Set each
filenameto its path inside the skill folder, such asbasic-math/SKILL.md. -
filesfile - Or one ZIP that contains the skill folder.
- The folder must contain one
SKILL.mdthat starts with frontmatter: aname(lowercase letters, digits and hyphens, up to 64 characters) and adescription(up to 1,024 characters). - Up to 4 MB per upload and 500 files.
- Send it as a multipart form; curl's
-Fdoes this for you.
curl -X POST "$MAILA_API_URL/v1/skills" \
-H "Authorization: Bearer $MAILA_API_KEY" \
-F 'files[]=@basic-math/SKILL.md;filename=basic-math/SKILL.md' \
-F 'files[]=@basic-math/calculate.py;filename=basic-math/calculate.py' {
"object": "skill",
"id": "skill_3f9a1c7e5b2d4f6a8c0e1b3d5f7a9c2e",
"name": "basic-math",
"description": "Add or multiply numbers.",
"created_at": 1792335167,
"default_version": "1",
"latest_version": "1"
}