Skip to main content
Glama
saidsef

GitHub PR Issue Analyser

by saidsef

Github Pr Issue Analyser Ui

github_pr_issue_analyser_ui

Build interactive GitHub PR and issue analysis dashboards by running Prefab Python UI code in a sandbox, with reactive components and charts for repository insights.

Instructions

Execute Prefab Python code in a sandbox and render the result.

The code runs in a Pyodide WASM sandbox with full Python support. Import everything you use. Use the components tool to look up available components and their import paths.

Always use PrefabApp as the outermost context manager — this enables streaming so the UI renders progressively as code is written:

from prefab_ui.components import Column, Heading, Text, Row, Badge
from prefab_ui.app import PrefabApp

with PrefabApp() as app:
    with Column(gap=4):
        Heading("Dashboard")
        with Row(gap=2):
            Text("Revenue: $1.2M")
            Badge("On Track", variant="success")

For interactive UIs, pass initial state as a dict and use .rx on stateful components for reactive bindings:

from prefab_ui.components import Column, Slider, Text
from prefab_ui.app import PrefabApp

with PrefabApp(state={"threshold": 50}) as app:
    with Column(gap=4):
        slider = Slider(value=50, min=0, max=100, name="threshold")
        Text(f"Threshold: {slider.rx}%")

slider.rx produces {{ threshold }}, a template expression that resolves against client-side state. Use Rx("key") directly, or apply pipe filters: Rx("balance").currency() produces {{ balance | currency }}.

Available pipes: upper, lower, currency, length, json, round(n), default(val), truncate(n).

Charts live in prefab_ui.components.charts:

from prefab_ui.components.charts import BarChart, ChartSeries

BarChart(
    data=[{"month": "Jan", "rev": 100}, {"month": "Feb", "rev": 200}],
    series=[ChartSeries(data_key="rev", label="Revenue")],
    x_axis="month",
)

Values passed via data are available as global variables in the code. Python features like loops, f-strings, and comprehensions all work.

Layout patterns:

  • Card sub-components (CardHeader, CardContent, CardFooter) have built-in padding. Don't add extra padding to them. For a simple card without sub-components, use Card(css_class="p-6").

  • Use Grid(columns=N, gap=4) for equal-width cards or panels. Grid handles sizing automatically — no flex classes needed. For unequal widths, pass a list: Grid(columns=[2, 1], gap=4) gives a 2:1 ratio.

  • Row is for inline elements (badges, icons + text, buttons). Prefer Grid when children should have equal or proportional widths. Row does not wrap by default.

  • Column and Row accept gap (Tailwind scale: 1-12), align (cross-axis), and justify (main-axis) as native props — prefer these over raw css_class for spacing.

  • Use css_class="overflow-hidden" on containers if chart or content edges should clip to the container boundary.

Args: code: Python code that builds a Prefab component tree. data: Values injected as variables in the sandbox namespace. sandbox: A Sandbox instance. If not provided, a new one is created on each call.

Workflow and conventions: github_get_skill('interactive-ui').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
dataNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv14.0.3
  2. Removedv14.0.0
  3. Addedv11.0.1
  4. Removedv10.0.4
  5. Addedv10.0.0

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It thoroughly explains the sandboxed execution, streaming behavior, reactive state, and layout patterns. It also discloses the need to import all dependencies and use PrefabApp as the outermost context. While it does not explicitly state side effects or safety, the sandbox context implies a safe, read-only execution environment. This is substantial transparency for a complex tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is lengthy but well-structured with clear sections and code examples. It front-loads the core purpose and then provides necessary syntax, layout patterns, and pipe filters. Each section adds value, though the length could be trimmed for simpler contexts. Overall, it is appropriately sized for the complexity of the Prefab UI system.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the tool's functionality comprehensively: execution model, syntax, reactive bindings, charts, layout patterns, and parameter usage. It lacks a connection to the specific PR issue analysis domain implied by the tool name, but it fully covers the mechanics of the tool itself. Since there is no output schema, the description does not need to explain return values beyond 'render the result'. It is complete for calling and using the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description includes an 'Args' section that explicitly defines both parameters: 'code' as Python code building a Prefab component tree and 'data' as injected variables. This fully compensates for the 0% schema coverage. The description also provides multiple examples demonstrating how these parameters are used, adding rich meaning beyond the raw schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool executes Prefab Python code in a sandbox and renders the result, which is a specific verb+resource. It distinguishes itself from sibling GitHub operation tools by being a UI rendering tool. However, the tool name suggests a PR issue analysis focus, but the description omits that domain context, making the purpose slightly ambiguous in this GitHub context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly state when to use this tool versus alternatives. It mentions a workflow convention to call github_get_skill('interactive-ui'), but this is a pointer to a skill, not an explicit usage guideline. No guidance on when not to use this tool or how it compares to other UI-related tools is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.