agentleFS
anibajpai2anibajpai2/mantis-cli/skills/extensions/SKILL.md

extensions

Skill0 starsChanged 5 months agoMITView on GitHub

Build, modify, explain, validate, package, or install Mantis extensions and custom vertical panels. Use when a user asks for reusable Mantis UI, extension commands or events, a .mantisx package, or an optional Python-backed extension action.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 1

    1. KellisLab/mantis-cli★ 2100% same

    Edited · 0

    None found.

    Wrote their own version · 1

    1. BuilderIO/agent-native★ 7.6ksame name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

21 rules. About 0 are common, 15 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈15

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run this before any other Mantis command or tool, unless it already ran this turn:

    line 18
  2. Distinctive:

    Use the returned space id when installation needs a target.

    line 24
  3. Distinctive:

    use panel-local code for UI and temporary view state

    line 48
  4. Distinctive:

    add a host main only for durable commands, subscriptions, activation, or state

    line 49
  5. Distinctive:

    add Python only when the browser SDK cannot do the required work

    line 50
  6. Distinctive:

    Run the project's tests/build when present, package it, then inspect the archive layout before reporting success.

    line 54
  7. Very specific:

    Every package needs mantis.extension.json.

    line 58
  8. Distinctive:

    Keep extension, panel, and command ids stable.

    line 59
  9. Very specific:

    Use context.workspaceState / window.mantis.workspaceState for state scoped to the current space and globalState for user-level extension …

    line 61
  10. Very specific:

    Put durable command registrations and event subscriptions in host activate(context) and add returned disposables to context.subscriptions.

    line 62
  11. Very specific:

    Do not use raw rpc unless debugging the bridge and the documented helper cannot serve the request.

    line 64
  12. Very specific:

    Do not use unsupported contributes.menus or contributes.settings fields.

    line 65
  13. Distinctive:

    When a backend is needed:

    line 71
  14. Very specific:

    keep network: false unless external access is essential and explicitly disclosed

    line 77
  15. Distinctive:

    never treat the backend context as secret storage

    line 78
  16. Distinctive:

    Do not describe the backend as deprecated unless the current docs say so.

    line 80
  17. Distinctive:

    Treat extensions as trusted code even though panels are sandboxed and SDK calls are permission-gated.

    line 84
  18. Distinctive:

    Never add same-origin access to a panel or reach into the parent DOM, cookies, or browser storage.

    line 85
  19. Distinctive:

    Do not embed API keys or other secrets in browser or backend assets.

    line 86
  20. Distinctive:

    Avoid sending Mantis data to external services.

    line 87
  21. Distinctive:

    Prefer explicit user actions for writes, clear progress for slow work, and visible errors for permission or backend failures.

    line 88

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Mantis Extensions

Mantis extensions are trusted packages that add reusable workspace functionality without changing the core app. They can contain:

  • sandboxed panel UIs, available under Verticals > Extensions
  • an extension host for durable commands, subscriptions, activation, and state
  • an optional Python backend for work that should not run in the browser

Panel code uses window.mantis; host code uses mantis. Both use the same asynchronous, permission-gated SDK. Panels are short-lived and run in allow-scripts iframes without same-origin access. The host runs in a Web Worker and survives panel closure until the extension deactivates.

First step

Run this before any other Mantis command or tool, unless it already ran this turn:

mantis use get_space_context

Use the returned space id when installation needs a target. Never guess a space, map, field, or permission.

Documentation routing

The docs are authoritative. Read the pages relevant to the requested contribution; do not invent manifest fields, SDK methods, permissions, package layouts, or lifecycle behavior.

NeedRead
Architecture or choosing host vs panelOverview
Any new or changed packageManifest
Panel layout and lifecycleCustom panels and verticals and Panel UI
Mantis data, state, commands, or eventsSDK API
Server-side executionPython backend
Producing or checking an archivePackaging and installation
A concrete SDK patternExamples
Permissions, trust, or platform limitsSecurity and limits

For a normal panel extension, read the overview, manifest, relevant panel/SDK sections, packaging, and security guidance. Read backend documentation only when server-side execution is actually needed. Use examples as patterns, not as a substitute for the reference pages.

Build workflow

  1. Clarify the user-visible workflow, what Mantis data it reads or writes, whether behavior must survive panel closure, and the target space if installation is requested.
  2. Inspect the existing extension project before choosing its build system or layout. Preserve established conventions.
  3. Design the smallest useful contribution:
    • use panel-local code for UI and temporary view state
    • add a host main only for durable commands, subscriptions, activation, or state
    • add Python only when the browser SDK cannot do the required work
  4. Declare the narrowest supported permission set. Explain every write, command, backend, or network capability.
  5. Build self-contained browser output. Do not import from the parent Mantis app; bundle host and panel dependencies into the extension output.
  6. Validate manifest paths and ids, contribution entries, activation events, permissions, backend actions, and referenced assets.
  7. Run the project's tests/build when present, package it, then inspect the archive layout before reporting success.

Manifest and SDK rules

  • Every package needs mantis.extension.json.
  • Keep extension, panel, and command ids stable. Use globally unique dotted ids for extensions and prefix command ids with the extension id.
  • Declare only documented permissions: maps:read, selection:read, selection:write, bags:write, panels:write, commands:execute, and backend:invoke.
  • Use context.workspaceState / window.mantis.workspaceState for state scoped to the current space and globalState for user-level extension state.
  • Put durable command registrations and event subscriptions in host activate(context) and add returned disposables to context.subscriptions.
  • Dispose panel-local subscriptions when the panel unloads.
  • Do not use raw rpc unless debugging the bridge and the documented helper cannot serve the request.
  • Do not use unsupported contributes.menus or contributes.settings fields.

Python backend decision

Python backends are supported but optional. Add one only for server-side computation, Python-only dependencies, or work that cannot safely or practically run in the panel/host SDK.

When a backend is needed:

  • request backend:invoke
  • allowlist actions in backend.actions
  • validate every payload and return JSON-serializable values
  • pin and minimize requirements
  • keep network: false unless external access is essential and explicitly disclosed
  • never treat the backend context as secret storage

Do not describe the backend as deprecated unless the current docs say so.

Security

  • Treat extensions as trusted code even though panels are sandboxed and SDK calls are permission-gated.
  • Never add same-origin access to a panel or reach into the parent DOM, cookies, or browser storage.
  • Do not embed API keys or other secrets in browser or backend assets.
  • Avoid sending Mantis data to external services; if required, make the data flow and backend network access explicit.
  • Prefer explicit user actions for writes, clear progress for slow work, and visible errors for permission or backend failures.
  • Review publisher/source, permissions, dependencies, backend actions, and network access before installation.

Package and install

Prefer .mantisx or .zip for real extensions; use inline JSON only for small fixtures or debugging. The archive must contain mantis.extension.json at its root or inside one single top-level folder. Browser assets must not be under backend/; Python backend files must be under backend/. Paths must be safe, relative, and UTF-8 text.

Installing changes a Mantis space. Install only when the user asks for it or the task explicitly includes installation:

mantis use install_extension --file extension.mantisx --space-id <space-id>

The API-key user must own the target space. Installation is personal to that user within the space. Report the extension id/version, panels and commands, requested permissions, backend/network status, archive path, and installation result.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.