[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AHTPW2PXDZ58164Z1MSPR6":3,"skill-same:01M7AHTPW2PXDZ58164Z1MSPR6":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7AHTPW2PXDZ58164Z1MSPR6","mantle-tools-and-memory",null,"Write Rasa Mantle tools (Python) and design memory scoping. Use when adding a tool, when a tool isn't discovered, when deciding local vs shared tools, or when choosing project memory vs skill memory.","RasaHQ\u002Frasa-community-resources","RasaHQ","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F21214473?v=4","01M7ABXR532XTM0MWW7ZK48J12","Rasa","01M7AGG0E6HH8BMYVXAEY9SHWJ",44,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FRasaHQ\u002Frasa-community-resources\u002Fblob\u002Fmain\u002Fstarter-pack\u002F.claude\u002Fskills\u002Fmantle-tools-and-memory\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: mantle-tools-and-memory\ndescription: >\n  Write Rasa Mantle tools (Python) and design memory scoping. Use when adding\n  a tool, when a tool isn't discovered, when deciding local vs shared tools,\n  or when choosing project memory vs skill memory.\n---\n\n# Tools and memory — the scoping model\n\n## The two scopes, one sentence each\n\n- **Project memory (`memory.yml`, repo root):** facts that outlive a single\n  skill — identity, preferences, session state. Every skill reads and writes\n  it. **Tool-written only**: `llm_settable: true` here is rejected by the\n  engine at validate time.\n- **Skill memory (`skills\u002F\u003Cid>\u002Fmemory.yml`):** one skill's working state,\n  under `schema: public:`. This is where `llm_settable: true` is allowed.\n\nRule of thumb: if a later skill could skip work because of it (customer id,\nauthenticated flag, chosen language) → project memory, set by a tool. If it\nonly matters until this skill finishes (which account they asked about) →\nskill memory, settable by the LLM.\n\n## Writing a tool\n\nAlways import from the project's shim, never from `rasa.*` directly:\n\n```python\n\"\"\"LOCAL tool for check_balance — reading a balance is this skill's job alone.\"\"\"\nfrom __future__ import annotations\n\nfrom lib.engine import ToolContext, ToolResult, tool\n\n\n@tool(description=\"Return the balance of one of the signed-in customer's accounts.\")\nasync def fetch_balance(account_number: str, context: ToolContext = None) -> ToolResult:\n    \"\"\"Look up a single account balance.\n\n    Args:\n        account_number: The account number to read.\n    \"\"\"\n    customer_id = context.memory.get(\"project.customer_id\") if context else None\n    if not customer_id:\n        return ToolResult(llm_response={\"ok\": False, \"error\": \"not_authenticated\"})\n\n    account = lookup(customer_id, account_number)\n    if account is None:\n        return ToolResult(llm_response={\"ok\": False, \"error\": \"account_not_found\"})\n\n    if context is not None:\n        context.memory.set(\"account_number\", account_number)  # skill scope\n\n    return ToolResult(llm_response={\n        \"ok\": True, \"account_number\": account_number,\n        \"balance\": account.balance, \"currency\": \"GBP\",\n    })\n```\n\nThe load-bearing facts:\n\n- **Discovery is by the `_tool_description` attribute the `@tool` decorator\n  sets** — where you import the decorator from makes no difference, which is\n  why the `lib\u002Fengine.py` shim is safe.\n- Tools are `async def`, take typed args plus `context: ToolContext = None`,\n  and return `ToolResult(llm_response={...})`.\n- `context.memory.get(\"project.\u003Cfield>\")` reads project memory;\n  `context.memory.set(\"\u003Cfield>\", value)` writes this skill's scope.\n- Return **structured dicts with an `ok`\u002F`error` shape**, never prose. Error\n  values like `\"not_authenticated\"` become branch points in skill prose\n  (\"If it returns `not_authenticated`, tell the caller you need to verify\n  them first\"). Include recovery data on errors (e.g. `known_accounts`).\n\n## Local vs shared\n\n- `skills\u002F\u003Cid>\u002Ftools.py` — tools only that skill uses. No registration needed.\n- `tools\u002F` (project root) — tools used by 2+ skills; each consuming skill\n  lists them under `import_tools:` in its frontmatter. Document the choice in\n  the docstring (\"shared with other skills, so it is imported rather than\n  living in this skill's folder\").\n\n## Authority pattern (the one worth copying everywhere)\n\nMake ONE tool the authority for each invariant, and let skills defer to it:\nthe balance tool checks authentication itself by reading\n`project.customer_id`, so no skill can leak a balance by forgetting a check —\nthe prose then says the tool \"is the authority on whether the caller is\nverified.\" Guardrails in tools are enforced; guardrails only in prose are\nrequests.\n\n## Verify\n\n- `python3 scripts\u002Flint_mantle.py --check project-memory-writes`\n- `make validate` (engine-level: rejects root `llm_settable`, missing tools,\n  bad constraints)\n","# Tools and memory — the scoping model\n\n## The two scopes, one sentence each\n\n- **Project memory (`memory.yml`, repo root):** facts that outlive a single\n  skill — identity, preferences, session state. Every skill reads and writes\n  it. **Tool-written only**: `llm_settable: true` here is rejected by the\n  engine at validate time.\n- **Skill memory (`skills\u002F\u003Cid>\u002Fmemory.yml`):** one skill's working state,\n  under `schema: public:`. This is where `llm_settable: true` is allowed.\n\nRule of thumb: if a later skill could skip work because of it (customer id,\nauthenticated flag, chosen language) → project memory, set by a tool. If it\nonly matters until this skill finishes (which account they asked about) →\nskill memory, settable by the LLM.\n\n## Writing a tool\n\nAlways import from the project's shim, never from `rasa.*` directly:\n\n```python\n\"\"\"LOCAL tool for check_balance — reading a balance is this skill's job alone.\"\"\"\nfrom __future__ import annotations\n\nfrom lib.engine import ToolContext, ToolResult, tool\n\n\n@tool(description=\"Return the balance of one of the signed-in customer's accounts.\")\nasync def fetch_balance(account_number: str, context: ToolContext = None) -> ToolResult:\n    \"\"\"Look up a single account balance.\n\n    Args:\n        account_number: The account number to read.\n    \"\"\"\n    customer_id = context.memory.get(\"project.customer_id\") if context else None\n    if not customer_id:\n        return ToolResult(llm_response={\"ok\": False, \"error\": \"not_authenticated\"})\n\n    account = lookup(customer_id, account_number)\n    if account is None:\n        return ToolResult(llm_response={\"ok\": False, \"error\": \"account_not_found\"})\n\n    if context is not None:\n        context.memory.set(\"account_number\", account_number)  # skill scope\n\n    return ToolResult(llm_response={\n        \"ok\": True, \"account_number\": account_number,\n        \"balance\": account.balance, \"currency\": \"GBP\",\n    })\n```\n\nThe load-bearing facts:\n\n- **Discovery is by the `_tool_description` attribute the `@tool` decorator\n  sets** — where you import the decorator from makes no difference, which is\n  why the `lib\u002Fengine.py` shim is safe.\n- Tools are `async def`, take typed args plus `context: ToolContext = None`,\n  and return `ToolResult(llm_response={...})`.\n- `context.memory.get(\"project.\u003Cfield>\")` reads project memory;\n  `context.memory.set(\"\u003Cfield>\", value)` writes this skill's scope.\n- Return **structured dicts with an `ok`\u002F`error` shape**, never prose. Error\n  values like `\"not_authenticated\"` become branch points in skill prose\n  (\"If it returns `not_authenticated`, tell the caller you need to verify\n  them first\"). Include recovery data on errors (e.g. `known_accounts`).\n\n## Local vs shared\n\n- `skills\u002F\u003Cid>\u002Ftools.py` — tools only that skill uses. No registration needed.\n- `tools\u002F` (project root) — tools used by 2+ skills; each consuming skill\n  lists them under `import_tools:` in its frontmatter. Document the choice in\n  the docstring (\"shared with other skills, so it is imported rather than\n  living in this skill's folder\").\n\n## Authority pattern (the one worth copying everywhere)\n\nMake ONE tool the authority for each invariant, and let skills defer to it:\nthe balance tool checks authentication itself by reading\n`project.customer_id`, so no skill can leak a balance by forgetting a check —\nthe prose then says the tool \"is the authority on whether the caller is\nverified.\" Guardrails in tools are enforced; guardrails only in prose are\nrequests.\n\n## Verify\n\n- `python3 scripts\u002Flint_mantle.py --check project-memory-writes`\n- `make validate` (engine-level: rejects root `llm_settable`, missing tools,\n  bad constraints)\n",{"name":5,"description":7},"main","082746ff3466e3beb59eba5fa274b6a90ac38419","starter-pack\u002F.claude\u002Fskills\u002Fmantle-tools-and-memory",19,"https:\u002F\u002Fgithub.com\u002FRasaHQ\u002Frasa-community-resources","https:\u002F\u002Frasa.community\u002F","https:\u002F\u002Fgithub.com\u002FRasaHQ","https:\u002F\u002Frasa.com","Rasa is a conversational AI framework for building reliable, scalable AI agents.","2026-11-14 12:02:45",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add RasaHQ\u002Frasa-community-resources --skill mantle-tools-and-memory",{"tool":40,"command":41},"bunx","bunx skills add RasaHQ\u002Frasa-community-resources --skill mantle-tools-and-memory",{"tool":43,"command":44},"pnpm","pnpm dlx skills add RasaHQ\u002Frasa-community-resources --skill mantle-tools-and-memory","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FRasaHQ\u002Frasa-community-resources\u002Fblob\u002Fmain\u002Fstarter-pack\u002F.claude\u002Fskills\u002Fmantle-tools-and-memory\u002FSKILL.md",true,[],[49,56,63,70,77,82],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M7AJ24E15F9CMBGM3QZSKV6S","Build a travel desk","Handle developer requests to build or extend a Mantle travel agent using four approved travel tools.","https:\u002F\u002Fgithub.com\u002FRasaHQ\u002Frasa-community-resources\u002Fblob\u002Fmain\u002Fworkshops\u002Fsoftware-factories-masterclass\u002Fstudio\u002Fskills\u002Fbuild_agent\u002Fskill.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7AJ20RB027VHFWF2MAM79WC","Travel briefing","Answer questions about flight status, tonight’s departures, airport weather and currency conversion.","https:\u002F\u002Fgithub.com\u002FRasaHQ\u002Frasa-community-resources\u002Fblob\u002Fmain\u002Fworkshops\u002Fsoftware-factories-masterclass\u002Freference\u002Ffinished-agent\u002Fskills\u002Ftravel_briefing\u002Fskill.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7AJ1XQ9HR7H1ENZRX9YF5EJ","Review Dispute","Ask the outside reviewer about a card dispute, then block the card if the caller confirms. Activate when the caller reports a card transaction they did not make.","https:\u002F\u002Fgithub.com\u002FRasaHQ\u002Frasa-community-resources\u002Fblob\u002Fmain\u002Fworkshops\u002Fsoftware-factories-masterclass\u002Fopenai-mcp\u002Fproject\u002Fskills\u002Freview_dispute\u002Fskill.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7AJ1W0KTP19WYFACXY9WTRD","Block Card","Block a customer's lost or stolen card. Activate when the caller wants a card blocked.","https:\u002F\u002Fgithub.com\u002FRasaHQ\u002Frasa-community-resources\u002Fblob\u002Fmain\u002Fworkshops\u002Fsoftware-factories-masterclass\u002Ffactory\u002Fcandidates\u002Fblock-card-tamper\u002Fproduct\u002Fskills\u002Fblock_card\u002Fskill.md",[],[],{"skillNo":78,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7AJ1T5489X484B6V0KPR2AA","https:\u002F\u002Fgithub.com\u002FRasaHQ\u002Frasa-community-resources\u002Fblob\u002Fmain\u002Fworkshops\u002Fsoftware-factories-masterclass\u002Ffactory\u002Fcandidates\u002Fblock-card-hangs\u002Fproduct\u002Fskills\u002Fblock_card\u002Fskill.md",[],[],{"skillNo":83,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7AJ1RBPS99DXH3YY373ERWW","https:\u002F\u002Fgithub.com\u002FRasaHQ\u002Frasa-community-resources\u002Fblob\u002Fmain\u002Fworkshops\u002Fsoftware-factories-masterclass\u002Ffactory\u002Fcandidates\u002Fblock-card-good\u002Fproduct\u002Fskills\u002Fblock_card\u002Fskill.md",[],[]]