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

update-spec更新规格

Agent Skill

update-spec 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

612

周安装

26

GitHub Stars

6,633

下载量

214
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/mindfold-ai/trellis --skill update-spec

简介

用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词快速定位候选结果。
  • 通过 npx skills add 命令从指定仓库安装并使用。
  • 建议确认权限范围和维护状态,避免触发不必要的联网或文件操作。
  • update-spec 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Update Code-Spec - Capture Executable Contracts

When you learn something valuable (from debugging, implementing, or discussion), use this skill to update the relevant code-spec documents.

Timing: After completing a task, fixing a bug, or discovering a new pattern


Code-Spec First Rule (CRITICAL)

In this project, "spec" for implementation work means code-spec:

  • Executable contracts (not principle-only text)
  • Concrete signatures, payload fields, env keys, and boundary behavior
  • Testable validation/error behavior

If the change touches infra or cross-layer contracts, code-spec depth is mandatory.

Required sections for infra/cross-layer specs:

  1. Scope / Trigger
  2. Signatures (command/API/DB)
  3. Contracts (request/response/env)
  4. Validation & Error Matrix
  5. Good/Base/Bad Cases
  6. Tests Required (with assertion points)
  7. Wrong vs Correct (at least one pair)

When to Update Code-Specs

TriggerExampleTarget Spec
Implemented a featureAdded template download with gigetRelevant backend/ or frontend/ file
Made a design decisionUsed type field + mapping table for extensibilityRelevant code-spec + "Design Decisions" section
Fixed a bugFound a subtle issue with error handlingbackend/error-handling.md
Discovered a patternFound a better way to structure codeRelevant backend/ or frontend/ file
Hit a gotchaLearned that X must be done before YRelevant code-spec + "Common Mistakes" section
Established a conventionTeam agreed on naming patternquality-guidelines.md
New thinking trigger"Don't forget to check X before doing Y"guides/*.md (as a checklist item, not detailed rules)

Key Insight: Code-spec updates are NOT just for problems. Every feature implementation contains design decisions and contracts that future AI/developers need to execute safely.


Spec Structure Overview

.trellis/spec/
├── backend/           # Backend coding standards
│   ├── index.md       # Overview and links
│   └── *.md           # Topic-specific guidelines
├── frontend/          # Frontend coding standards
│   ├── index.md       # Overview and links
│   └── *.md           # Topic-specific guidelines
└── guides/            # Thinking checklists (NOT coding specs!)
    ├── index.md       # Guide index
    └── *.md           # Topic-specific guides

CRITICAL: Code-Spec vs Guide - Know the Difference

TypeLocationPurposeContent Style
Code-Specbackend/*.md, frontend/*.mdTell AI "how to implement safely"Signatures, contracts, matrices, cases, test points
Guideguides/*.mdHelp AI "what to think about"Checklists, questions, pointers to specs

Decision Rule: Ask yourself:

  • "This is how to write the code" → Put in backend/ or frontend/
  • "This is what to consider before writing" → Put in guides/

Example:

LearningWrong LocationCorrect Location
"Use reconfigure() not TextIOWrapper for Windows stdout"guides/cross-platform-thinking-guide.mdbackend/script-conventions.md
"Remember to check encoding when writing cross-platform code"backend/script-conventions.mdguides/cross-platform-thinking-guide.md

Guides should be short checklists that point to specs, not duplicate the detailed rules.


Update Process

Step 1: Identify What You Learned

Answer these questions:

  1. What did you learn? (Be specific)
  2. Why is it important? (What problem does it prevent?)
  3. Where does it belong? (Which spec file?)

Step 2: Classify the Update Type

TypeDescriptionAction
Design DecisionWhy we chose approach X over YAdd to "Design Decisions" section
Project ConventionHow we do X in this projectAdd to relevant section with examples
New PatternA reusable approach discoveredAdd to "Patterns" section
Forbidden PatternSomething that causes problemsAdd to "Anti-patterns" or "Don't" section
Common MistakeEasy-to-make errorAdd to "Common Mistakes" section
ConventionAgreed-upon standardAdd to relevant section
GotchaNon-obvious behaviorAdd warning callout

Step 3: Read the Target Code-Spec

Before editing, read the current code-spec to:

  • Understand existing structure
  • Avoid duplicating content
  • Find the right section for your update
cat .trellis/spec/<category>/<file>.md

Step 4: Make the Update

Follow these principles:

  1. Be Specific: Include concrete examples, not just abstract rules
  2. Explain Why: State the problem this prevents
  3. Show Contracts: Add signatures, payload fields, and error behavior
  4. Show Code: Add code snippets for key patterns
  5. Keep it Short: One concept per section

Step 5: Update the Index (if needed)

If you added a new section or the code-spec status changed, update the category's index.md.


Update Templates

Mandatory Template for Infra/Cross-Layer Work

## Scenario: <name>

### 1. Scope / Trigger
- Trigger: <why this requires code-spec depth>

### 2. Signatures
### 3. Contracts
### 4. Validation & Error Matrix
### 5. Good/Base/Bad Cases
### 6. Tests Required
### 7. Wrong vs Correct
#### Wrong
...
#### Correct
...

Adding a Design Decision

### Design Decision: [Decision Name]

**Context**: What problem were we solving?

**Options Considered**:
1. Option A - brief description
2. Option B - brief description

**Decision**: We chose Option X because...

**Example**:
\`\`\`typescript
// How it's implemented
code example
\`\`\`

**Extensibility**: How to extend this in the future...

Adding a Project Convention

### Convention: [Convention Name]

**What**: Brief description of the convention.

**Why**: Why we do it this way in this project.

**Example**:
\`\`\`typescript
// How to follow this convention
code example
\`\`\`

**Related**: Links to related conventions or specs.

Adding a New Pattern

### Pattern Name

**Problem**: What problem does this solve?

**Solution**: Brief description of the approach.

**Example**:
\`\`\`
// Good
code example

// Bad
code example
\`\`\`

**Why**: Explanation of why this works better.

Adding a Forbidden Pattern

### Don't: Pattern Name

**Problem**:
\`\`\`
// Don't do this
bad code example
\`\`\`

**Why it's bad**: Explanation of the issue.

**Instead**:
\`\`\`
// Do this instead
good code example
\`\`\`

Adding a Common Mistake

### Common Mistake: Description

**Symptom**: What goes wrong

**Cause**: Why this happens

**Fix**: How to correct it

**Prevention**: How to avoid it in the future

Adding a Gotcha

> **Warning**: Brief description of the non-obvious behavior.
>
> Details about when this happens and how to handle it.

Interactive Mode

If you're unsure what to update, answer these prompts:

  1. What did you just finish?

- Fixed a bug - Implemented a feature - Refactored code - Had a discussion about approach

  1. What did you learn or decide?

- Design decision (why X over Y) - Project convention (how we do X) - Non-obvious behavior (gotcha) - Better approach (pattern)

  1. Would future AI/developers need to know this?

- To understand how the code works → Yes, update spec - To maintain or extend the feature → Yes, update spec - To avoid repeating mistakes → Yes, update spec - Purely one-off implementation detail → Maybe skip

  1. Which area does it relate to?

- Backend code - Frontend code - Cross-layer data flow - Code organization/reuse - Quality/testing


Quality Checklist

Before finishing your code-spec update:

  • Is the content specific and actionable?
  • Did you include a code example?
  • Did you explain WHY, not just WHAT?
  • Did you include executable signatures/contracts?
  • Did you include validation and error matrix?
  • Did you include Good/Base/Bad cases?
  • Did you include required tests with assertion points?
  • Is it in the right code-spec file?
  • Does it duplicate existing content?
  • Would a new team member understand it?

Relationship to Other Commands

Development Flow:
  Learn something → $update-spec → Knowledge captured
       ↑                                  ↓
  $break-loop ←──────────────────── Future sessions benefit
  (deep bug analysis)
  • $break-loop - Analyzes bugs deeply, often reveals spec updates needed
  • $update-spec - Actually makes the updates (this skill)
  • $finish-work - Reminds you to check if specs need updates

Core Philosophy

Code-specs are living documents. Every debugging session, every "aha moment" is an opportunity to make the implementation contract clearer.

The goal is institutional memory:

  • What one person learns, everyone benefits from
  • What AI learns in one session, persists to future sessions
  • Mistakes become documented guardrails

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.82%
按下载量换算79

Claude

30.03%
按下载量换算64

Cursor

18.06%
按下载量换算39

Gemini CLI

9.38%
按下载量换算20

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills