agentsclimarketplace

Tsqlapp navigator

Skill rhodelta66/tsqlapp-skills/tsqlapp-navigator

Navigate and understand TSQL.APP applications through metadata queries. Use when users share TSQL.APP URLs, ask about cards/screens, want to understand available actions/buttons/filters, explore parent-child relationships, or need to locate features in a TSQL.APP application. This skill parses URLs into application state and queries the meta database to explain what the user is seeing and what they can do.From its SKILL.md

Install
npx -y skills add rhodelta66/tsqlapp-skills --skill tsqlapp-navigator

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.3 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it

TSQL.APP Navigator

Navigate TSQL.APP applications by querying the metadata database. Parse URLs, discover actions, and explain application state.

Two-Database Architecture

Every TSQL.APP application = 2 databases:

DatabasePurposeContains
{app}Business dataTables, views, stored procedures
{app}_projApplication definitionCards, fields, actions, children

MCP connects to {app}_proj. Get business DB name: SELECT dbo.main_db()

URL Pattern

https://{domain}/{card}[/{parent_id}/{child_card}]?[ord={field_id}[d]][,{field_id}][&red={filter_name}][&id={record_id}]
ParameterExampleMeaning
{card}incoming_invoiceCard name (path)
{parent_id}142338Parent record ID (child context)
{child_card}invrow_1Child card name
ord18377dSort field ID, d=descending
ord32408,30233Multi-field sort
redDraft+%2F+EmptyActive filter (URL encoded)
id142338Selected record ID

Core Meta Tables

api_card

SELECT id, name, tablename, basetable, reducer FROM api_card WHERE name = @card_name
  • tablename = READ (view for display)
  • basetable = WRITE (table for CRUD)

api_card_fields

SELECT id, name, list_order FROM api_card_fields WHERE card_id = @card_id
  • id = field ID used in ord URL parameter

api_card_actions

SELECT id, name, display_name, action, keycode, group_id, type, disabled
FROM api_card_actions WHERE card_id = @card_id
  • action = 'stored_procedure' (button) or 'reducer' (filter)
  • keycode = keyboard shortcut
  • group_id = parent sub-menu (NULL = top level)
  • type = 'list', 'form', 'list_form', 'hidden'

api_card_children

SELECT child, ref, keycode, unbound, reducer, is_hidden, group_id
FROM api_card_children WHERE parent = @card_id
  • keycode = navigation shortcut (e.g., 'Enter')
  • ref = FK column linking parent to child
  • unbound = 0 (filter by ref) or 1 (custom reducer)

Action Hierarchy

Card
├── Top-level (group_id IS NULL)
│   ├── Buttons (action='stored_procedure')
│   ├── Filters (action='reducer')
│   └── Sub-menus (referenced as group_id)
└── Sub-menu contents (group_id = sub-menu.id)

Keyboard sequence: {submenu_keycode}{action_keycode}

Standard Queries

Parse URL

-- Card info
SELECT id, name, tablename, basetable FROM api_card WHERE name = @card_name

-- Sort field (from ord parameter)
SELECT name FROM api_card_fields WHERE id = @field_id

-- Filter (from red parameter, URL decoded)
SELECT id, sql FROM api_card_actions 
WHERE card_id = @card_id AND name = @filter_name AND action = 'reducer'

List All Actions with Shortcuts

SELECT 
    CASE WHEN g.keycode IS NOT NULL 
         THEN CONCAT(g.keycode, ' → ', ISNULL(a.keycode, '-'))
         ELSE ISNULL(a.keycode, '-')
    END as shortcut,
    a.name,
    CASE a.action WHEN 'reducer' THEN 'filter' ELSE 'button' END as type,
    a.disabled
FROM api_card_actions a
LEFT JOIN api_card_actions g ON a.group_id = g.id
WHERE a.card_id = @card_id
ORDER BY COALESCE(a.group_id, 0), a.action_order

List Children with Navigation

SELECT 
    acc.keycode,
    c.name as child_card,
    acc.ref as link_column,
    CASE acc.unbound WHEN 1 THEN 'custom' ELSE 'bound' END as filter_type
FROM api_card_children acc
JOIN api_card c ON acc.child = c.id
WHERE acc.parent = @card_id AND ISNULL(acc.is_hidden, 0) = 0
ORDER BY acc.keycode

Find What Enter Does

SELECT c.name as child_card, acc.ref
FROM api_card_children acc
JOIN api_card c ON acc.child = c.id
WHERE acc.parent = @card_id AND acc.keycode = 'Enter'

Predict Next URL (Child Navigation)

-- Current: /{card}?id={record_id}
-- After Enter: /{card}/{record_id}/{child_card}
SELECT CONCAT('/', @card, '/', @record_id, '/', c.name) as next_url
FROM api_card_children acc
JOIN api_card c ON acc.child = c.id
WHERE acc.parent = @card_id AND acc.keycode = 'Enter'

Response Pattern

When user shares URL:

  1. Parse - Extract card, parent/child, sort, filter, selection
  2. Query - Look up card, fields, actions, children in metadata
  3. Explain - Current view, active filter, selected record
  4. List - Available actions with keyboard shortcuts
  5. Predict - What happens on common keys (Enter, etc.)

Critical Rules

  1. Do NOT guess - Query metadata for exact values
  2. URL is state - Every URL is a complete deep link
  3. Metadata is truth - If it's in the meta tables, it's accurate
  4. Actions have hierarchy - Check group_id for sub-menus
  5. Children have shortcuts - Check api_card_children.keycode

Reference

For detailed architecture and examples, see references/architecture.md.

What ships with it: 2 files

16.7 KB alongside SKILL.md, 1 of them executable

references/

scripts/

Keep looking

Skills are one crate of 326,861. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.