AGENT SKILL

spacelayout-operator

Manage context-space tabs, groups, and pane layouts.

License 许可
AGPL-3.0
所属仓库
tabtin-ai/TabTin
最近更新
2026-10-08
Stars
★ 454
Forks
115

01 前言 Front Matter

name
spacelayout-operator
metadata
{ "tabtin": { "tags": [ "layout", "workspace", "tabs" ], "category": "developer", "displayName": "Space Layout Operator" }, "version": "0.1.0" }
description
Manage context-space tabs, groups, and pane layouts.

03 SKILL.md 正文

Space Layout Operator

Use this skill when the task requires managing the user's workspace layout — opening, closing, or rearranging context tabs and split-pane groups.

Tool Overview

Tool Purpose
list_context_space List all tabs, groups, and layout state for a project
set_active_context_tab Activate a specific tab (bring it to focus)
close_context_tab Close a tab and get the next active tab
restore_context_group Ungroup a split-pane group back into individual tabs
assign_pane_content Place a tab's content into a specific pane
split_pane_with_tab Split an existing pane and insert a tab beside it
move_pane Move a pane to a new position within a group
dock_pane Dock a pane to a group edge (left/right/top/bottom)

Key Concepts

  • Tab — a single content unit in the context space (table, browser, terminal, etc.), identified by a tabKey.
  • Group — a container that holds one or more panes in a split layout, identified by a groupId.
  • Pane — a slot within a group that displays one tab's content, identified by a paneId.
  • Layout — the tree structure describing how panes are split (horizontal/vertical) within a group.

Workflow Patterns

Pattern 1 — Inspect Current Layout

  1. list_context_space with the spaceId.
  2. Read the response: tabs[] for all open tabs, groups[] for split-pane arrangements, activeTabKey for the focused tab.

Pattern 2 — Focus a Tab

  1. set_active_context_tab with spaceId and tabKey.
  2. Optionally pass paneId to focus a specific pane within a group.

Pattern 3 — Build a Side-by-Side Layout

To display two tabs side by side:

  1. list_context_space to get current tabs and their tabKeys.
  2. split_pane_with_tab — pick an existing paneId, choose side: "right" (or "left", "top", "bottom"), and provide the tabKey to place in the new pane.

Pattern 4 — Rearrange Panes

  • move_pane — reorder panes within a group by specifying sourcePaneId, targetPaneId, and side.
  • dock_pane — push a pane to the edge of a group (e.g., dock to "bottom" for a console-like layout).

Pattern 5 — Clean Up

  • close_context_tab to close tabs that are no longer needed.
  • restore_context_group to flatten a group back into separate tabs.

Rules

  • Always call list_context_space first to get valid tabKey, groupId, and paneId values — never guess these identifiers.
  • When splitting panes, the tabKey must refer to a tab that is not already assigned to another pane in the same group.
  • After closing a tab, check the nextActiveTabKey in the response to know which tab is now focused.
  • Layout operations are Space-scoped — always provide the correct spaceId.
  • Prefer split_pane_with_tab for building layouts from scratch; use move_pane and dock_pane for rearranging existing layouts.

Safety

  • Closing a tab may discard unsaved state in that tab's content (e.g., an unsaved terminal session).
  • restore_context_group is non-destructive — it preserves all tab content, only flattening the visual layout.
  • Do not close tabs programmatically without confirming with the user if the tab may contain unsaved work.

04 同仓库更多 Skills

tabtin-ai
tabtin-ai/TabTin

tabtracker

管理自动化任务——创建、列出、暂停、恢复、立即触发(产品模块名「自动化」, 具体条目称「自动化任务」;CLI 命令仍为 tabtin tracker)。当用户表达"派活"意图时使用: 关键词包括"帮我..."、"以后..."、"每天..."、"工作日..."、 "提醒我..."、"定时..."、"每周..."。区分一次性指令(直接执行)和长期任务(创建 自动化任务,由调度器在指定时间唤起 Agent)。

★ 454
tabtin-ai
tabtin-ai/TabTin

tabtin-project

在 Project Task 执行会话中工作:先读取当前任务工作面,再优先修改既有中间产物。 当系统上下文表明当前会话是 Project Task,或用户要求继续修改过程中的中间产物时使用。

★ 454
tabtin-ai
tabtin-ai/TabTin

skill-market

管理 Skill 生命周期——列出已装、看详情、搜索市场、 安装、卸载、启用、禁用、更新。当用户表达"装个技能 / 卸载技能 / 看看有什么技能 / 启用禁用技能"意图时使用。

★ 454
tabtin-ai
tabtin-ai/TabTin

tabtin-widget

渲染可视化组件——用 show_widget 编译 SVG / HTML(no-script) / Mermaid 图做自由可视化。内容能落 present_to_user 4 类 kind → 不用 widget;长期可编辑产物 → TabData/ TabDoc/TabSlide。

★ 454
tabtin-ai
tabtin-ai/TabTin

resource-link

插入资源链接——在 chat 文字流里给资源链接,markdown link 形态 [显示文本](tabtin://resource/<type>/<id>?hint=<carrierApp>), 用户点击直接在 Space 内打开。行业格式(http/https/ file/mailto)也兼容;不要写 file:// 让用户自己复制粘贴。

★ 454
tabtin-ai
tabtin-ai/TabTin

mcp-operations

操作本机 MCP 连接——通过 `tabtin mcp` CLI 查看当前 Space 已挂载的本机 MCP servers、tools/resources/ prompts,并用 `mcp_call_tool` 调用指定 MCP tool。 用户提到"使用 Playwright MCP""调用本机安装的 MCP 工具""读取某个 MCP resource""获取某个 MCP prompt"时激活。

★ 454