Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

agent-ops-selective-copy

БесплатноБез исполняемых скриптовНе проверен

Create clean git branches from feature work, excluding agent-ops files. Use for PR preparation.

diegosouzapwот diegosouzapw★ 68 звёзд на GitHub

Об этом скилле

Selective Copy — Clean Branch Creation

Create a clean git branch from feature work, excluding specific paths. Platform agnostic.

Works with or without aoc CLI. Uses standard git commands.


Purpose

Create a new branch containing feature work while excluding agent/workflow files for clean PRs.


CRITICAL: No Assumptions

NEVER assume. NEVER guess. ALWAYS ask.

Before creating ANY clean branch, confirm with user:

If unclear about... ASK
Source branch "Which branch contains your feature work?"
Clean branch name "I'll create {name}. Does this look right?"
Base branch "Which branch should excluded paths be restored from? (e.g., develop, main)"
What to exclude "What paths should I exclude? (Default: .agent/, .github/)"

If ANY of these are ambiguous:

  1. Stop
  2. Ask ONE question at a time
  3. Wait for explicit confirmation
  4. Only proceed when ALL inputs are confirmed

NEVER:

  • Guess the base branch
  • Assume exclusions without asking
  • Create a branch without showing the user the exact name first
  • Proceed if source branch is unclear

Prerequisites

MANDATORY: File Audit Trail

The file-created.log MUST exist before proceeding. This ensures we know which files to exclude.

If .agent/log/created-files.log does not exist:

  1. Generate it from git history (see Generation Procedure below)
  2. Present to user for validation
  3. Only proceed after user confirms the list

This prevents accidental inclusion of agent-ops files in the clean branch.


Invocation

User says something like:

  • "Create a clean branch for PR"
  • "Make a branch without .agent and .github changes"
  • "Prepare my feature for code review"

Arguments

Argument Description Default
source_branch Feature branch with work Current branch
new_branch Name for clean branch {source_branch}-clean
base_branch Branch to restore excluded paths from Auto-detect
exclusions Paths/patterns to exclude Prompt user

Workflow

1. Gather Requirements

If not provided, ask:

  1. Source branch (default: current)
  2. New branch name (default: {current}-clean)
  3. Base branch — try auto-detect first:
# PowerShell: Find merge-base with main or develop
$mainBase = git merge-base HEAD main 2>$null
$devBase = git merge-base HEAD develop 2>$null

if ($mainBase) { $baseBranch = "main" }
elseif ($devBase) { $baseBranch = "develop" }
else { 
    # Ask user
    Write-Host "Could not auto-detect base branch. Which branch was this feature branched from?"
}
# Bash: Find merge-base
main_base=$(git merge-base HEAD main 2>/dev/null)
dev_base=$(git merge-base HEAD develop 2>/dev/null)

if [ -n "$main_base" ]; then
    base_branch="main"
elif [ -n "$dev_base" ]; then
    base_branch="develop"
else
    echo "Could not auto-detect base branch. Which branch was this feature branched from?"
fi
  1. Exclusions — if not specified, prompt:
Would you like to exclude agent-ops files? This includes:
- `.agent/` directory
- `.github/skills/`, `.github/prompts/`, `.github/agents/`

Additionally, agent-ops created these files outside .agent/:
{list from .agent/log/created-files.log}

[1] Exclude all agent-ops files (recommended)
[2] Exclude only .agent/ and .github/
[3] Let me specify custom paths
[4] Don't exclude anything

2. Check and Generate Audit Trail (MANDATORY)

Before proceeding, verify .agent/log/created-files.log exists.

# PowerShell
$logPath = ".agent/log/created-files.log"
if (-not (Test-Path $logPath)) {
    Write-Host "⚠️  File audit trail not found: $logPath" -ForegroundColor Yellow
    Write-Host "Generating from git history..." -ForegroundColor Cyan
    # Proceed to generation
} else {
    Write-Host "✓ Audit trail found: $logPath" -ForegroundColor Green
    # Skip to step 3
}
# Bash
log_path=".agent/log/created-files.log"
if [ ! -f "$log_path" ]; then
    echo "⚠️  File audit trail not found: $log_path"
    echo "Generating from git history..."
    # Proceed to generation
else
    echo "✓ Audit trail found: $log_path"
    # Skip to step 3
fi

If log is missing, generate it:

Generation Procedure

  1. Find the branch point (where feature diverged from base):
# PowerShell
$baseBranch = "develop"  # or auto-detected
$branchPoint = git merge-base HEAD $baseBranch
Write-Host "Branch point: $branchPoint"
# Bash
base_branch="develop"
branch_point=$(git merge-base HEAD "$base_branch")
echo "Branch point: $branch_point"
  1. List files added since branch point (excluding .agent/ and .github/):
# PowerShell
$addedFi
Полный SKILL.md на GitHub

Установить agent-ops-selective-copy в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

metadata.json

FAQ

Что делает скилл agent-ops-selective-copy?

Create clean git branches from feature work, excluding agent-ops files. Use for PR preparation.

Как установить скилл agent-ops-selective-copy?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл agent-ops-selective-copy запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить agent-ops-selective-copy с