Skip to content

feat: 添加 /bootstrap skill,一键为任意仓库安装 Claude Code 工作流 - #26

Merged
lishuceo merged 2 commits into
mainfrom
feat/bootstrap-skill
Feb 18, 2026
Merged

feat: 添加 /bootstrap skill,一键为任意仓库安装 Claude Code 工作流#26
lishuceo merged 2 commits into
mainfrom
feat/bootstrap-skill

Conversation

@lishuceo

Copy link
Copy Markdown
Owner

Summary

  • 新增 /bootstrap skill,在任意仓库中一键安装 3 个 Claude Code skill(ship、pr-fixup、deep-review)和 2 个 GitHub Actions(pr-review、claude-comment)
  • 所有模板已泛化为语言无关版本:移除中文输出、TypeScript 特定检查,CLAUDE.md 读取改为条件式
  • commit 风格从硬编码改为从 git log 推断,适配任意项目

Test plan

  • 在 Rust 项目 (talktype) 中模拟 bootstrap,验证 5 个文件全部正确创建
  • 验证生成文件无中文文本
  • 验证无项目特定引用(TypeScript/Node.js/ESM/singleton)
  • 验证 YAML workflow 文件语法合法
  • 验证 CLAUDE.md 引用全部带条件判断 ("if it exists")

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Feb 18, 2026

Copy link
Copy Markdown

Claude finished @lishuceo's task in 8m 49s —— View job


Review: .claude/skills/bootstrap/SKILL.md

  • Check for previous review comments — none found
  • Read project conventions (CLAUDE.md)
  • Read full changed file (592 lines)
  • Compare bootstrap templates against existing files in this repo
  • Analyze for bugs, security, and architecture issues
  • Post review summary

Verdict: ✅ Approved (with one minor suggestion)

This is a well-structured skill that packages the repo's existing Claude Code setup into a reusable, language-agnostic bootstrap template. The generalization work is solid.

What was reviewed:

  • Compared all 5 embedded templates against the actual files in this repo (ship/SKILL.md, pr-fixup/SKILL.md, deep-review/SKILL.md, pr-review.yml, claude-comment.yml)
  • Verified Chinese text removal and TypeScript-specific reference cleanup
  • Checked YAML validity of workflow templates
  • Reviewed security posture of workflow permissions and allowedTools

Findings:

  • 🟡 claude-comment.yml template missing Bash(gh api:*) (confidence: 78) — The pr-review.yml template includes Bash(gh api:*) in allowedTools but claude-comment.yml does not. This limits @claude comment responses from using gh api commands (e.g., resolving review threads via GraphQL). Posted inline suggestion with a fix.

Positives:

  • All templates are correctly generalized: no Chinese text, no TypeScript/Node.js-specific references
  • CLAUDE.md references properly conditionalized with "if it exists"
  • Commit style correctly changed from hardcoded fix: <中文> to git log-inferred style
  • Idempotent design — checks for existing files before writing, skips with "already exists"
  • Clear summary output with next-step instructions for ANTHROPIC_API_KEY setup
  • Workflow permissions are appropriately scoped (contents: read for review-only actions)

Comment thread .claude/skills/bootstrap/SKILL.md Outdated
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Feb 18, 2026

Copy link
Copy Markdown

Claude finished @lishuceo's task in 6m 22s —— View job


Review: .claude/skills/bootstrap/SKILL.md

  • Check previous review comments — 1 previous issue found and resolved
  • Read full changed file (592 lines)
  • Compare bootstrap templates against existing files in this repo
  • Analyze for bugs, security, and architecture issues
  • Post review summary

Verdict: ✅ Approved

1 previous issue fixedclaude-comment.yml template now includes Bash(gh api:*) in allowedTools (line 551), matching pr-review.yml. Thread resolved.

What was reviewed:

  • Full 592-line file with all 5 embedded templates
  • Compared each template against its actual counterpart in the repo
  • Checked workflow YAML structure, permissions, and allowedTools consistency
  • Reviewed security posture (permissions scoping, tool allowlists)
  • Checked for language-agnostic generalization completeness

No new issues found (confidence >= 75 threshold).

Observations (informational, not blocking):

  • The repo's own .github/workflows/claude-comment.yml still lacks Bash(gh api:*) — the bootstrap template is now ahead of the repo's actual file. Consider backporting this fix to the repo's workflow separately.
  • All templates correctly generalized: no Chinese text, no TypeScript/Node.js-specific references, CLAUDE.md reads conditionalized with "if it exists"
  • Idempotent design (file-exists checks) is correct
  • Workflow permissions are appropriately scoped
  • allowedTools are now consistent between both workflow templates

@lishuceo
lishuceo merged commit 077a1c7 into main Feb 18, 2026
3 checks passed
@lishuceo
lishuceo deleted the feat/bootstrap-skill branch February 18, 2026 20:31
lishuceo added a commit that referenced this pull request Apr 8, 2026
* feat: 添加 /bootstrap skill,一键为任意仓库安装 Claude Code 工作流

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: claude-comment.yml 模板补齐 Bash(gh api:*) 权限

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant