Command Palette

Search for a command to run...

Назад к скиллам
скилл № 68646

mantle-building-skills

Authors Mantle skills: skill.md instructions, auto-discovered Python tools, and the progressive control ladder (tool constraints, scoped instructions…

БесплатноБез исполняемых скриптов
RasaHQот 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

  1. Scope the skill — one user goal per skill (see "Scoping").
  2. Write skill.md with name, description, and a prose body. No control levers.
  3. Write the tools it needs in tools.py (see "Tools").
  4. Train and converse: rasa train && rasa inspect. Treat rasa train errors as validation feedback (undeclared memory, bad YAML, missing references) — fix and retrain before debugging conversation behavior.
  5. Observe drift, then add the narrowest lever that fixes it (see "The control ladder"). Re-test. Repeat.
  6. 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-first snake_case names.
  • The description in 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-docstring Args: = per-argument descriptions.
  • context: ToolContext = None is injected, invisible to the LLM. Use context.memory.set(key, value) to write memory (this is what requires: conditions gate on), context.send(text) for immediate deterministic messages. Every key you set must be declared in a memory.yml schema — rasa train rejects 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 or requires: 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 same tools.py. It is an internal hook, never offered to the LLM; return a JSON payload with a non-null error to 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.

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

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), без исполняемых скриптов.

Похожие скиллы

Сравнить mantle-building-skills с