skills/merge-cop/SKILL.md
Pre-merge code review for Angular + TypeScript pull requests. Diffs current branch against a target branch, applies Angular-specific checklists (signals, RxJS, clean architecture, flurryx, TS strict), runs lint + tsc, and emits a tiered report (verbose for juniors, terse for seniors). Auto-loads project AGENTS.md rules. Use when user runs /cop-review, says "pre-merge review", "review before merging", "check my PR against <branch>", or invokes the merge-cop agent.
npx skillsauth add fmflurry/settings-opencode merge-copInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Pre-merge review. Compares HEAD vs origin/<target>. Angular-aware. Project-aware (reads AGENTS.md). Tooling-aware (runs lint + tsc).
/cop-review <target> slash command| Arg | Required | Default | Meaning |
|---|---|---|---|
| <target> | yes | — | Target branch (e.g. main, develop, release/x) |
| --level | no | auto | junior (verbose teaching) or senior (terse). Auto = senior. |
| --scope | no | all | Comma list: signals,rxjs,arch,flurryx,ts,a11y |
| --no-tools | no | false | Skip lint + tsc (static review only) |
git merge-base HEAD origin/<target>..HEAD. Never review changes already on target.❓ q: instead of speculative 🔴 bug:.AGENTS.md overrides this skill. Re-read on every run; do not cache between sessions.1. Parse args -> target, level, scope
2. git fetch <remote> <target> (silent; --quiet)
3. base = git merge-base HEAD <remote>/<target>
4. changed = git diff --name-status base..HEAD
5. Load <repo>/AGENTS.md (if exists) -> project rules
6. For each changed file:
- Skim full file (not just hunk) for context
- Apply relevant sub-checklists by extension/role:
*.component.ts / *.html -> signals.md, rxjs.md, clean-architecture.md, a11y
*.facade.ts / *.store.ts -> flurryx.md, clean-architecture.md
*.adapter.ts / *.port.ts -> clean-architecture.md
*.ts -> typescript-strict.md
7. If !--no-tools:
- npm run lint -- --quiet (or eslint --quiet) on changed files
- npx tsc --noEmit (full project; abort early on first 50 errors)
8. Aggregate findings -> render via output-format.md
| Tag | Meaning | Action | |---|---|---| | 🔴 bug | broken behavior, runtime crash, data loss | BLOCK merge | | 🟠 sec | security risk (XSS, leaked secret, auth bypass) | BLOCK merge | | 🟡 risk | works today, fragile tomorrow (leak, race, missing teardown) | Fix before merge | | 🟢 arch | violates project architecture / layering | Fix before merge | | 🔵 nit | style, naming, micro-optim | Optional | | ❓ q | genuine question | Author decides |
Promote to BLOCK if AGENTS.md flags the category as mandatory.
any, immutability, narrowing, no !, readonlyAlways:
test -f AGENTS.md && cat AGENTS.md
test -f .agent/AGENTS.md && cat .agent/AGENTS.md
Parse rule blocks. Where this skill and AGENTS.md disagree, AGENTS.md wins. Cite the AGENTS.md line in the finding: (AGENTS.md §<section>).
Single markdown document, sections in fixed order:
APPROVE / APPROVE-WITH-CHANGES / BLOCK.See [[merge-cop-output-format]] for full templates.
e2e-runner / tdd-guide).development
Scaffolds and extends Angular 18+ standalone features using Clean Architecture with DDD layering (presentation/application/domain/infrastructure), custom signal-based stores, facade pattern, and ports/adapters dependency inversion. Use when creating new Angular features/domains, adding use cases/facades/stores/ports/adapters, refactoring legacy NgModule/NgRx code toward clean architecture, or working with cross-domain communication via context registry.
testing
Use this skill for any git work such as creating branches, staging changes, writing commit messages, pushing branches, or preparing pull requests. Delegates git execution to the git-specialist agent.
development
Signal-first reactive state management for Angular. Bridge RxJS streams into cache-aware stores, keyed resources, mirrored state, and replayable history. Use when generating or modifying Angular code that uses flurryx for state management, or when scaffolding new feature modules that follow the flurryx facade pattern.
development
evidence-first decision-gating for planning, design, architecture, and refactor requests with unresolved requirements, scope, constraints, facts, or tradeoffs. use when the next safe step is to ask exactly one dependency-safe question before proposing a plan or implementation, especially when critical decisions are not yet closed.