npx skills add https://github.com/mindfold-ai/trellis --skill trellis-meta| 项目 | 值 |
|---|---|
| Trellis CLI 版本 | 0.3.0 |
| 技能最后更新 | 2026-02-28 |
| 最低 Claude Code 版本 | 1.0.0+ |
⚠️ 版本不匹配警告:如果你的 Trellis CLI 版本与上述不同,某些功能可能无法按文档所述工作。运行
trellis --version来检查。
| 功能 | Claude Code | iFlow | Cursor | OpenCode | Codex |
|---|
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| Kilo |
|---|
| Kiro |
|---|
| Gemini CLI |
|---|
| Antigravity |
|---|
| 核心系统 | |||||||||
| 工作区系统 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 完整 |
| 任务系统 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 完整 |
| 规范系统 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 完整 |
| 命令/技能 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 完整 | ✅ 技能 | ✅ 完整 | ✅ 技能 | ✅ TOML | ✅ 工作流 |
| 智能体定义 | ✅ 完整 | ✅ 完整 | ⚠️ 手动 | ✅ 完整 | ⚠️ 手动 | ⚠️ 手动 | ⚠️ 手动 | ⚠️ 手动 | ⚠️ 手动 |
| 钩子依赖功能 | |||||||||
| SessionStart 钩子 | ✅ 完整 | ✅ 完整 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 |
| PreToolUse 钩子 | ✅ 完整 | ✅ 完整 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 |
| SubagentStop 钩子 | ✅ 完整 | ✅ 完整 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 |
| 自动上下文注入 | ✅ 完整 | ✅ 完整 | ❌ 手动 | ❌ 手动 | ❌ 手动 | ❌ 手动 | ❌ 手动 | ❌ 手动 | ❌ 手动 |
| Ralph 循环 | ✅ 完整 | ✅ 完整 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 |
| 多智能体/会话 | |||||||||
| 多智能体(当前目录) | ✅ 完整 | ✅ 完整 | ⚠️ 有限 | ⚠️ 有限 | ⚠️ 有限 | ⚠️ 有限 | ⚠️ 有限 | ⚠️ 有限 | ⚠️ 有限 |
| 多会话(工作树) | ✅ 完整 | ✅ 完整 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 | ❌ 无 |
所有功能按文档所述工作。钩子提供自动上下文注入和质量保证。iFlow 与 Claude Code 共享相同的 Python 钩子系统。
定制 Trellis 时,请考虑平台兼容性:
┌─────────────────────────────────────────────────────────────┐
│ 可移植(所有 9 个平台) │
│ - .trellis/workspace/ - .trellis/tasks/ │
│ - .trellis/spec/ - 平台命令/技能 │
│ - 基于文件的配置 - JSONL 上下文文件 │
└─────────────────────────────────────────────────────────────┘
│
┌─────────────────────────────▼───────────────────────────────┐
│ 支持钩子(Claude Code + iFlow) │
│ - .claude/hooks/ 或 .iflow/hooks/ │
│ - settings.json 钩子配置 │
│ - 自动上下文注入 - SubagentStop 控制 │
│ - Ralph 循环 - 多会话工作树 │
└─────────────────────────────────────────────────────────────┘
这是 Trellis 的元技能——它记录了原始的、未经修改的 Trellis 系统。当为特定项目定制 Trellis 时,请在项目本地技能(trellis-local)中记录更改,将此元技能作为原始 Trellis 的权威参考。
~/.claude/skills/
└── trellis-meta/ # 本技能 - 原始 Trellis 文档
# ⚠️ 请勿为项目特定更改修改此处
project/.claude/skills/
└── trellis-local/ # 项目特定定制
# ✅ 在此处记录所有修改
为何如此分离?
trellis-local 技能跟踪其自身的修改为项目修改 Trellis 时,请遵循此协议:
# 查找项目本地技能
ls -la .claude/skills/trellis-local/
如果不存在 trellis-local,则创建它:
mkdir -p .claude/skills/trellis-local
然后创建 .claude/skills/trellis-local/SKILL.md:
---
name: trellis-local
description: |
[项目名称] 的 Trellis 项目特定定制。
此技能记录了在此项目中对原始 Trellis 系统所做的修改。
继承自 trellis-meta 以获取基础文档。
---
# Trellis 本地 - [项目名称]
## 基础版本
Trellis 版本:X.X.X(来自 package.json 或 trellis --version)
初始化日期:YYYY-MM-DD
## 定制
### 添加的命令
(尚无)
### 修改的智能体
(尚无)
### 更改的钩子
(尚无)
### 定制的规范
(尚无)
### 工作流更改
(尚无)
---
## 变更日志
### YYYY-MM-DD
- 初始设置
对 Trellis 进行任何更改时,更新 trellis-local/SKILL.md:
### 添加的命令
#### /trellis:my-command
- **文件**:`.claude/commands/trellis/my-command.md`
- **目的**:[它的作用]
- **添加日期**:2026-01-31
- **原因**:[添加原因]
### 更改的钩子
#### inject-subagent-context.py
- **更改**:添加了对 `my-agent` 类型的支持
- **修改行**:45-67
- **日期**:2026-01-31
- **原因**:[原因]
trellis-meta 技能仅应在以下情况下更新:
Trellis 通过强制上下文注入将 AI 助手转变为结构化的开发伙伴。
┌─────────────────────────────────────────────────────────────────────┐
│ 用户交互 │
│ /trellis:start /trellis:brainstorm /trellis:parallel /trellis:finish-work │
└─────────────────────────────────┬───────────────────────────────────┘
│
┌─────────────────────────────────▼───────────────────────────────────┐
│ 技能层 │
│ .claude/commands/trellis/*.md (斜杠命令) │
│ .claude/agents/*.md (子智能体定义) │
└─────────────────────────────────┬───────────────────────────────────┘
│
┌─────────────────────────────────▼───────────────────────────────────┐
│ 钩子层 │
│ SessionStart → session-start.py (注入工作流 + 上下文) │
│ PreToolUse:Task → inject-subagent-context.py (规范注入) │
│ SubagentStop → ralph-loop.py (质量保证) │
└─────────────────────────────────┬───────────────────────────────────┘
│
┌─────────────────────────────────▼───────────────────────────────────┐
│ 持久层 │
│ .trellis/workspace/ (日志、会话历史) │
│ .trellis/tasks/ (任务跟踪、上下文文件) │
│ .trellis/spec/ (编码指南) │
└─────────────────────────────────────────────────────────────────────┘
| 原则 | 描述 |
|---|---|
| 规范注入,而非记忆 | 钩子强制执行规范——智能体始终接收上下文 |
| 先读后写 | 在编写代码前理解指南 |
| 分层上下文 | 仅加载相关规范(通过 JSONL 文件) |
| 人工提交 | AI 从不提交——人工首先验证 |
| 纯调度器 | 调度智能体仅负责编排 |
跨会话跟踪开发进度,实现按开发者隔离。
.trellis/workspace/
├── index.md # 全局概览
└── {developer}/ # 按开发者
├── index.md # 个人索引(@@@auto 标记)
└── journal-N.md # 会话日志(最多 2000 行)
关键文件:.trellis/.developer(身份标识),日志(会话历史)
跟踪工作项,基于阶段执行。
.trellis/tasks/{MM-DD-slug-assignee}/
├── task.json # 元数据、阶段、分支
├── prd.md # 需求
├── implement.jsonl # 实现智能体的上下文
├── check.jsonl # 检查智能体的上下文
└── debug.jsonl # 调试智能体的上下文
维护编码标准,这些标准会被注入到智能体。
.trellis/spec/
├── frontend/ # 前端指南
├── backend/ # 后端指南
└── guides/ # 思考指南
自动注入上下文并保证质量。
| 钩子 | 时机 | 目的 |
|---|---|---|
SessionStart | 会话开始时 | 注入工作流、指南 |
PreToolUse:Task | 子智能体使用前 | 通过 JSONL 注入规范 |
SubagentStop:check | 检查智能体停止时 | 强制执行验证(Ralph 循环) |
针对不同阶段的专用智能体。
| 智能体 | 目的 | 限制 |
|---|---|---|
dispatch | 编排流水线 | 纯调度器 |
plan | 评估需求 | 可以拒绝不明确的需求 |
research | 查找代码模式 | 只读 |
implement | 编写代码 | 不能 git 提交 |
check | 审查和自我修复 | 受 Ralph 循环控制 |
debug | 修复问题 | 仅精确修复 |
通过 Git 工作树运行并行隔离会话。
plan.py → start.py → Dispatch → implement → check → create-pr
.claude/commands/trellis/my-command.mdtrellis-local 技能中更新更改.claude/agents/my-agent.mdinject-subagent-context.py 以处理新的智能体类型my-agent.jsonltrellis-local 技能.claude/hooks/ 中的钩子脚本trellis-local 技能中记录更改.trellis/spec/my-category/ 中创建新类别index.md 和指南文件trellis-local 技能task.json 中的 next_action 数组trellis-local 技能中记录参考文档按平台兼容性组织:
references/
├── core/ # 所有平台(Claude Code、Cursor 等)
├── claude-code/ # 仅 Claude Code
├── how-to-modify/ # 修改指南
└── meta/ # 文档和模板
core/ - 所有平台| 文档 | 内容 |
|---|---|
overview.md | 核心系统介绍 |
files.md | 所有 .trellis/ 文件及其用途 |
workspace.md | 工作区系统、日志、开发者身份 |
tasks.md | 任务系统、目录、JSONL 上下文文件 |
specs.md | 规范系统、指南组织 |
scripts.md | 平台无关脚本 |
claude-code/ - 仅 Claude Code| 文档 | 内容 |
|---|---|
overview.md | Claude Code 功能介绍 |
hooks.md | 钩子系统、上下文注入 |
agents.md | 智能体类型、调用、Task 工具 |
ralph-loop.md | 质量保证机制 |
multi-session.md | 并行工作树会话 |
worktree-config.md | worktree.yaml 配置 |
scripts.md | 仅 Claude Code 脚本 |
how-to-modify/ - 修改指南| 文档 | 场景 |
|---|---|
overview.md | 所有修改的快速参考 |
add-command.md | 添加斜杠命令 |
add-agent.md | 添加新智能体类型 |
add-spec.md | 添加规范类别 |
add-phase.md | 添加工作流阶段 |
modify-hook.md | 修改钩子行为 |
change-verify.md | 更改验证命令 |
meta/ - 文档| 文档 | 内容 |
|---|---|
platform-compatibility.md | 详细的平台支持矩阵 |
self-iteration-guide.md | 如何记录定制 |
trellis-local-template.md | 项目本地技能模板 |
| 脚本 | 目的 |
|---|---|
get_context.py | 获取会话上下文 |
task.py | 任务管理 |
add_session.py | 记录会话 |
multi_agent/start.py | 启动并行智能体 |
| 路径 | 目的 |
|---|---|
.trellis/.developer | 开发者身份标识 |
.trellis/.current-task | 活动任务指针 |
.trellis/workflow.md | 主要工作流文档 |
.claude/settings.json | 钩子配置 |
将 Trellis 升级到新版本时:
trellis-local 是否存在冲突trellis-local 并添加迁移说明## 变更日志
### 2026-02-01 - 升级到 Trellis X.Y.Z
- 从元技能合并了新的钩子行为
- 保留了自定义智能体 `my-agent`
- 更新了 check.jsonl 模板
每周安装次数
84
仓库
GitHub 星标数
4.0K
首次出现
2026年2月10日
安全审计
安装于
codex81
gemini-cli80
amp80
kimi-cli80
github-copilot80
opencode80
| Item | Value |
|---|---|
| Trellis CLI Version | 0.3.0 |
| Skill Last Updated | 2026-02-28 |
| Min Claude Code Version | 1.0.0+ |
⚠️ Version Mismatch Warning : If your Trellis CLI version differs from above, some features may not work as documented. Run
trellis --versionto check.
| Feature | Claude Code | iFlow | Cursor | OpenCode | Codex | Kilo | Kiro | Gemini CLI | Antigravity |
|---|---|---|---|---|---|---|---|---|---|
| Core Systems | |||||||||
| Workspace system | ✅ Full | ✅ Full | ✅ Full | ✅ Full | ✅ Full | ✅ Full | ✅ Full | ✅ Full | ✅ Full |
| Task system | ✅ Full | ✅ Full | ✅ Full | ✅ Full | ✅ Full | ✅ Full | ✅ Full | ✅ Full | ✅ Full |
| Spec system | ✅ Full | ✅ Full | ✅ Full | ✅ Full | ✅ Full | ✅ Full | ✅ Full |
All features work as documented. Hooks provide automatic context injection and quality enforcement. iFlow shares the same Python hook system as Claude Code.
When customizing Trellis, consider platform compatibility:
┌─────────────────────────────────────────────────────────────┐
│ PORTABLE (All 9 Platforms) │
│ - .trellis/workspace/ - .trellis/tasks/ │
│ - .trellis/spec/ - Platform commands/skills │
│ - File-based configs - JSONL context files │
└─────────────────────────────────────────────────────────────┘
│
┌─────────────────────────────▼───────────────────────────────┐
│ HOOK-CAPABLE (Claude Code + iFlow) │
│ - .claude/hooks/ or .iflow/hooks/ │
│ - settings.json hook configuration │
│ - Auto context injection - SubagentStop control │
│ - Ralph Loop - Multi-Session worktrees │
└─────────────────────────────────────────────────────────────┘
This is the meta-skill for Trellis - it documents the original, unmodified Trellis system. When customizing Trellis for a specific project, record changes in a project-local skill (trellis-local), keeping this meta-skill as the authoritative reference for vanilla Trellis.
~/.claude/skills/
└── trellis-meta/ # THIS SKILL - Original Trellis documentation
# ⚠️ DO NOT MODIFY for project-specific changes
project/.claude/skills/
└── trellis-local/ # Project-specific customizations
# ✅ Record all modifications here
Why this separation?
trellis-local skill tracks ITS OWN modificationsWhen modifying Trellis for a project, follow this protocol:
# Look for project-local skill
ls -la .claude/skills/trellis-local/
If no trellis-local exists, create it:
mkdir -p .claude/skills/trellis-local
Then create .claude/skills/trellis-local/SKILL.md:
---
name: trellis-local
description: |
Project-specific Trellis customizations for [PROJECT_NAME].
This skill documents modifications made to the vanilla Trellis system
in this project. Inherits from trellis-meta for base documentation.
---
# Trellis Local - [PROJECT_NAME]
## Base Version
Trellis version: X.X.X (from package.json or trellis --version)
Date initialized: YYYY-MM-DD
## Customizations
### Commands Added
(none yet)
### Agents Modified
(none yet)
### Hooks Changed
(none yet)
### Specs Customized
(none yet)
### Workflow Changes
(none yet)
---
## Changelog
### YYYY-MM-DD
- Initial setup
When making ANY change to Trellis, update trellis-local/SKILL.md:
### Commands Added
#### /trellis:my-command
- **File**: `.claude/commands/trellis/my-command.md`
- **Purpose**: [what it does]
- **Added**: 2026-01-31
- **Why**: [reason for adding]
### Hooks Changed
#### inject-subagent-context.py
- **Change**: Added support for `my-agent` type
- **Lines modified**: 45-67
- **Date**: 2026-01-31
- **Why**: [reason]
The trellis-meta skill should ONLY be updated when:
Trellis transforms AI assistants into structured development partners through enforced context injection.
┌─────────────────────────────────────────────────────────────────────┐
│ USER INTERACTION │
│ /trellis:start /trellis:brainstorm /trellis:parallel /trellis:finish-work │
└─────────────────────────────────┬───────────────────────────────────┘
│
┌─────────────────────────────────▼───────────────────────────────────┐
│ SKILLS LAYER │
│ .claude/commands/trellis/*.md (slash commands) │
│ .claude/agents/*.md (sub-agent definitions) │
└─────────────────────────────────┬───────────────────────────────────┘
│
┌─────────────────────────────────▼───────────────────────────────────┐
│ HOOKS LAYER │
│ SessionStart → session-start.py (injects workflow + context) │
│ PreToolUse:Task → inject-subagent-context.py (spec injection) │
│ SubagentStop → ralph-loop.py (quality enforcement) │
└─────────────────────────────────┬───────────────────────────────────┘
│
┌─────────────────────────────────▼───────────────────────────────────┐
│ PERSISTENCE LAYER │
│ .trellis/workspace/ (journals, session history) │
│ .trellis/tasks/ (task tracking, context files) │
│ .trellis/spec/ (coding guidelines) │
└─────────────────────────────────────────────────────────────────────┘
| Principle | Description |
|---|---|
| Specs Injected, Not Remembered | Hooks enforce specs - agents always receive context |
| Read Before Write | Understand guidelines before writing code |
| Layered Context | Only relevant specs load (via JSONL files) |
| Human Commits | AI never commits - human validates first |
| Pure Dispatcher | Dispatch agent only orchestrates |
Track development progress across sessions with per-developer isolation.
.trellis/workspace/
├── index.md # Global overview
└── {developer}/ # Per-developer
├── index.md # Personal index (@@@auto markers)
└── journal-N.md # Session journals (max 2000 lines)
Key files : .trellis/.developer (identity), journals (session history)
Track work items with phase-based execution.
.trellis/tasks/{MM-DD-slug-assignee}/
├── task.json # Metadata, phases, branch
├── prd.md # Requirements
├── implement.jsonl # Context for implement agent
├── check.jsonl # Context for check agent
└── debug.jsonl # Context for debug agent
Maintain coding standards that get injected to agents.
.trellis/spec/
├── frontend/ # Frontend guidelines
├── backend/ # Backend guidelines
└── guides/ # Thinking guides
Automatically inject context and enforce quality.
| Hook | When | Purpose |
|---|---|---|
SessionStart | Session begins | Inject workflow, guidelines |
PreToolUse:Task | Before sub-agent | Inject specs via JSONL |
SubagentStop:check | Check agent stops | Enforce verification (Ralph Loop) |
Specialized agents for different phases.
| Agent | Purpose | Restriction |
|---|---|---|
dispatch | Orchestrate pipeline | Pure dispatcher |
plan | Evaluate requirements | Can reject unclear reqs |
research | Find code patterns | Read-only |
implement | Write code | No git commit |
check | Review and self-fix | Ralph Loop controlled |
Run parallel isolated sessions via Git worktrees.
plan.py → start.py → Dispatch → implement → check → create-pr
.claude/commands/trellis/my-command.mdtrellis-local skill with the change.claude/agents/my-agent.md with YAML frontmatterinject-subagent-context.py to handle new agent typemy-agent.jsonl in task directoriestrellis-local skill.claude/hooks/trellis-local skill.trellis/spec/my-category/index.md and guideline filestrellis-local skillnext_action array in task.jsontrellis-local skillReference documents are organized by platform compatibility:
references/
├── core/ # All Platforms (Claude Code, Cursor, etc.)
├── claude-code/ # Claude Code Only
├── how-to-modify/ # Modification Guides
└── meta/ # Documentation & Templates
core/ - All Platforms| Document | Content |
|---|---|
overview.md | Core systems introduction |
files.md | All .trellis/ files with purposes |
workspace.md | Workspace system, journals, developer identity |
tasks.md | Task system, directories, JSONL context files |
specs.md | Spec system, guidelines organization |
scripts.md |
claude-code/ - Claude Code Only| Document | Content |
|---|---|
overview.md | Claude Code features introduction |
hooks.md | Hook system, context injection |
agents.md | Agent types, invocation, Task tool |
ralph-loop.md | Quality enforcement mechanism |
multi-session.md | Parallel worktree sessions |
worktree-config.md | worktree.yaml configuration |
how-to-modify/ - Modification Guides| Document | Scenario |
|---|---|
overview.md | Quick reference for all modifications |
add-command.md | Adding slash commands |
add-agent.md | Adding new agent types |
add-spec.md | Adding spec categories |
add-phase.md | Adding workflow phases |
modify-hook.md | Modifying hook behavior |
meta/ - Documentation| Document | Content |
|---|---|
platform-compatibility.md | Detailed platform support matrix |
self-iteration-guide.md | How to document customizations |
trellis-local-template.md | Template for project-local skill |
| Script | Purpose |
|---|---|
get_context.py | Get session context |
task.py | Task management |
add_session.py | Record session |
multi_agent/start.py | Start parallel agent |
| Path | Purpose |
|---|---|
.trellis/.developer | Developer identity |
.trellis/.current-task | Active task pointer |
.trellis/workflow.md | Main workflow docs |
.claude/settings.json | Hook configuration |
When upgrading Trellis to a new version:
trellis-local for conflictstrellis-local with migration notes## Changelog
### 2026-02-01 - Upgraded to Trellis X.Y.Z
- Merged new hook behavior from meta-skill
- Kept custom agent `my-agent`
- Updated check.jsonl template
Weekly Installs
84
Repository
GitHub Stars
4.0K
First Seen
Feb 10, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
codex81
gemini-cli80
amp80
kimi-cli80
github-copilot80
opencode80
AI 代码实施计划编写技能 | 自动化开发任务分解与 TDD 流程规划工具
49,800 周安装
| ✅ Full |
| ✅ Full |
| Commands/Skills | ✅ Full | ✅ Full | ✅ Full | ✅ Full | ✅ Skills | ✅ Full | ✅ Skills | ✅ TOML | ✅ Workflows |
| Agent definitions | ✅ Full | ✅ Full | ⚠️ Manual | ✅ Full | ⚠️ Manual | ⚠️ Manual | ⚠️ Manual | ⚠️ Manual | ⚠️ Manual |
| Hook-Dependent Features |
| SessionStart hook | ✅ Full | ✅ Full | ❌ None | ❌ None | ❌ None | ❌ None | ❌ None | ❌ None | ❌ None |
| PreToolUse hook | ✅ Full | ✅ Full | ❌ None | ❌ None | ❌ None | ❌ None | ❌ None | ❌ None | ❌ None |
| SubagentStop hook | ✅ Full | ✅ Full | ❌ None | ❌ None | ❌ None | ❌ None | ❌ None | ❌ None | ❌ None |
| Auto context injection | ✅ Full | ✅ Full | ❌ Manual | ❌ Manual | ❌ Manual | ❌ Manual | ❌ Manual | ❌ Manual | ❌ Manual |
| Ralph Loop | ✅ Full | ✅ Full | ❌ None | ❌ None | ❌ None | ❌ None | ❌ None | ❌ None | ❌ None |
| Multi-Agent/Session |
| Multi-Agent (current dir) | ✅ Full | ✅ Full | ⚠️ Limited | ⚠️ Limited | ⚠️ Limited | ⚠️ Limited | ⚠️ Limited | ⚠️ Limited | ⚠️ Limited |
| Multi-Session (worktrees) | ✅ Full | ✅ Full | ❌ None | ❌ None | ❌ None | ❌ None | ❌ None | ❌ None | ❌ None |
debug | Fix issues | Precise fixes only |
| Platform-independent scripts |
scripts.md | Claude Code only scripts |
change-verify.md | Changing verify commands |