SKILL.md
Use this skill for end-to-end shipping workflows from implementation to deployment. Do not use for single-step tasks.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 6
- Forks
- 0
01 前言 Front Matter
- name
- SKILL.md
- description
- Use this skill for end-to-end shipping workflows from implementation to deployment. Do not use for single-step tasks.
02 资源文件 101
- 参考文档.claude-plugin/plugin.json511 B
- 参考文档commands/ship-ci-review-loop.md12.8 KB
- 参考文档commands/ship-deployment.md7.9 KB
- 参考文档commands/ship-error-handling.md4.6 KB
- 参考文档commands/ship.md14.4 KB
- 脚本lib/collectors/codebase.js10.3 KB
- 脚本lib/collectors/docs-patterns.js10.5 KB
- 脚本lib/collectors/documentation.js5.8 KB
- 脚本lib/collectors/github.js6.5 KB
- 脚本lib/collectors/index.js3.0 KB
- 脚本lib/config/index.js267 B
- 脚本lib/cross-platform/index.js13.1 KB
- 参考文档lib/cross-platform/RESEARCH.md6.1 KB
- 脚本lib/drift-detect/collectors.js1.2 KB
- 脚本lib/enhance/agent-analyzer.js11.9 KB
- 脚本lib/enhance/agent-patterns.js16.6 KB
- 脚本lib/enhance/auto-suppression.js18.0 KB
- 脚本lib/enhance/benchmark.js13.9 KB
- 脚本lib/enhance/docs-analyzer.js8.0 KB
- 脚本lib/enhance/docs-patterns.js20.6 KB
- 脚本lib/enhance/fixer.js17.9 KB
- 脚本lib/enhance/hook-analyzer.js3.1 KB
- 脚本lib/enhance/hook-patterns.js869 B
- 脚本lib/enhance/index.js4.3 KB
- 脚本lib/enhance/plugin-analyzer.js11.5 KB
- 脚本lib/enhance/plugin-patterns.js8.7 KB
- 脚本lib/enhance/projectmemory-analyzer.js15.6 KB
- 脚本lib/enhance/projectmemory-patterns.js19.4 KB
- 脚本lib/enhance/prompt-analyzer.js11.3 KB
- 脚本lib/enhance/prompt-patterns.js31.3 KB
- 脚本lib/enhance/reporter.js43.0 KB
- 脚本lib/enhance/security-patterns.js7.9 KB
- 脚本lib/enhance/skill-analyzer.js4.6 KB
- 脚本lib/enhance/skill-patterns.js4.3 KB
- 脚本lib/enhance/suppression.js9.8 KB
- 脚本lib/enhance/tool-patterns.js10.7 KB
- 脚本lib/index.js7.4 KB
- 脚本lib/patterns/cli-enhancers.js16.4 KB
- 脚本lib/patterns/pipeline.js31.9 KB
- 脚本lib/patterns/review-patterns.js17.5 KB
- 脚本lib/patterns/slop-analyzers.js76.1 KB
- 脚本lib/patterns/slop-patterns.js38.8 KB
- 脚本lib/perf/analyzer/index.js365 B
- 脚本lib/perf/argument-parser.js1.9 KB
- 脚本lib/perf/baseline-comparator.js1.2 KB
- 脚本lib/perf/baseline-store.js3.3 KB
- 脚本lib/perf/benchmark-runner.js11.1 KB
- 脚本lib/perf/breaking-point-finder.js1.2 KB
- 脚本lib/perf/breaking-point-runner.js1.7 KB
- 脚本lib/perf/checkpoint.js3.2 KB
- 脚本lib/perf/code-paths.js2.2 KB
- 脚本lib/perf/consolidation.js992 B
- 脚本lib/perf/constraint-runner.js1.9 KB
- 脚本lib/perf/experiment-runner.js725 B
- 脚本lib/perf/index.js1.2 KB
- 脚本lib/perf/investigation-state.js26.4 KB
- 脚本lib/perf/optimization-runner.js2.6 KB
- 脚本lib/perf/profilers/go.js405 B
- 脚本lib/perf/profilers/index.js1.2 KB
- 脚本lib/perf/profilers/java.js500 B
- 脚本lib/perf/profilers/node.js634 B
- 脚本lib/perf/profilers/python.js483 B
- 脚本lib/perf/profilers/rust.js479 B
- 脚本lib/perf/profiling-runner.js1.4 KB
- 脚本lib/perf/schemas.js4.3 KB
- 脚本lib/platform/detect-platform.js11.9 KB
- 脚本lib/platform/detection-configs.js2.6 KB
- 脚本lib/platform/state-dir.js3.3 KB
- 脚本lib/platform/verify-tools.js4.9 KB
- 脚本lib/repo-map/cache.js3.1 KB
- 脚本lib/repo-map/index.js5.7 KB
- 脚本lib/repo-map/installer.js5.8 KB
- 脚本lib/repo-map/queries/go.js756 B
- 脚本lib/repo-map/queries/index.js2.0 KB
- 脚本lib/repo-map/queries/java.js1.5 KB
- 脚本lib/repo-map/queries/javascript.js3.0 KB
- 脚本lib/repo-map/queries/python.js667 B
- 脚本lib/repo-map/queries/rust.js4.2 KB
- 脚本lib/repo-map/queries/typescript.js1.4 KB
- 脚本lib/repo-map/runner.js34.2 KB
- 脚本lib/repo-map/updater.js12.3 KB
- 脚本lib/repo-map/usage-analyzer.js11.8 KB
- 参考文档lib/schemas/plugin-manifest.schema.json975 B
- 参考文档lib/schemas/README.md5.0 KB
- 脚本lib/schemas/validator.js7.7 KB
- 脚本lib/sources/custom-handler.js5.5 KB
- 脚本lib/sources/policy-questions.js6.8 KB
- 脚本lib/sources/source-cache.js4.4 KB
- 脚本lib/state/workflow-state.js15.0 KB
- 脚本lib/types/agent-frontmatter.d.ts3.2 KB
- 脚本lib/types/command-frontmatter.d.ts2.9 KB
- 脚本lib/types/hook-frontmatter.d.ts2.9 KB
- 脚本lib/types/index.d.ts1.6 KB
- 脚本lib/types/plugin-manifest.d.ts2.8 KB
- 参考文档lib/types/README.md7.4 KB
- 脚本lib/types/skill-frontmatter.d.ts2.5 KB
- 脚本lib/utils/atomic-write.js2.6 KB
- 脚本lib/utils/cache-manager.js3.6 KB
- 脚本lib/utils/context-optimizer.js8.4 KB
- 脚本lib/utils/deprecation.js991 B
- 脚本lib/utils/shell-escape.js2.8 KB
03 SKILL.md 正文
<ci-review-loop>
Phase 4: CI & Review Monitor Loop - Reference
This file contains detailed implementation for the CI & Review Monitor Loop phase of /ship.
Parent document: ship.md
<mandatory-requirements>
This Phase Is Mandatory
This is not optional. You must:
- Wait the full 3 minutes for auto-reviewers
- Run the monitor loop (not just check once)
- Address all comments before merge </mandatory-requirements>
<pr-auto-review>
PR Auto-Review Process
PRs receive automatic reviews from configured auto-reviewers (Copilot, Gemini, CodeRabbit, etc.).
Mandatory workflow:
- After PR creation, wait at least 3 minutes for first review round
- Read all comments from all reviewers
- Address every comment - no exceptions
- Iterate until zero unresolved threads (typically 2-4 rounds)
Rules:
- Always address all comments, including "minor" or "nit" suggestions
- Do not skip a comment unless factually wrong or user-approved
- Treat all feedback as required changes, not suggestions </pr-auto-review>
<overview>
Overview
The monitor loop must wait for:
- CI to pass
- All comments resolved (addressed or replied to)
- No "changes requested" reviews remain
Why All Comments Matter
Every comment must be addressed:
- Critical/High issues: Fix immediately
- Medium issues: Fix (don't defer)
- Minor/Nit issues: Fix (shows attention to quality)
- Style suggestions: Fix (maintains codebase consistency)
- Questions: Answer with explanation
- False positives: Reply explaining why, then resolve
- Not relevant: Reply explaining why, then resolve
Do not ignore comments. Do not leave comments unresolved. A clean PR has zero unresolved conversations. </overview>
The Monitor Loop Algorithm
Note: The JavaScript below is conceptual pseudocode showing the algorithm flow. Implement using bash functions defined in this file.
const MAX_ITERATIONS = 10; // Safety limit
const INITIAL_WAIT_MS = 180000; // 3 minutes - wait for auto-reviews
const ITERATION_WAIT_MS = 30000; // 30 seconds between iterations
let iteration = 0;
while (iteration < MAX_ITERATIONS) {
iteration++;
console.log(`\n## CI & Review Monitor - Iteration ${iteration}`);
// Step 1: Wait for CI to complete
const ciStatus = await waitForCI();
if (ciStatus === 'failed') {
await fixCIFailures();
continue; // Push fix, re-run CI
}
// Step 1.5: First iteration only - wait for auto-reviews
if (iteration === 1) {
console.log("Waiting 3 minutes for auto-reviews...");
await sleep(INITIAL_WAIT_MS);
}
// Step 2: Check for PR comments and reviews
const feedback = await checkPRFeedback();
if (feedback.unresolvedCount === 0 && !feedback.changesRequested) {
console.log("[OK] CI passed, all comments resolved");
break; // Ready to merge!
}
// Step 3: Address ALL feedback
await addressAllFeedback(PR_NUMBER);
// Step 4: Push fixes
if (feedback.hasCodeChanges) {
await commitAndPush(`fix: address review feedback (iteration ${iteration})`);
}
// Step 5: Sleep before next check
await sleep(ITERATION_WAIT_MS);
}
Step 1: Wait for CI
wait_for_ci() {
echo "Waiting for CI checks..."
while true; do
CHECKS=$(gh pr checks $PR_NUMBER --json name,state 2>/dev/null || echo "[]")
PENDING=$(echo "$CHECKS" | jq '[.[] | select(.state | IN("PENDING", "QUEUED", "IN_PROGRESS"))] | length')
FAILED=$(echo "$CHECKS" | jq '[.[] | select(.state | IN("FAILURE", "CANCELLED"))] | length')
PASSED=$(echo "$CHECKS" | jq '[.[] | select(.state=="SUCCESS")] | length')
if [ "$FAILED" -gt 0 ]; then
echo "[ERROR] CI failed ($FAILED checks)"
gh pr checks $PR_NUMBER
return 1
elif [ "$PENDING" -eq 0 ] && [ "$PASSED" -gt 0 ]; then
echo "[OK] CI passed ($PASSED checks)"
return 0
elif [ "$PENDING" -eq 0 ] && [ "$PASSED" -eq 0 ]; then
echo "[WARN] No CI checks found, proceeding..."
return 0
fi
echo " Waiting... ($PENDING pending, $PASSED passed)"
sleep 15
done
}
Step 2: Check PR Feedback
check_pr_feedback() {
local pr_number=$1
echo "Checking PR feedback..."
# Extract owner and repo from git remote
REPO_INFO=$(gh repo view --json owner,name --jq '"\(.owner.login)/\(.name)"')
OWNER=$(echo "$REPO_INFO" | cut -d'/' -f1)
REPO=$(echo "$REPO_INFO" | cut -d'/' -f2)
# Get review state
REVIEWS=$(gh pr view $pr_number --json reviews --jq '.reviews')
CHANGES_REQUESTED=$(echo "$REVIEWS" | jq '[.[] | select(.state=="CHANGES_REQUESTED")] | length')
# Get unresolved review threads
# NOTE: Fetches first 100 threads. For PRs with >100 threads, implement pagination.
UNRESOLVED_THREADS=$(gh api graphql -f query='
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
reviewThreads(first: 100) {
nodes {
isResolved
}
}
}
}
}
' -f owner="$OWNER" -f repo="$REPO" -F pr=$pr_number \
--jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)] | length')
echo " Unresolved threads: $UNRESOLVED_THREADS"
echo " Changes requested: $CHANGES_REQUESTED"
echo "{\"unresolvedThreads\": $UNRESOLVED_THREADS, \"changesRequested\": $CHANGES_REQUESTED}"
}
Get Full Thread Details
get_unresolved_threads() {
local pr_number=$1
REPO_INFO=$(gh repo view --json owner,name --jq '"\(.owner.login)/\(.name)"')
OWNER=$(echo "$REPO_INFO" | cut -d'/' -f1)
REPO=$(echo "$REPO_INFO" | cut -d'/' -f2)
# NOTE: Fetches first 100 threads. For PRs with >100, implement pagination.
gh api graphql -f query='
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
reviewThreads(first: 100) {
nodes {
id
isResolved
path
line
diffHunk
comments(first: 1) {
nodes {
id
body
}
}
}
}
}
}
}
' -f owner="$OWNER" -f repo="$REPO" -F pr=$pr_number \
--jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)'
}
Step 3: Address ALL Feedback
Note: This is conceptual pseudocode showing the algorithm flow. Implement using: gh api, Read, Edit, Task (ci-fixer), etc.
async function addressAllFeedback(prNumber) {
const threads = await getUnresolvedThreads(prNumber);
console.log(`\nAddressing ${threads.length} unresolved threads...`);
for (const thread of threads) {
console.log(`\n--- Thread: ${thread.path}:${thread.line} ---`);
const analysis = analyzeComment(thread);
switch (analysis.type) {
case 'code_fix_required':
console.log(`Action: Fixing code issue`);
await implementFix(thread); // Use Task(ci-fixer) or Edit tool
break;
case 'style_suggestion':
console.log(`Action: Applying style fix`);
await implementFix(thread);
break;
case 'question':
console.log(`Action: Answering question`);
await replyToComment(prNumber, thread.commentId, generateAnswer(thread));
await resolveThread(thread.id);
break;
case 'false_positive':
console.log(`Action: Explaining false positive`);
await replyToComment(prNumber, thread.commentId,
`This is a false positive because: ${analysis.reason}\n\n` +
`Resolving. Please reopen if you disagree.`
);
await resolveThread(thread.id);
break;
case 'not_relevant':
console.log(`Action: Explaining out of scope`);
await replyToComment(prNumber, thread.commentId,
`Outside scope of this PR: ${analysis.reason}\n\n` +
`Resolving. Please reopen if needed.`
);
await resolveThread(thread.id);
break;
case 'already_addressed':
console.log(`Action: Confirming addressed`);
await replyToComment(prNumber, thread.commentId,
`Addressed in commit ${gitRevParseHead}.`
);
await resolveThread(thread.id);
break;
}
}
// Request re-review from those who requested changes
const changesRequestedReviews = await getChangesRequestedReviews(prNumber);
for (const review of changesRequestedReviews) {
await requestReReview(prNumber, review.author);
}
}
Comment Analysis Heuristics
Note: Classification heuristics for comment handling.
function analyzeComment(thread) {
const body = thread.body.toLowerCase();
// Question patterns
if (body.includes('?') || body.startsWith('why') || body.startsWith('how') ||
body.startsWith('what') || body.startsWith('could you explain')) {
return { type: 'question', reason: 'Comment is a question' };
}
// Style/nit patterns
if (body.includes('nit:') || body.includes('nitpick') || body.includes('minor:') ||
body.includes('style:') || body.includes('consider') || body.includes('optional')) {
return { type: 'style_suggestion', reason: 'Style or minor suggestion' };
}
// Out of scope patterns
if (!thread.diffHunk || commentRefersToUnchangedCode(thread)) {
return { type: 'not_relevant', reason: 'Comment refers to unchanged code' };
}
// Default: treat as code fix required
return { type: 'code_fix_required', reason: 'Valid code feedback' };
}
Implementing Fixes
Use the ci-fixer agent for code changes:
Task({
subagent_type: "next-task:ci-fixer",
prompt: `Fix the following review comment:
**File**: ${thread.path}
**Line**: ${thread.line}
**Comment**: ${thread.body}
**Code Context**:
\`\`\`
${thread.diffHunk}
\`\`\`
Requirements:
1. Make the minimal change to address the feedback
2. Do NOT over-engineer or add unrelated changes
3. Ensure tests still pass after the fix`
});
Resolving Threads
resolve_thread() {
local thread_id=$1
gh api graphql -f query='
mutation($threadId: ID!) {
resolveReviewThread(input: {threadId: $threadId}) {
thread {
isResolved
}
}
}
' -f threadId="$thread_id"
}
reply_to_comment() {
local pr_number=$1
local comment_id=$2
local body=$3
REPO_INFO=$(gh repo view --json owner,name --jq '"\(.owner.login)/\(.name)"')
OWNER=$(echo "$REPO_INFO" | cut -d'/' -f1)
REPO=$(echo "$REPO_INFO" | cut -d'/' -f2)
gh api -X POST "repos/$OWNER/$REPO/pulls/$pr_number/comments" \
-f body="$body" \
-F in_reply_to="$comment_id"
}
Step 4: Commit and Push
commit_and_push_fixes() {
local message=$1
local branch=${2:-$(git branch --show-current)}
if [ -n "$(git status --porcelain)" ]; then
git add -A
git commit -m "$message"
git push origin "$branch"
echo "[OK] Pushed fixes"
return 0
else
echo "No code changes to commit (only comment replies)"
return 1
fi
}
Complete Loop Script
#!/bin/bash
# Phase 4: CI & Review Monitor Loop
MAX_ITERATIONS=10
INITIAL_WAIT=${SHIP_INITIAL_WAIT:-180} # Configurable via env var
ITERATION_WAIT=30
iteration=0
while [ $iteration -lt $MAX_ITERATIONS ]; do
iteration=$((iteration + 1))
echo "[CI Monitor] Iteration $iteration"
# Step 1: Wait for CI
if ! wait_for_ci; then
echo "CI failed - launching ci-fixer agent..."
continue
fi
# Step 1.5: First iteration - wait for auto-reviews
if [ $iteration -eq 1 ] && [ "$INITIAL_WAIT" -gt 0 ]; then
echo "First iteration - waiting ${INITIAL_WAIT}s for auto-reviews..."
sleep $INITIAL_WAIT
fi
# Step 2: Check feedback
FEEDBACK=$(check_pr_feedback $PR_NUMBER)
UNRESOLVED=$(echo "$FEEDBACK" | jq -r '.unresolvedThreads')
CHANGES_REQ=$(echo "$FEEDBACK" | jq -r '.changesRequested')
if [ "$UNRESOLVED" -eq 0 ] && [ "$CHANGES_REQ" -eq 0 ]; then
echo "[OK] ALL CHECKS PASSED"
echo "[OK] ALL COMMENTS RESOLVED"
echo "Ready to merge!"
break
fi
# Step 3: Address all feedback
echo "Addressing $UNRESOLVED unresolved threads..."
# Step 4: Commit and push
commit_and_push_fixes "fix: address review feedback (iteration $iteration)"
# Step 5: Wait before next iteration
echo "Waiting ${ITERATION_WAIT}s..."
sleep $ITERATION_WAIT
done
if [ $iteration -ge $MAX_ITERATIONS ]; then
echo "[ERROR] Max iterations reached - manual intervention required"
exit 1
fi
<iteration-summary>
Iteration Summary Output
## Iteration ${iteration} Summary
**CI Status**: [OK] Passed
**Comments Addressed**: ${addressedCount}
- Code fixes: ${codeFixCount}
- Answered questions: ${questionCount}
- Resolved as not applicable: ${notApplicableCount}
**Remaining Unresolved**: ${remainingCount}
${remainingCount > 0 ? 'Continuing...' : 'Ready to merge!'}
</iteration-summary> </ci-review-loop>
04 同仓库更多 Skills
invoice-organizer
Automatically organizes invoices and receipts for tax preparation by reading messy files, extracting key information, renaming them consistently, and sorting them into logical folders. Turns hours of manual bookkeeping into minutes of automated organization.
file-organizer
Intelligently organizes your files and folders across your computer by understanding context, finding duplicates, suggesting better structures, and automating cleanup tasks. Reduces cognitive load and keeps your digital workspace tidy without manual effort.
developer-growth-analysis
Analyzes your recent Claude Code chat history to identify coding patterns, development gaps, and areas for improvement, curates relevant learning resources from HackerNews, and automatically sends a personalized growth report to your Slack DMs.
connect
暂无简介
twitter-algorithm-optimizer
暂无简介
tailored-resume-generator
暂无简介