autoresearch-finalize
Finalize an autoresearch session into clean, reviewable branches. Use when asked to "finalize autoresearch", "clean up experiments", or "prepare autoresearch for review".
What this skill does
# Finalize Autoresearch
Turn a noisy autoresearch branch into clean, independent branches — one per logical change, each starting from the merge-base.
## Step 1 — Analyze and Propose Groups
1. Read `autoresearch.jsonl`. Filter to **kept** experiments only.
2. Read `autoresearch.md` for context.
3. Expand all short commit hashes to full hashes: `git rev-parse <short_hash>`
4. Get the merge-base: `git merge-base HEAD main`
5. For each kept commit, get the diff stat (use `$BASE..<commit>` for the first, `<prev_kept>..<commit>` for subsequent).
6. Group kept commits into logical changesets:
- **Preserve application order.** Group N comes before Group N+1.
- **No two groups may touch the same file.** Each branch is applied to merge-base independently — overlapping files would conflict. If two groups touch the same file, merge them into one group.
- **Watch for cross-file dependencies.** Each branch is independent, so if group 1 adds an API in `api.js` and group 2 calls it in `parser.js`, group 2's branch won't work in isolation. When proposing groups, flag dependencies: "group 2 depends on group 1 — review together." If the dependency is tight, merge the groups.
- **Keep each group small and focused.** One idea, one theme per group.
- **Don't hardcode a count.** Could be 2, could be 15.
Present the proposed grouping to the user:
```
Proposed branches (each from merge-base, independent):
1. **Switch test runner to forks pool** (commits abc1234, def5678)
Files: vitest.config.ts, package.json
Metric: 42.3s → 38.1s (-9.9%)
2. **Tune worker count and timeouts** (commits ghi9012, jkl3456)
Files: test/setup.ts
Metric: 38.1s → 31.7s (-16.8%)
```
**Wait for approval before proceeding.**
## Step 2 — Write groups.json and Run
Write `groups.json`:
```json
{
"base": "<full merge-base hash>",
"trunk": "main",
"final_tree": "<full hash of current HEAD>",
"goal": "short-slug",
"groups": [
{
"title": "Switch to forks pool",
"body": "Why + what changed.\n\nExperiments: #3, #5\nMetric: total_time 42.3s → 38.1s (-9.9%)",
"last_commit": "<full hash of last kept commit in this group>",
"slug": "forks-pool"
}
]
}
```
Key rules:
- **`last_commit` must be a full hash.** Expand from jsonl short hashes with `git rev-parse`.
- **No two groups may share a file.** The script validates this and fails if violated.
Then run:
```bash
bash <SKILL_DIR>/finalize.sh /tmp/groups.json
```
The script creates one branch per group from the merge-base, verifies the union matches the original branch, and prints a summary with all branches, cleanup commands, and any ideas from `autoresearch.ideas.md`.
On creation failure: rolls back (deletes branches, restores original branch, pops stash).
On verification failure: exits non-zero but leaves branches intact for inspection.
## Step 3 — Report
After the script finishes, report to the user:
- Branches created and what each contains
- Overall metric improvement (baseline → best)
- Show the cleanup commands from the script's summary output
## Edge Cases
- **Only 1 kept experiment**: One branch is fine — don't force splits.
- **Overlapping files between groups**: The script fails with an error naming the file. Merge the overlapping groups and retry.
- **Non-experiment commits** on the branch: Skip them — only process kept experiments from the jsonl.
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.