Skip to content
FunCoding

Search

Search docs, Skills and MCP

autonomous-pr

Otonom PR yasam dongusu. PR olustur, CI bekle, hata varsa duzelt, review feedback'i uygula, merge'e hazirla. Budget ve zaman limiti ile kontrol altinda tutulan tam otonom PR pipeline'i.

AI 与智能体531skills/autonomous-pr/SKILL.md

Install

Send this to Claude Code, Codex or Cursor. The agent checks the Skill for safety first and installs it only after you confirm.

读取 https://funcoding.ai/skills/vibeeval/vibecosystem/autonomous-pr/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

Autonomous PR Lifecycle

PR'i olusturmaktan merge'e kadar tum sureci otonom yonet. CI basarisiz olursa duzelt, review feedback gelirse uygula, butce asarsa dur.

PR Pipeline

1. BRANCH    → Feature branch olustur
2. IMPLEMENT → Kodu yaz (kraken/spark)
3. VERIFY    → Lokal test + lint + build
4. PR CREATE → gh pr create
5. CI WAIT   → CI pipeline'i bekle
6. CI FIX    → Basarisizsa duzelt, tekrar push (max 3)
7. REVIEW    → Review feedback bekle
8. APPLY     → Feedback'i uygula
9. READY     → Merge'e hazir bildir

Kullanim

Basit: Tek PR

# Claude'a otonom PR olusturttir
claude -p "
Feature: kullanici profil sayfasi ekle
Branch: feat/user-profile
PR target: main

Pipeline:
1. Branch olustur
2. Implement et
3. Test yaz
4. PR olustur
5. CI bekle ve fix et
6. Hazir olunca bildir
"

Gelismis: Budget ve Zaman Limiti

claude -p "
Feature: auth middleware refactor
Branch: refactor/auth-middleware
PR target: main

Limitler:
  --budget 500K tokens    # Max token harcama
  --max-duration 30m      # Max sure
  --max-ci-retries 3      # Max CI fix denemesi
  --auto-merge false      # Merge'i ben onaylayacagim

Basarisiz olursa:
  Draft PR olarak birak, ne yaptigini acikla
"

CI Fix Dongusu

CI BASARISIZ
  │
  ├─ Build hatasi?
  │   └─ build-error-resolver agent cagir
  │      └─ Fix → Push → CI tekrar bekle
  │
  ├─ Test basarisiz?
  │   └─ Hata mesajini oku
  │      ├─ Test kodu hatali → Test'i duzelt
  │      └─ Implementation hatali → Kodu duzelt
  │      └─ Push → CI tekrar bekle
  │
  ├─ Lint hatasi?
  │   └─ Otomatik fix (prettier, eslint --fix)
  │      └─ Push → CI tekrar bekle
  │
  ├─ Type hatasi?
  │   └─ Type fix uygula
  │      └─ Push → CI tekrar bekle
  │
  └─ 3. deneme basarisiz?
      └─ DURR → Draft PR olarak birak
         └─ PR body'ye aciklama yaz

CI Fix Script

#!/bin/bash
# scripts/ci-fix-loop.sh

MAX_RETRIES=3
RETRY=0

while [ $RETRY -lt $MAX_RETRIES ]; do
  echo "=== CI Check (attempt $((RETRY + 1))/$MAX_RETRIES) ==="

  # CI durumunu kontrol et
  STATUS=$(gh pr checks --json state -q '.[].state' | sort -u)

  if echo "$STATUS" | grep -q "SUCCESS"; then
    echo "CI PASSED"
    exit 0
  fi

  if echo "$STATUS" | grep -q "PENDING"; then
    echo "CI bekliyor..."
    sleep 30
    continue
  fi

  # Basarisiz -- fix dene
  RETRY=$((RETRY + 1))
  echo "CI FAILED (attempt $RETRY)"

  # Hata detayini al
  FAILED=$(gh pr checks --json name,state -q '.[] | select(.state=="FAILURE") | .name')

  for check in $FAILED; do
    echo "Fixing: $check"
    # Claude'a fix ettir
    claude -p "CI check '$check' failed. Read the error, fix it, commit." --no-input
  done

  git push
  sleep 60  # CI'in yeniden baslamasini bekle
done

echo "CI FIX BASARISIZ ($MAX_RETRIES deneme)"
exit 1

Review Feedback Dongusu

REVIEW GELDI
  │
  ├─ Approval?
  │   └─ MERGE'E HAZIR
  │
  ├─ Changes requested?
  │   └─ Her yorumu oku
  │      ├─ Kod degisikligi isteniyor → Uygula
  │      ├─ Soru soruluyor → Cevapla (PR comment)
  │      └─ Mimari itiraz → DURDUR, kullaniciya bildir
  │   └─ Degisiklikleri push et
  │   └─ Re-review iste
  │
  └─ Comment only?
      └─ Cevaplanmasi gereken varsa cevapla

Review Feedback Uygulama

# PR review comment'lerini oku
gh pr view <PR_NUMBER> --comments --json comments

# Her comment icin fix uygula
claude -p "
PR #<NUMBER> icin su review feedback geldi:

$(gh api repos/OWNER/REPO/pulls/<NUMBER>/comments | jq -r '.[] | "File: \(.path):\(.line)\nComment: \(.body)\n---"')

Her feedback'i uygula, commit et.
"

git push
gh pr review <PR_NUMBER> --comment --body "Review feedback uygulandı, tekrar bakabilir misiniz?"

Budget Kontrol

Token Sayaci

# Session token kullanimi takibi
# Her agent cagrisinda tahmini token sayisini artir
TOKEN_USED=0
TOKEN_BUDGET=500000  # 500K limit

check_budget() {
  if [ $TOKEN_USED -gt $TOKEN_BUDGET ]; then
    echo "BUDGET ASILDI: $TOKEN_USED / $TOKEN_BUDGET tokens"
    echo "Otonom islem durduruluyor."
    # Draft PR olarak birak
    gh pr ready --undo 2>/dev/null
    exit 1
  fi
}

Zaman Kontrol

START_TIME=$(date +%s)
MAX_DURATION=1800  # 30 dakika

check_time() {
  ELAPSED=$(($(date +%s) - START_TIME))
  if [ $ELAPSED -gt $MAX_DURATION ]; then
    echo "ZAMAN LIMITI: ${ELAPSED}s / ${MAX_DURATION}s"
    echo "Mevcut durumu kaydet ve dur."
    git add -A && git commit -m "WIP: zaman limiti asildi" || true
    gh pr create --draft --title "WIP: $FEATURE" --body "Zaman limiti nedeniyle duraklatildi." 2>/dev/null
    exit 1
  fi
}

Guvenlik Kurallari

1. ASLA --force push yapma
2. ASLA main/master'a direkt push yapma
3. ASLA review olmadan merge yapma (auto-merge false default)
4. Secret/credential commit ETME
5. Budget asiminda DURDUR, devam etme
6. CI 3 kez basarisizsa DURDUR, draft birak
7. Mimari itirazda DURDUR, kullaniciya sor

vibecosystem Entegrasyonu

  • shipper agent: Release PR'lari icin bu pipeline'i kullanir
  • build-error-resolver agent: CI fix dongusunde build hatalarini cozer
  • code-reviewer agent: Self-review yapar push oncesi
  • verifier agent: Lokal verify adiminda calisir
  • kraken agent: Implementation adiminda TDD ile yazar
  • /commit skill: PR icindeki commit'leri yonetir

Similar Skills

brand-guidelines
anthropics/skills180k

brand-guidelines

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

AI & agents

internal-comms
anthropics/skills180k

internal-comms

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

AI & agents

template-skill
anthropics/skills180k

template-skill

Replace with description of the skill and when Claude should use it.

AI & agents

mcp-builder
anthropics/skills180k

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

AI & agents

algorithmic-art
anthropics/skills180k

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

AI & agents

academy-guide
anthropics/skills180k

academy-guide

Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.

AI & agents