Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

iterm2-layoutiterm2 布局

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

1,886

周安装

81

GitHub Stars

38

下载量

661
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:iterm2-layout(iterm2 布局)
来源仓库:https://github.com/terrylica/cc-skills
仓库路径:skills/iterm2-layout
安装命令:
npx skills add https://github.com/terrylica/cc-skills --skill iterm2-layout
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/terrylica/cc-skills --skill iterm2-layout

简介

用于辅助界面设计、视觉规范和布局优化。iterm2-layout 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 适合整理页面结构、生成 UI 方案或检查视觉一致性。
  • 使用时需结合现有品牌、设计系统和用户任务,避免堆装饰元素。
  • 涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出和对齐。
  • 安装前建议确认权限范围和维护状态,以及是否会触发联网或文件读写。

SKILL.md

iTerm2 Layout Configuration

Configure iTerm2 workspace layouts with proper separation of concerns: private paths in TOML config, publishable code in Python script.

Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.

When to Use This Skill

Use this skill when:

  • Configuring iTerm2 workspace layouts
  • Adding, removing, or modifying workspace tabs
  • Setting up AutoLaunch scripts for iTerm2
  • Configuring git worktree tab auto-discovery

Configuration Overview

File Locations

FileLocationPurpose
Config (private)~/.config/iterm2/layout.tomlUser's workspace paths
Script (public)~/scripts/iterm2/default-layout.pyLayout logic
Template~/scripts/iterm2/layout.example.tomlExample config

Config File Format

# ~/.config/iterm2/layout.toml

[layout]
left_pane_ratio = 0.20    # 0.0 to 1.0
settle_time = 0.3         # seconds

[commands]
left = "br --sort-by-type-dirs-first"
right = "zsh"

[worktrees]
# Optional: Enable git worktree discovery
# main_repo_root = "~/projects/my-project"
# worktree_pattern = "my-project.worktree-*"

[[tabs]]
name = "home"
dir = "~"

[[tabs]]
name = "projects"
dir = "~/projects"

[[tabs]]
dir = "~/Documents"  # name defaults to "Documents"

Setup Instructions

First-Time Setup

/usr/bin/env bash << 'CONFIG_EOF'
# 1. Ensure config directory exists
mkdir -p ~/.config/iterm2

# 2. Copy template
cp ~/scripts/iterm2/layout.example.toml ~/.config/iterm2/layout.toml

# 3. Edit with your workspace paths
# Add [[tabs]] entries for each workspace

# 4. Restart iTerm2 to test
CONFIG_EOF

Adding a New Tab

Add a [[tabs]] entry to ~/.config/iterm2/layout.toml:

[[tabs]]
name = "MyProject"  # Tab display name (optional)
dir = "~/path/to/project"

Name field:

  • If omitted, uses directory basename
  • Custom names useful for abbreviations (e.g., "AF" instead of "alpha-forge")

Removing a Tab

Delete or comment out the [[tabs]] entry:

# [[tabs]]
# name = "OldProject"
# dir = "~/old/project"

Configuration Schema

SectionKeyTypeDefaultDescription
[layout]left_pane_ratiofloat0.20Left pane width (0.0-1.0)
[layout]settle_timefloat0.3Wait after cd (seconds)
[commands]leftstringbr...Left pane command
[commands]rightstringzshRight pane command
[worktrees]alpha_forge_rootstringnullWorktree root (optional)
[worktrees]worktree_patternstring*.worktree-*Glob pattern
[[tabs]]dirstringrequiredDirectory path
[[tabs]]namestringbasenameTab display name

Troubleshooting

Error: "Layout configuration not found"

Symptom: Script Console shows error about missing config

Solution:

# Create config from template
cp ~/scripts/iterm2/layout.example.toml ~/.config/iterm2/layout.toml

Error: "Invalid TOML syntax"

Symptom: Script Console shows TOML parse error

Solution:

  1. Check TOML syntax (quotes, brackets)
  2. Validate with: python3 -c "import tomllib; tomllib.load(open('~/.config/iterm2/layout.toml', 'rb'))"

Tabs Not Appearing

Symptom: iTerm2 opens but no custom tabs created

Causes:

  1. No [[tabs]] entries in config
  2. Config file in wrong location
  3. Script not in AutoLaunch

Solution:

# Verify config location
ls -la ~/.config/iterm2/layout.toml

# Verify AutoLaunch symlink
ls -la ~/Library/Application\ Support/iTerm2/Scripts/AutoLaunch/

# Check Script Console for errors
# iTerm2 > Scripts > Manage > Console

Directory Does Not Exist Warning

Symptom: Tab skipped with warning in Script Console

Solution: Verify directory path exists or create it:

mkdir -p ~/path/to/missing/directory

Error Handling Behavior

The script uses "print + early return" pattern:

  1. Missing config: Logs instructions to Script Console, exits cleanly
  2. Invalid TOML: Logs parse error with details, exits cleanly
  3. Missing directory: Logs warning, skips tab, continues with others

Viewing errors: Scripts > Manage > Console in iTerm2

Git Worktree Detection (Optional)

Enable dynamic tab creation for git worktrees:

[worktrees]
main_repo_root = "~/projects/my-project"
worktree_pattern = "my-project.worktree-*"

How it works:

  1. Script globs for ~/projects/my-project.worktree-* directories
  2. Validates each against git worktree list
  3. Generates acronym-based tab names (e.g., AF-ssv for sharpe-statistical-validation)
  4. Inserts worktree tabs after main project tab

References

Post-Execution Reflection

After this skill completes, check before closing:

  1. Did the command succeed? — If not, fix the instruction or error table that caused the failure.
  2. Did parameters or output change? — If the underlying tool's interface drifted, update Usage examples and Parameters table to match.
  3. Was a workaround needed? — If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround.

Only update if the issue is real and reproducible — not speculative.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.06%
按下载量换算192

OpenCode

21.54%
按下载量换算142

Antigravity

17.83%
按下载量换算118

Gemini CLI

13.26%
按下载量换算88

windsurf

7.84%
按下载量换算52

trae

3.35%
按下载量换算22

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills