Ui Context logo

Ui Context

Organization
allthingsida
ui-context

Capture live IDA UI context. Use when the user references what's on screen, what's selected, or asks about the current view in IDA's GUI.

Overview

Publisherallthingsida
Repositoryidasql-skills
Skill nameui-context
Stars
50
Forks
10
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by allthingsida on GitHub. Read the source before you install it.

Installation

Install the Ui Context AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/allthingsida/idasql-skills/tree/main/plugins/idasql/skills/ui-context
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/allthingsida/idasql-skills.git /tmp/idasql-skills
mkdir -p .claude/skills
cp -r /tmp/idasql-skills/plugins/idasql/skills/ui-context .claude/skills/ui-context
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ui Context in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ui Context on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ui Context is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.


Primary Query

Use this function to capture active UI state:

sql
SELECT get_ui_context_json();

Capture once per user question, then reuse that snapshot while answering. Capture again only when the user asks to refresh/re-check, or when a new UI-referential question starts.


Trigger Patterns

Use this skill for prompts like:

  • "what am I looking at?"
  • "what is on the screen?"
  • "what's selected?"
  • "look at what I'm doing"
  • references such as "this", "here", "current", "selected", "that", "previous"

Capture Policy

  1. Call get_ui_context_json() before answering UI-referential prompts.
  2. Extract view info: widget type/title and custom-view state.
  3. Extract selection info when present: begin/end and preview text lines.
  4. Extract code anchor info when present: address, function, segment.
  5. If has_address: false, explain limits and do not invent code context.

Widget Fields (focused_widget / main_viewer)

  • type_id (int): raw IDA twidget_type_t numeric id.
  • type_name (string): the SDK macro name for the widget on the building SDK (for example "BWN_PSEUDOCODE", "BWN_TILIST"). The name at SDK slot 10 differs by IDA version (BWN_TILVIEW / BWN_TICSR / BWN_TITREE).
  • canonical_name (string): a stable cross-version name. For the "Local Types" widget (slot 10) this always reads "BWN_LOCAL_TYPES"; for every other widget it equals type_name. Prefer this for cross-version reasoning.
  • category (string): high-level grouping — one of disassembly, decompiler, hex_view, type_view, chooser, debugger, navigation, output, script, auxiliary, unknown.
  • is_address (bool): widget exposes a meaningful address anchor (true for DISASM, HEXVIEW, PSEUDOCODE, MICROCODE).
  • is_custom_view (bool): viewer-style widget with custom line content.
  • is_chooser_like (bool): row-based list/chooser widget where row selection is meaningful.
  • title (string): the widget's title as IDA reports it.

main_viewer carries the same widget fields except is_chooser_like (the main viewer is always a viewer, not a chooser).


Temporal Reference Rules

  • this / here / current / selected: capture a fresh snapshot for this question.
  • that / previous / earlier: reuse the most recent snapshot in the same working flow.
  • If the user says "refresh", capture a new snapshot immediately.

Runtime Availability and Fallback

  • get_ui_context_json() is registered in every runtime, but only the IDA GUI plugin returns live UI state.
  • The live GUI envelope carries available:true; the idalib/CLI stub carries available:false / capture.source:"cli" (no error, just no UI). So available is the reliable GUI-vs-CLI discriminator in both directions — key on it.
  • When you get the CLI stub, state this clearly and continue with non-UI queries (explicit addresses/symbols, or DB-orientation queries).

binary is database metadata only; it is not a UI context replacement.


Response Template

Use this fixed shape after reading UI context:

  • What You Are Viewing: widget/view summary.
  • What Is Selected: selection range and preview (or "no active selection").
  • Code Context: address/function/segment if available; otherwise mention non-address view.
  • Limits: runtime constraints or missing fields affecting certainty.
  • Suggested Next Query: one concrete follow-up command/query.

Examples

1) "What am I looking at?"

sql
SELECT get_ui_context_json();

Answer with the template fields above. Include focused widget title/type and current anchor address if present.

2) "Look at what I'm doing"

sql
SELECT get_ui_context_json();

Summarize active view and selection first, then propose the next action tied to that context (for example, decompile current function).

3) "What's selected right now?"

sql
SELECT get_ui_context_json();

Prioritize selection begin/end and preview text. Explicitly state when there is no active selection.

4) "Explain this function"

  1. Capture UI context.
  2. If function/address context exists, pivot to decompiler.
sql
SELECT get_ui_context_json();
SELECT decompile(0x401000);

Replace 0x401000 with the captured function/address anchor.

5) Follow-up: "What about that function?"

Reuse the most recent snapshot from the same flow (do not auto-refresh unless asked), then continue analysis from that stored anchor.

6) Non-address view (for example Local Types chooser)

sql
SELECT get_ui_context_json();

If has_address: false, report chooser selection details and state there is no code address anchor in this view.

7) Plugin API unavailable (CLI/idalib)

If get_ui_context_json() cannot run:

  • state that UI context is unavailable in this runtime
  • ask for explicit symbol/address or continue with non-UI alternatives (for example SELECT * FROM binary for DB orientation)

Guardrails

  • Do not treat binary output as UI context.
  • Do not fabricate selection/address fields when absent.
  • Do not recapture repeatedly in one answer unless user asks for refresh.

See also

  • deep-links — the other direction: move the user's IDA to a result (SELECT ida_open_link(...)), and make answers clickable with [name](uri) links.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Ui Context AI skill do?

Capture live IDA UI context. Use when the user references what's on screen, what's selected, or asks about the current view in IDA's GUI.

Why use Ui Context on TypingMind?

Because you install it once and use it with any model. Ui Context is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ui Context in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/allthingsida/idasql-skills/tree/main/plugins/idasql/skills/ui-context. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Ui Context?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ui Context?

As many as you like. As long as a model supports skills, you can use Ui Context with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ui Context AI skill free?

It is published on GitHub by allthingsida. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇