Skip to content
Back to skills

Decomposition 2026 11 05

ASecurity

git checkout main && git pull git branch --format='%(refname:short)' | grep -vx 'main' | xargs -r -n1 git branch -D ``` `-D` — принудительное удаление (в т.ч. неслитых). Если хотите удалять только слитые — используйте `-d`.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
ai-agentsbashgitapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned November 11, 2026

npx -y skills add Siririn77/i-have-autism --skill decomposition-2026-11-05 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Decomposition 2026 11 05?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Decomposition 2026 11 05
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/siririn77-decomposition-2026-11-05-723be7ef/badge)](https://www.skillsdirectory.com/skills/siririn77-decomposition-2026-11-05-723be7ef)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
Я не могу выполнить это за вас — у меня в этом чате нет доступа к вашему репозиторию или терминалу. Но вот готовые команды, которые делают ровно это. Выполните их локально, если у вас есть права на push в удалённый репозиторий.

## 1. Сначала посмотрите, что будет удалено

```bash
git fetch --prune origin
git branch -vv                 # локальные ветки и их merge-статус
git for-each-ref --format='%(refname:strip=3)' refs/remotes/origin
```

Убедитесь, что в ветках нет неслитых коммитов, иначе они потеряются (для локальных — восстановимы через reflog, для удалённых — только если сервер их ещё не «собрал»).

## 2. Удалить локальные ветки, кроме `main`

```bash
# переключиться на main и подтянуть его
git checkout main && git pull

# удалить все локальные ветки, кроме main
git branch --format='%(refname:short)' | grep -vx 'main' | xargs -r -n1 git branch -D
```

`-D` — принудительное удаление (в т.ч. неслитых). Если хотите удалять только слитые — используйте `-d`.

## 3. Удалить ветки в origin, кроме `main`

```bash
git for-each-ref --format='%(refname:strip=3)' refs/remotes/origin \
  | grep -vx -e 'main' -e 'HEAD' \
  | xargs -r -n1 git push origin --delete
```

То же самое одной строкой через `git push` со списком (если веток немного):

```bash
git push origin --delete branch1 branch2 branch3
```

## Что важно учесть

- **Необратимость.** Удалённые ветки в origin пропадут у всех; открытые pull/merge request'ы из них закроются (в GitHub/GitLab их потом можно «переоткрыть» из восстановленной ветки, но не автоматически).
- **Защищённые ветки.** Если в настройках репозитория включена защита веток (protected branches) или правила вида `release/*`, push будет отклонён — сначала снимите защиту.
- **`main` — ветка по умолчанию.** Если дефолтная ветка в репозитории до сих пор `master` или другая, её удалить не дадут, пока не смените default branch в настройках.
- **Резервная копия.** Перед массовым удалением дёшево сделать бэкап:
  ```bash
  git bundle create backup-all.bundle --all
  ```
- **Только локально, без удалённых:** если речь только про локальный репозиторий, шаг 3 пропустите.

## Альтернатива: GitHub CLI

```bash
gh repo view --json defaultBranchRef -q .defaultBranchRef.name   # проверить default
gh api --paginate repos/:owner/:repo/branches --jq '.[].name' \
  | grep -vx main \
  | xargs -r -n1 gh api -X DELETE repos/:owner/:repo/git/refs/heads/{}
```

Если хотите, пришлите вывод `git for-each-ref --format='%(refname:strip=3)' refs/remotes/origin` — я подскажу, какие ветки безопасно удалять, а какие стоит сначала влить в `main`.

Files in this skill

  • SCORE.md6.6 KB
  • answer-estimate_with-skill.md4 KB
  • answer-estimate_without-skill.md3 KB
  • answer-next-step_with-skill.md1.1 KB
  • answer-next-step_without-skill.md2.7 KB
  • answer-no-preamble_with-skill.md2.5 KB
  • answer-no-preamble_without-skill.md2.7 KB
  • cases.json14.4 KB
  • code-edge-negative_with-skill.md2 KB
  • code-edge-negative_without-skill.md2.2 KB
  • comment-says-why_with-skill.md2.8 KB
  • comment-says-why_without-skill.md1.2 KB
  • decomposition-huge_with-skill.md14.3 KB
  • decomposition-huge_without-skill.md9.8 KB
  • decomposition-small_with-skill.md1.4 KB
  • decomposition-small_without-skill.md242 B
  • destructive-needs-confirmation_with-skill.md3.5 KB
  • destructive-needs-confirmation_without-skill.md3.7 KB
  • disagree-first-line_with-skill.md1.9 KB
  • disagree-first-line_without-skill.md1.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.