incremental_implement
Skill2 starsChanged 5 months agoMITView on GitHub
Full PR lifecycle via isolated worktree, atomic commits, PR creation, and a strict verification loop (CI + code-review) until merged.
- Commits and pushes
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- devcontainer-bridgeSkill
- memory-engineSkill
- newsletter-summarySkill
- process-delegate-tasksSkill
- code-reviewSkill
- git-masterSkill
- implement_taskSkill
- investigate_issueSkill
- planning-and-task-breakdownSkill
- request_featureSkill
- test-driven-developmentSkill
- write_prdSkill
- evolution-logSkill
- flow-tracerSkill
- rcaSkill
- agent-browserSkill
- content-cleanerSkill
- content-summarySkill
- daily-distillerSkill
- daily-workflowSkill
- decision-sparringSkill
- fetch-threads-postSkill
- ingest-newsletterSkill
- ingest-threadsSkill
- ingest-websiteSkill
- ingest-youtubeSkill
- review-newsletter-subscriptionsSkill
- review-suggestionsSkill
- rubric-graderSkill
- study-github-repoSkill
- web-to-markdownSkill
- yt2docSkill
- agent-rules-reviewerSkill
- architecture-decision-recordsSkill
- cavemanSkill
- documentationSkill
- grill-meSkill
- insightSkill
- skill-context-refactorSkill
- tech-deconstructorSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
When to invoke: When the user prompts 'create a PR', 'implement and PR', 'work on this and make a PR', 'implement issue', 'land this as a …
- Distinctive: line 29
When the user explicitly requests working in the current active directory without isolation.
- Distinctive: line 40
Create a sibling worktree to prevent polluting the user's uncommitted state.
- Very specific: line 44
Create worktree: WORKTREE_PATH="../$(basename "$PWD")-wt/${BRANCH_NAME}", mkdir -p "$(dirname "$WORKTREE_PATH")", git worktree add …
- Very specific: line 50
Commit atomically using the git-master skill (e.g., 3+ files changed = 2+ commits).
- Distinctive: line 51
Run local validation before pushing (e.g., the project's native build, test, and linting scripts).
- Very specific: line 55
Create PR: Execute gh pr create with base dev, head $BRANCH_NAME, and a formatted body containing "Summary", "Changes", and "Testing" …
- Very specific: line 60
Gate A (CI Checks): Run gh pr checks "$PR_NUMBER" --watch --fail-fast.
- Very specific: line 62
Gate B (code-review): Only execute if Gate A passes.
- Distinctive: line 71
If an unrecoverable error occurs (e.g., merge conflicts with base), DO NOT delete the worktree.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
🎯 Purpose
To execute a complete, safe Pull Request lifecycle. The skill isolates work in a sibling directory, implements requested changes via atomic commits, creates a PR, and enforces an unbounded verification loop (CI and AI peer review) until the code is proven stable and merged.
The Increment Cycle
┌──────────────────────────────────────┐
│ │
│ Implement ──→ Test ──→ Verify ──┐ │
│ ▲ │ │
│ └───── Commit ◄─────────────┘ │
│ │ │
│ ▼ │
│ Next slice │
│ │
└──────────────────────────────────────┘🚪 Gating & Trigger Conditions
- When to invoke: When the user prompts 'create a PR', 'implement and PR', 'work on this and make a PR', 'implement issue', 'land this as a PR', 'work-with-pr', 'PR workflow', 'implement end to end', or 'implement X' (when context implies safe PR delivery).
- When NOT to invoke: - Directly committing to
masterordevbranches.- When the user explicitly requests working in the current active directory without isolation.
- Simple file edits where no CI or verification is necessary.
📥 Input Specifications
TASK_SUMMARY: The goal or issue description provided by the user.CONSTRAINTS: Any specific architectural or stylistic rules.- Inferred Context: Repository name, current working directory (
$PWD), and base branch (defaulting todev).
⚙️ Execution Instructions (Workflow)
1. Setup Isolated Worktree Create a sibling worktree to prevent polluting the user's uncommitted state.
- Resolve repo context:
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)andBASE_BRANCH="dev". - Generate branch name:
BRANCH_NAME="feature/$(echo "$TASK_SUMMARY" | tr '[:upper:] ' '[:lower:]-' | head -c 50)". - Fetch and branch:
git fetch origin "$BASE_BRANCH"thengit branch "$BRANCH_NAME" "origin/$BASE_BRANCH". - Create worktree:
WORKTREE_PATH="../$(basename "$PWD")-wt/${BRANCH_NAME}",mkdir -p "$(dirname "$WORKTREE_PATH")",git worktree add "$WORKTREE_PATH" "$BRANCH_NAME". - Enter worktree and install project dependencies using the appropriate package manager based on the repository's lockfiles.
2. Implement & Pre-Validate
- Implement EXACTLY ONE task from the
TASK_SUMMARY. Keep scope strictly minimal to this single task. Do NOT implement multiple tasks or refactor unrelated code. - You must halt and request human review BEFORE moving to any subsequent tasks. If a task is completed, you MUST wait for the user to initiate a brand-new chat session for the next task.
- Commit atomically using the
git-masterskill (e.g., 3+ files changed = 2+ commits). - Run local validation before pushing (e.g., the project's native build, test, and linting scripts). Fix local failures and commit atomically before proceeding.
3. PR Creation
- Push branch:
git push -u origin "$BRANCH_NAME". - Create PR: Execute
gh pr createwith basedev, head$BRANCH_NAME, and a formatted body containing "Summary", "Changes", and "Testing" checklists. - Capture PR number:
PR_NUMBER=$(gh pr view --json number -q .number).
4. Verification Loop
Enter an unbounded while loop until both gates pass:
- Gate A (CI Checks): Run
gh pr checks "$PR_NUMBER" --watch --fail-fast.- If failed: Fetch logs (
gh run view "$RUN_ID" --log-failed), fix the specific issue, commit, push, and restart the loop at Gate A.
- If failed: Fetch logs (
- Gate B (code-review): Only execute if Gate A passes. Invoke the
code-reviewskill targeting$BRANCH_NAMEand$WORKTREE_PATH.- If failed: Address blocking issues reported by the reviewers, commit, push, and restart the loop at Gate A (new code requires new CI).
- Break loop when both Gate A and Gate B pass simultaneously.
5. Merge & Cleanup
- Merge PR:
gh pr merge "$PR_NUMBER" --squash --delete-branch. - Cleanup: Return to the original directory (
cd "$ORIGINAL_DIR"), rungit worktree remove "$WORKTREE_PATH", andgit worktree prune.
6. Fallback Behaviors
- If an unrecoverable error occurs (e.g., merge conflicts with base), DO NOT delete the worktree.
- Output the
$WORKTREE_PATHto the user and halt execution so they can manually inspect or resolve the state.
📤 Output Specifications
- A markdown-formatted summary report detailing:
- PR Number and Title
- Branch routing (
feature-branch→main) - Number of iterations in the verification loop
- Confirmation of CI and code-review passage
- Worktree cleanup status
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

