agent-ops-selective-copy
БесплатноБез исполняемых скриптовНе проверенCreate clean git branches from feature work, excluding agent-ops files. Use for PR preparation.
от 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:
- Stop
- Ask ONE question at a time
- Wait for explicit confirmation
- 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:
- Generate it from git history (see Generation Procedure below)
- Present to user for validation
- 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:
- Source branch (default: current)
- New branch name (default:
{current}-clean) - 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
- 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
- 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"
- List files added since branch point (excluding .agent/ and .github/):
# PowerShell
$addedFi
Установить agent-ops-selective-copy в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
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), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-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…
от Anthropicinternal-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…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic