AGENT SKILL

技能显示切换

gsd-surface

切换对外显示的技能——无需重新安装即可应用某个配置档(profile)、列出或禁用一组技能

适用职业AI 工程师
License 许可
MIT
最近更新
2026-11-09
Stars
★ 1
Forks
0

01 前言 Front Matter

name
gsd-surface
description
Toggle which skills are surfaced — apply a profile, list, or disable a cluster without reinstall

03 SKILL.md 正文

<cursor_skill_adapter>

A. Skill Invocation

  • This skill is invoked when the user mentions gsd-surface or describes a task matching this skill.
  • Treat all user text after the skill mention as {{GSD_ARGS}}.
  • If no arguments are present, treat {{GSD_ARGS}} as empty.

B. User Prompting

When the workflow needs user input, prompt the user conversationally:

  • Present options as a numbered list in your response text
  • Ask the user to reply with their choice
  • For multi-select, ask for comma-separated numbers

C. Tool Usage

Use these Cursor tools when executing GSD workflows:

  • Shell for running commands (terminal operations)
  • StrReplace for editing existing files
  • Read, Write, Glob, Grep, Task, WebSearch, WebFetch, TodoWrite as needed

D. Subagent Spawning

When the workflow needs to spawn a subagent:

  • Use Task(subagent_type="generalPurpose", ...)
  • The model parameter maps to Cursor's model options (e.g., "fast") </cursor_skill_adapter>

<objective> Manage the runtime skill surface without reinstall. Reads/writes /Users/igorganapolsky/workspace/git/igor/Random-Timer/.claude/worktrees/opengsd-gsd-core/.cursor/.gsd-surface.json (sibling to /Users/igorganapolsky/workspace/git/igor/Random-Timer/.claude/worktrees/opengsd-gsd-core/.cursor/.gsd-profile) and re-stages the active skills directory in place. Skill dirs live at /Users/igorganapolsky/workspace/git/igor/Random-Timer/.claude/worktrees/opengsd-gsd-core/.cursor/skills/gsd-*/.

Sub-commands: list · status · profile · disable · enable · reset </objective>

Sub-command routing

Parse the first token of {{GSD_ARGS}}:

Token Action
list Show enabled + disabled clusters and skills
status Alias for list plus token cost summary
profile <name> Write baseProfile and re-stage
profile <n1>,<n2> Composed profiles (comma-separated, no spaces)
disable <cluster> Add cluster to disabledClusters, re-stage
enable <cluster> Remove cluster from disabledClusters, re-stage
reset Delete .gsd-surface.json, return to install-time profile
(none) Treat as list

list / status

Load the capability registry and call listSurface(runtimeConfigDir, manifest, CLUSTERS, registry) from the engine module at ${runtimeConfigDir}/gsd-core/bin/lib/surface.cjs. The registry is loaded via:

const registry = require(runtimeConfigDir + '/gsd-core/bin/lib/capability-registry.cjs');

Display:

Enabled (N skills, ~T tokens):
  core_loop:   new-project  discuss-phase  plan-phase  execute-phase  help  update
  audit_review: …
  …

Disabled:
  utility:  health  stats  settings  …

Token cost: ~T (budget cap ~500 tokens for 200k context @ 1%)

For status also append:

Base profile:   standard  (from .gsd-surface.json)
Install profile: standard  (from .gsd-profile)

Mutation protocol

Derive the next surfaceState in memory and pass it to applySurface as opts.surfaceState. Do not call writeSurface first: applySurface stages all artifact kinds before mutation and publishes the candidate state only after materialization succeeds. Pass null to reset to the install-time profile.


profile <name>

  1. Read current surface: readSurface(runtimeConfigDir) → if null, seed from readActiveProfile(runtimeConfigDir).
  2. Set surfaceState.baseProfile = name.
  3. Keep the new state in memory; do not write it directly.
  4. Resolve and re-apply:
    const registry = require(runtimeConfigDir + '/gsd-core/bin/lib/capability-registry.cjs');
    const layout = resolveRuntimeArtifactLayout(runtime, runtimeConfigDir, scope);
    applySurface(runtimeConfigDir, layout, manifest, CLUSTERS, registry, { surfaceState });
    
  5. Confirm: "Surface updated to profile <name>. N skills enabled."

disable <cluster>

Valid cluster names: core_loop, audit_review, milestone, research_ideate, workspace_state, docs, ui, ai_eval, ns_meta, utility.

  1. Validate cluster name against Object.keys(CLUSTERS).
  2. Read or initialize surface state.
  3. Add cluster to surfaceState.disabledClusters (deduplicate).
  4. Resolve layout and apply the in-memory candidate:
    const registry = require(runtimeConfigDir + '/gsd-core/bin/lib/capability-registry.cjs');
    const layout = resolveRuntimeArtifactLayout(runtime, runtimeConfigDir, scope);
    applySurface(runtimeConfigDir, layout, manifest, CLUSTERS, registry, { surfaceState });
    
  5. Confirm: "Disabled cluster <cluster>. N skills removed from surface."

enable <cluster>

  1. Read surface state; if null, nothing to enable — print "No surface delta active."
  2. Remove cluster from surfaceState.disabledClusters.
  3. Resolve layout and apply the in-memory candidate:
    const registry = require(runtimeConfigDir + '/gsd-core/bin/lib/capability-registry.cjs');
    const layout = resolveRuntimeArtifactLayout(runtime, runtimeConfigDir, scope);
    applySurface(runtimeConfigDir, layout, manifest, CLUSTERS, registry, { surfaceState });
    
  4. Confirm: "Enabled cluster <cluster>. N skills added back to surface."

reset

  1. Check if .gsd-surface.json exists.
  2. Do not delete it directly.
  3. Re-apply with { surfaceState: null }; the state file is removed only after the install-time profile materializes successfully.
  4. Confirm: "Surface reset to install-time profile <name>."

runtimeConfigDir resolution

The runtimeConfigDir for applySurface is the base Claude config directory (/Users/igorganapolsky/workspace/git/igor/Random-Timer/.claude/worktrees/opengsd-gsd-core/.cursor), NOT the skills sub-directory (/Users/igorganapolsky/workspace/git/igor/Random-Timer/.claude/worktrees/opengsd-gsd-core/.cursor/skills).

This matches installRuntimeArtifacts and uninstallRuntimeArtifacts, which also receive /Users/igorganapolsky/workspace/git/igor/Random-Timer/.claude/worktrees/opengsd-gsd-core/.cursor as configDir. The skill dirs themselves live at /Users/igorganapolsky/workspace/git/igor/Random-Timer/.claude/worktrees/opengsd-gsd-core/.cursor/skills/gsd-*/ because the claude global layout has destSubpath = 'skills' — they are derived from configDir, not the root for it.

# Cursor — global install
RUNTIME_CONFIG_DIR="${CLAUDE_CONFIG_DIR:-/Users/igorganapolsky/workspace/git/igor/Random-Timer/.claude/worktrees/opengsd-gsd-core/.cursor}"
SCOPE="global"

# Artifact destinations are derived from runtime layout
# via resolveRuntimeArtifactLayout(runtime, RUNTIME_CONFIG_DIR, SCOPE)
# then applySurface(RUNTIME_CONFIG_DIR, layout, manifest, CLUSTERS)

Surface state is stored at ${RUNTIME_CONFIG_DIR}/.gsd-surface.json (i.e. /Users/igorganapolsky/workspace/git/igor/Random-Timer/.claude/worktrees/opengsd-gsd-core/.cursor/.gsd-surface.json).

All paths can be overridden by reading the CLAUDE_CONFIG_DIR env var if set.


Error handling

  • Unknown cluster name → list valid cluster names, exit without writing.
  • Unknown profile name → list known profiles (core, standard, full), exit.
  • Missing surface.cjs → prompt: "Run npm i -g @opengsd/gsd-core to reinstall GSD."

<execution_context> Surface state file: /Users/igorganapolsky/workspace/git/igor/Random-Timer/.claude/worktrees/opengsd-gsd-core/.cursor/.gsd-surface.json Install profile marker: /Users/igorganapolsky/workspace/git/igor/Random-Timer/.claude/worktrees/opengsd-gsd-core/.cursor/.gsd-profile Skill dirs: /Users/igorganapolsky/workspace/git/igor/Random-Timer/.claude/worktrees/opengsd-gsd-core/.cursor/skills/gsd-*/ Engine module: /Users/igorganapolsky/workspace/git/igor/Random-Timer/.claude/worktrees/opengsd-gsd-core/.cursor/gsd-core/bin/lib/surface.cjs Cluster definitions: /Users/igorganapolsky/workspace/git/igor/Random-Timer/.claude/worktrees/opengsd-gsd-core/.cursor/gsd-core/bin/lib/clusters.cjs </execution_context>

04 同仓库更多 Skills

IgorGanapolsky
IgorGanapolsky/Random-Timer

任务实施计划编写

writing-plans

当你有某个多步骤任务的规格说明或需求时,在动手编写代码之前使用。

软件开发工程师任务规划与分解
★ 1
IgorGanapolsky
IgorGanapolsky/Random-Timer

AI 工作流经济性评估

workflow-economics-lite

逃离 AI 试点炼狱:要求构建闭环(completion-loop)工作流,包含单一负责人、基线、经济指标、记录系统(system-of-record)集成和审计轨迹。阻断孤立的聊天机器人以及将“兴趣”当作 ROI 的说法。

产品经理业务流程设计与优化
★ 1
IgorGanapolsky
IgorGanapolsky/Random-Timer

完成前验证确认

verification-before-completion

当准备声称工作已完成、已修复或已通过时,在提交或创建 PR 之前使用——要求在做出任何成功声明之前先运行验证命令并确认输出;始终遵循“证据先于断言”。

软件开发工程师测试与质量保障
★ 1
IgorGanapolsky
IgorGanapolsky/Random-Timer

价值中心五问评估

value-center-lite

应用 InfoQ Rohrer 的价值中心 / VSM 五问法(自主性 + 一致性)。在规划工作、发布版本或审计智能体自主性声明时使用。对于没有 WQTU/付费墙价值的纯产品口号,采取 fail closed(默认拒绝)的严格判定。

产品经理成果验证与价值评估
★ 1
IgorGanapolsky
IgorGanapolsky/Random-Timer

技能发现与调用规范

using-superpowers

在每次对话开始时使用——建立如何查找和使用技能的方法,要求在任何回应(包括澄清性问题)之前都必须先调用技能。

AI 工程师插件与技能管理
★ 1
IgorGanapolsky
IgorGanapolsky/Random-Timer

Git 工作树隔离开发

using-git-worktrees

在开始需要与当前工作区隔离的功能开发时,或在实施计划执行前使用——通过原生工具或 git worktree 回退机制确保存在隔离的工作区。

软件开发工程师代码仓库协作管理
★ 1