agentleFS
AminMahpourAminMahpour/ChainAgents/skills/chainlit-generative-ui/SKILL.md

chainlit-generative-ui

Skill1 starsChanged 2 months agoMITView on GitHub

Use this skill in Chainlit when a response would benefit from a generated visual panel, interactive prompt buttons, a compact facts view, a short list, or a small comparison/status table using the render_chainlit_ui tool.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 6 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use Chainlit generative UI as the active interaction layer for structured Chainlit turns while keeping the normal text response.

    line 8
  2. Very specific:

    Call render_chainlit_ui only when that tool is available in the current tool list.

    line 13
  3. Distinctive:

    Default to rendering UI for concise, user-facing structure: summaries, decision cards, status panels, short checklists, small tables, and …

    line 14
  4. Very specific:

    Do not render arbitrary JSX, HTML, scripts, or custom component names.

    line 17
  5. Distinctive:

    Do not describe generated panels as above or below the answer.

    line 18
  6. Very specific:

    Put only plain strings in items.

    line 19
  7. Very specific:

    Put prompt buttons in actions.

    line 20
  8. Very specific:

    Do not duplicate the same option in items and actions.

    line 22
  9. Distinctive:

    Keep generated panels compact.

    line 23
  10. Distinctive:

    Do not put secrets, hidden reasoning, system messages, or internal tool details in the panel.

    line 24
  11. Distinctive:

    After calling the tool, continue with the normal answer.

    line 72

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

chainlit-generative-ui

Use Chainlit generative UI as the active interaction layer for structured Chainlit turns while keeping the normal text response.

Working rules:

  1. Call render_chainlit_ui only when that tool is available in the current tool list. If it is absent, answer normally in text.
  2. Default to rendering UI for concise, user-facing structure: summaries, decision cards, status panels, short checklists, small tables, and follow-up actions.
  3. Include actions when the user may want next steps. Prefer useful continuation buttons such as "Run tests", "Show diff", "Explain config", or "Create PR".
  4. Skip UI for simple one-sentence answers, conversational acknowledgements, and cases where a panel would duplicate the text without adding interaction.
  5. Do not render arbitrary JSX, HTML, scripts, or custom component names. This runtime only exposes the whitelisted GeneratedPanel component through render_chainlit_ui.
  6. Do not describe generated panels as above or below the answer. Chainlit renders them after the text response, so use non-positional wording such as "the generated panel" or "the panel actions."
  7. Put only plain strings in items. Do not put objects with label and prompt there.
  8. Put prompt buttons in actions. Treat each button as a user-facing follow-up request with a clear label and prompt.
  9. For checklist-style panels with follow-up buttons, put the checklist labels in items and the clickable follow-ups in actions.
  10. Do not duplicate the same option in items and actions. If it is clickable, put it only in actions.
  11. Keep generated panels compact. Put detailed reasoning, long explanations, code, logs, and large datasets in the text response or files instead.
  12. Do not put secrets, hidden reasoning, system messages, or internal tool details in the panel.
  13. Reuse id only when updating the same panel. Use a stable, short id such as deployment-summary or review-findings.

Supported render_chainlit_ui fields:

  • title: short required panel title.
  • summary: optional concise summary.
  • facts: optional key-value object for compact facts.
  • items: optional short list of strings. Do not use this field for prompt buttons.
  • table: optional object with columns and rows.
  • actions: optional list of prompt buttons, each with label and prompt.
  • id: optional stable panel id. Reusing the id updates the existing panel.

Example tool call:

{
  "title": "Review Summary",
  "summary": "Two blocking issues need fixes before merge.",
  "facts": {
    "Status": "Needs changes",
    "Tests": "Targeted suite passed"
  },
  "items": [
    "Fix stale Chainlit element updates",
    "Add disabled-config coverage"
  ],
  "table": {
    "columns": ["Area", "Result"],
    "rows": [
      ["Runtime", "Tool enabled only when configured"],
      ["Chainlit", "GeneratedPanel rendered as its own message"]
    ]
  },
  "actions": [
    {
      "label": "Show fixes",
      "prompt": "Show me the exact fixes for the blocking review issues."
    },
    {
      "label": "Run tests",
      "prompt": "Run the targeted tests for this change."
    }
  ],
  "id": "review-summary"
}

After calling the tool, continue with the normal answer. The panel should complement the answer, not replace it. Refer to it without above/below placement language.

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.