mantle-building-skills
Authors Mantle skills: skill.md instructions, auto-discovered Python tools, and the progressive control ladder (tool constraints, scoped instructions…
от RasaHQ★ 45 звёзд на GitHub
Установить mantle-building-skills в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Building Mantle skills
A skill is a folder under skills/ holding one user goal. The only required file is
skill.md: YAML frontmatter (metadata + control declarations) and a markdown body
(prose instructions the LLM follows). Tools live in a single tools.py next to
skill.md — every @tool-decorated function in it is auto-discovered, no registration.
The core discipline is progressive control: write prose first, add control levers only when observed behavior must become guaranteed behavior. Every lever is additive — you never restructure what's already written.
Workflow
- Scope the skill — one user goal per skill (see "Scoping").
- Write
skill.mdwithname,description, and a prose body. No control levers. - Write the tools it needs in
tools.py(see "Tools"). - Train and converse:
rasa train && rasa inspect. Treatrasa trainerrors as validation feedback (undeclared memory, bad YAML, missing references) — fix and retrain before debugging conversation behavior. - Observe drift, then add the narrowest lever that fixes it (see "The control ladder"). Re-test. Repeat.
- Extract shared behavior into sub-skills only when a second skill needs it.
Scoping
- One user goal, clear start and end:
replace_card,check_balance,book_appointment. Verb-firstsnake_casenames. - The
descriptionin frontmatter is what the orchestrator uses to route — write it as a routing summary, including trigger phrasings ("lost, stolen, damaged, or not received"), not marketing copy. - Too big: one skill mixing unrelated goals (returns + payments + tracking). Split.
- Too small: a skill that only wraps one utterance or one tool call with no conversation. Inline it into the skill that uses it.
The minimal skill
---
name: Card Replace
description: Replace a credit card -- lost, stolen, damaged, or not received
---
Help the customer replace a credit card.
Check whether their account is eligible for replacement. If they have
multiple cards, ask which one. Ask why they need a replacement -- the valid
reasons are lost, stolen, damaged, or not received.
For stolen or not-received cards, offer to lock the card while a new one
ships. Once everything is gathered, ask their shipping preference,
confirm the order, and process the replacement.
Write the body like instructions to a competent human agent: what to gather, what
order matters (softly), what to offer when. The skill id is the folder name
(card_replace); name: is only a display label.
Name tools in plain prose ("then call lock_card"), since they are already in the
model's schema while the skill is active. Jump tokens: @block.<block_id> for an
ordered block in this skill, @skill.<skill_id> for another skill, and
@memory.<namespace>.<entry> for a live memory value inline (see "Memory in
prose"). Both block and skill tokens take ids, never display names.
Tools
from rasa.calm_v2.tools.decorator import ToolContext, tool
from rasa.calm_v2.tools.result import ToolResult
@tool(description="Lock a card to prevent further transactions")
async def lock_card(
card_id: str,
context: ToolContext = None,
) -> ToolResult:
"""Lock a card to prevent further transactions.
Args:
card_id: Card identifier from get_customer_info.
"""
result = await api.post(f"/cards/{card_id}/lock")
return ToolResult(llm_response={"locked": True, "card_id": card_id})
- Function name = tool name;
@tool(description=...)= what the LLM sees; type hints = input schema; Google-docstringArgs:= per-argument descriptions. context: ToolContext = Noneis injected, invisible to the LLM. Usecontext.memory.set(key, value)to write memory (this is whatrequires:conditions gate on),context.send(text)for immediate deterministic messages. Every key yousetmust be declared in amemory.ymlschema —rasa trainrejects undeclared writes (undeclared_memory_write).- Return
ToolResult(llm_response=...)— the LLM reads this as the tool's result. Write to memory for anything later steps orrequires:conditions need. - Tools outside the skill folder need frontmatter declaration:
import_tools:
- get_customer_info # shared: from tools/ at agent root
- A skill-local tool wins over a shared tool of the same name. Resolved once at model load.
- To validate or clean a value right after it is written, define
run_after_setting_<memory_entry>in the sametools.py. It is an internal hook, never offered to the LLM; return a JSON payload with a non-nullerrorto reject the write and roll it back. Ask for values in prose.
Interruptions
A running tool is interrupted when the user barges in (or the session times out, or
the client cancels): asyncio.CancelledError is raised at the tool's current await
and propagates through its helpers. Nothing to wire up.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл mantle-building-skills?
Authors Mantle skills: skill.md instructions, auto-discovered Python tools, and the progressive control ladder (tool constraints, scoped instructions, verbatim responses, ordered blocks, sub-skills). Use when creating or editing any file under skills/, deciding how much control a skill needs, or composing skills together.
Как установить скилл mantle-building-skills?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл mantle-building-skills запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…