Token导航 LogoToken导航

Agent Skill · 开发

swain-retro(swain retro 命令行)

swain-retro 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

swain-retro 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描有提醒项,按安装量在开发类的 21,746 个 Skill 里排第 11,219。

总安装 1,882周安装 80GitHub Stars 2下载 659核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/cristoslc/swain --skill swain-retro

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

swain-retro 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。通过 npx skills add 命令从指定仓库安装,需结合原始 README 核验具体用法。

安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。当前暂无详细功能描述,可进一步查阅来源仓库获取更多信息。

来源仓库内路径:skills/swain-retro

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/cristoslc/swain --skill swain-retro;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

swain-retro 怎么安装?

在终端执行 npx skills add https://github.com/cristoslc/swain --skill swain-retro。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

swain-retro 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

swain-retro 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/cristoslc/swain --skill swain-retro 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

swain-retro 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

swain-retro 用的人多吗?

公开数据是累计安装 1,882 次,近一周安装 80 次,下载 659 次,GitHub 2 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

swain-retro 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
swain-retro

swain retro 命令行 · 本页

1,8822执行命令未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Retrospectives

Before proceeding, check for an active session and determine which evidence source to use:

REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
session_check=$(bash "$REPO_ROOT/.agents/bin/swain-session-check.sh" 2>/dev/null)
session_status=$(echo "$session_check" | jq -r '.status // "none"')

if [ "$session_status" = "active" ]; then
  echo "Using active session evidence"
else
  echo "No active session — falling back to git log evidence"
  git_evidence=$(git log --oneline -20 2>/dev/null)
  echo "Recent commits:"
  echo "$git_evidence"
fi

If no active session, proceed with the retro using git log as the primary evidence source. Produce a standalone retro document in docs/swain-retro/ rather than embedding in an artifact. Adapt reflection questions to the unscoped context.

Captures learnings at natural completion points and persists them for future use. This skill is both auto-triggered (EPIC terminal transition hook in swain-design) and manually invocable via /swain-retro.

Output modes

ScopeOutputRationale
EPIC-scoped (auto or explicit)## Retrospective section appended to the EPIC artifactThe EPIC already contains lifecycle, success criteria, and child specs — it's the single source of truth for "what we shipped and what we learned"
Cross-epic / time-based (manual)Standalone retro doc in docs/swain-retro/No single artifact owns the scope — a dedicated doc is required

Invocation modes

ModeTriggerContext sourceOutputInteractive?
AutoEPIC transitions to terminal state (called by swain-design)The EPIC and its child artifactsEmbedded in EPICNo — fully automated
InteractiveEPIC transitions to terminal state during a live sessionThe EPIC and its child artifactsEmbedded in EPICYes — reflection questions offered
ManualUser runs /swain-retro or /swain retroRecent work — git log, closed tasks, transitioned artifactsStandalone retro doc (required)Yes
Scoped/swain-retro EPIC-NNN or /swain-retro SPEC-NNNSpecific artifact and its related workEmbedded in EPIC (if EPIC-scoped) or standaloneYes

Terminal states that trigger auto-retro: Complete, Abandoned, Superseded. The retro content adapts to the terminal state — an Abandoned EPIC's retro focuses on why work stopped and what was learned, not on success criteria.

Step 1 — Gather context

Collect evidence of what happened during the work period.

For EPIC-scoped retros (auto or scoped)

REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
# Get the EPIC and its children
bash "$REPO_ROOT/.agents/bin/chart.sh" deps <EPIC-ID>

# Session log — the primary evidence source for retros (ADR-015)
# Contains decisions, pivots, rationale, and operator feedback
cat .agents/session.json 2>/dev/null | grep -i "<EPIC-ID>\|<SPEC-IDs>"

Also read:

  • The EPIC's lifecycle table (dates, duration)
  • Child SPECs' verification tables (what was proven)
  • Any ADRs created during the work
  • Git log for commits between EPIC activation and completion dates

Note (ADR-015): Do not use tickets (tk / .tickets/) as retro evidence. Tickets are ephemeral execution scaffolding — they record task status, not decisions or rationale. The session log (.agents/session.json JSONL) captures the actual conversation: what was tried, what pivoted, why, and what the operator said. Build the retro narrative from session logs and git history.

For manual (unscoped) retros

REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
# Recent git activity
git log --oneline --since="1 week ago" --no-merges

# Session log — primary evidence source (ADR-015)
cat .agents/session.json 2>/dev/null | tail -100

# Recently transitioned artifacts
bash "$REPO_ROOT/.agents/bin/chart.sh" status 2>/dev/null

Also check:

  • Existing memory files for context on prior patterns
  • Previous retro docs in docs/swain-retro/ for recurring themes

Step 2 — Generate or prompt reflection

Auto mode (non-interactive)

When invoked by swain-design during a non-interactive EPIC terminal transition (e.g., dispatched agent, batch processing), generate the retro content automatically from the gathered context:

  1. Synthesize what was accomplished, what changed from the original scope, and what patterns are visible in the commit/task history
  2. For Abandoned or Superseded EPICs, focus on why the work stopped and what was learned
  3. Proceed directly to Step 3 (memory extraction) and Step 4 (write output)

Interactive mode

When the user is present (live session, manual invocation), present a summary and offer reflection:

Summary format
Retro scope: {EPIC-NNN title / "recent work"} Period: {start date} — {end date} Artifacts completed: {list} Tasks closed: {count} Key commits: {notable commits}
Reflection questions

Ask these one at a time, waiting for user response between each:

  1. What went well? What patterns or approaches worked effectively that we should repeat?
  2. What was surprising? Anything unexpected — blockers, shortcuts, scope changes?
  3. What would you change? If you could redo this work, what would you do differently?
  4. What patterns emerged? Any recurring themes across tasks — tooling friction, design gaps, communication patterns?

Adapt follow-up questions based on user responses. If the user gives brief answers, probe deeper. If they're expansive, move on.

Step 3 — Distill learnings

After the reflection conversation, persist the learnings — but where they go depends on whether this is the swain project itself or a consumer project that uses swain.

Detect context

# Check if the current repo IS swain (the tool itself)
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
if git remote get-url origin 2>/dev/null | grep -q "cristoslc/swain"; then
  echo "SWAIN_REPO"
else
  echo "CONSUMER_PROJECT"
fi

In consumer projects: write to memory

Learnings from consumer projects go into Claude memory files because they represent operator preferences and project-specific patterns that should persist across sessions.

Feedback memories

For behavioral patterns and process learnings that should guide future agent behavior:

---
name: retro-{topic}
description: {one-line description of the learning}
type: feedback
---

{The pattern or rule}

**Why:** {User's explanation from the retro}
**How to apply:** {When this guidance kicks in}

Write to the project memory directory:

~/.claude/projects/<project-slug>/memory/feedback_retro_{topic}.md

The project slug is the project path with slashes replaced by dashes (e.g., /Users/cristos/Documents/code/myapp → -Users-cristos-Documents-code-myapp). These files live in Claude's memory system (not swain's .agents/ state), which is intentional — retro learnings persist across all Claude Code sessions for this project.

Update MEMORY.md index.

Project memories

For context about ongoing work patterns, team dynamics, or project-specific learnings:

---
name: retro-{topic}
description: {one-line description}
type: project
---

{The fact or observation}

**Why:** {Context from the retro}
**How to apply:** {How this shapes future suggestions}
Rules for memory creation
  • Only create memories the user has explicitly validated during the reflection
  • Merge with existing memories when the learning extends a prior pattern
  • Use absolute dates (from the retro context), not relative
  • Maximum 3-5 memory files per retro — distill, don't dump

In the swain repo: propose artifacts, not memory

When the retro is running inside swain itself, learnings that imply behavioral changes, new capabilities, or process fixes are not memory — they are work items. Swain's behavior is encoded in skills, specs, and ADRs, not in operator memory files.

Classify each learning and route it to the right output:

Learning typeRouteExample
A skill needs new behavior or guardrailsSPEC candidate — add to the retro doc's "SPEC candidates" section"swain-release should refuse to run in worktrees"
A cross-cutting process changeADR candidate — note in retro doc"Dispatched agents should never use reset --hard"
A new capability or initiativeEPIC candidate — note in retro doc"Session logs need command-level forensics"
A bug in an existing skillGitHub issue via gh issue create"swain-sync doesn't preserve symlinks"
Operator preference or project contextMemory (same as consumer)"Operator prefers bundled PRs for refactors"

For artifact candidates, add a ## SPEC candidates section (or ## ADR candidates, ## EPIC candidates) to the retro doc output. Each entry should include enough context to draft the artifact later:

## SPEC candidates

1. **{Title}** — {one-line description of what needs to change and why}
2. ...

Do not create the specs/epics/ADRs during the retro — that is swain-design's job. The retro captures what was learned; the operator decides what to build next. Only write to memory for learnings that are genuinely about operator preferences or project context (the last row in the table above).

Step 4 — Write output

Output destination depends on scope — see Output modes at the top.

EPIC-scoped: embed in the EPIC artifact

Append a ## Retrospective section to the EPIC markdown file, before the ## Lifecycle table. This keeps the EPIC as the single source of truth.

## Retrospective

**Terminal state:** {Complete | Abandoned | Superseded}
**Period:** {activation date} — {terminal date}
**Related artifacts:** {SPEC-NNN}, {SPEC-NNN}, ...

### Summary

{What was accomplished — or for Abandoned/Superseded, what was learned and why work stopped}

### Reflection

{Synthesized findings — from auto-generation or interactive Q&A}

### Learnings captured

<!-- In consumer projects, this table lists memory files. In the swain repo, it lists
     artifact candidates (SPECs, ADRs, issues) plus any memory files for operator preferences. -->

| Item | Type | Summary |
|------|------|---------|
| ... | memory / SPEC candidate / issue | ... |

Hyperlink the artifact IDs in Related artifacts using Step 4.5.

Cross-epic / time-based: standalone retro doc (required)

For manual retros not scoped to a single EPIC, a standalone doc is required — no single artifact owns the scope.

mkdir -p docs/swain-retro

File: docs/swain-retro/YYYY-MM-DD-{topic-slug}.md

---
title: "Retro: {title}"
artifact: RETRO-{YYYY-MM-DD}-{topic-slug}
track: standing
status: Active
created: {YYYY-MM-DD}
last-updated: {YYYY-MM-DD}
scope: "{description of what's covered}"
period: "{start} — {end}"
linked-artifacts:
  - {ARTIFACT-ID-1}
  - {ARTIFACT-ID-2}
---

# Retro: {title}

## Summary

{Brief description of what was completed across the scope}

## Artifacts

| Artifact | Title | Outcome |
|----------|-------|---------|
| ... | ... | Complete/Abandoned/... |

## Reflection

### What went well
{User's responses, synthesized}

### What was surprising
{User's responses, synthesized}

### What would change
{User's responses, synthesized}

### Patterns observed
{User's responses, synthesized}

## Learnings captured

<!-- In consumer projects, this table lists memory files. In the swain repo, it lists
     artifact candidates (SPECs, ADRs, issues) plus any memory files for operator preferences. -->

| Item | Type | Summary |
|------|------|---------|
| ... | memory / SPEC candidate / issue | ... |

Step 4.5 — Hyperlink artifact references

After writing the retro output (standalone doc or embedded EPIC section), scan all body text for bare artifact ID references matching (SPEC|EPIC|INITIATIVE|VISION|SPIKE|ADR|PERSONA|RUNBOOK|DESIGN|JOURNEY|TRAIN)-[0-9]+. For each bare ID not already inside a markdown link or code fence, resolve and replace:

REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
bash "$REPO_ROOT/.agents/bin/resolve-artifact-link.sh" <ARTIFACT-ID> <RETRO-FILE>

Replace bare IDs with [ARTIFACT-ID](relative-path). If the script returns non-zero or empty output (artifact not found), leave the bare ID as-is. Frontmatter related-artifacts values stay as plain IDs (YAML compatibility).

Context-rich artifact references

When referencing artifacts in retro output (child specs, related artifacts, linked work), use context lines:

REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
bash "$REPO_ROOT/.agents/bin/artifact-context.sh" <ID> 2>/dev/null

Fall back to <ID> — <title> if the utility is unavailable.

Step 4.7 — README drift check (SPEC-210)

After reflection and before closing the retro, check if the README still matches the project.

REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
[ -f "$REPO_ROOT/README.md" ] && echo "has_readme" || echo "no_readme"

If README.md exists:

  1. Read README.md and extract claims about what the project does and how it works.
  2. Compare claims against artifacts that changed during the retro scope (from Step 1 context).
  3. Surface drift findings:

- New features the README omits — the epic shipped something the README does not mention. - Stale promises — the epic dropped or replaced something the README still claims. - Changed behavior — the epic changed how something works but the README still shows the old way.

Show findings to the operator. They can fix the README, fix the artifact, or defer.

In auto mode, add drift findings to the ## Reflection section. In interactive mode, show them after the reflection questions and before writing output.

If no drift exists, skip — do not add a "no drift" note.

Deferred findings go in a ### README drift subsection of the retro output so they stay visible.

Step 5 — Update session bookmark

REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
bash "$REPO_ROOT/.agents/bin/swain-bookmark.sh" "Completed retro for {scope} — {N} learnings captured"

Integration with swain-design

swain-design orchestrates this skill when an EPIC transitions to any terminal state (Complete, Abandoned, Superseded):

  1. swain-design completes the phase transition (move, status update, commit, hash stamp)
  2. swain-design invokes swain-retro with the EPIC ID and terminal state
  3. swain-retro gathers context, generates/prompts reflection, extracts memories, and embeds the ## Retrospective section in the EPIC
  4. swain-design commits the retro content as part of (or immediately after) the transition

Interactive detection: If the session is interactive (user is present and responding), swain-retro offers the reflection questions. If non-interactive (dispatched agent, batch), it runs fully automated.

This is best-effort — if swain-retro is not available, the EPIC transition still succeeds without a retro section.

Referencing prior retros

When running a new retro, scan both EPIC artifacts (grep for ## Retrospective sections) and docs/swain-retro/ for prior retros. If patterns recur across multiple retros, call them out explicitly — recurring themes are the most valuable learnings.

# Check standalone retro docs
ls docs/swain-retro/*.md 2>/dev/null | head -10

# Check embedded retros in EPICs
grep -rl "## Retrospective" docs/epic/ 2>/dev/null | head -10

平台分布

Codex

35.91%
按下载量换算237

Claude

28.17%
按下载量换算186

Cursor

16.29%
按下载量换算107

Gemini CLI

9.79%
按下载量换算65

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/cristoslc/swain --skill swain-retro 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills