Implement issue

From dlt-hub/dlt · View interactive version

Implement issue is an AI agent skill from the GitHub repository dlt-hub/dlt. Triage, plan, and implement a fix or feature for a GitHub issue end-to-end

How to use this skill

Skill file

Implement Issue

Parse $ARGUMENTS to extract:

Steps

1. Fetch the issue

gh issue view ISSUE --json title,body,comments,labels,state,assignees,author,createdAt,milestone

Produce a concise summary: title, reporter, component/area involved, error message, reproduction steps, expected behavior.

2. Determine category and gather hints

Category

Derive the branch category from the issue labels:

| Label contains | Category |

|---|---|

| bug | fix |

| enhancement, feature | feat |

| test | test |

| documentation | docs |

If no matching label exists, ask the human for the category.

Hints

Collect implementation hints from all available sources, in priority order:

  1. Maintainer hints from $ARGUMENTS (after --)
  2. Issue comments — look for maintainer/contributor replies with technical guidance, root cause analysis, or implementation suggestions
  3. Issue body — the reporter may include debugging details, stack traces, or configuration

If the combined hints from these sources provide sufficient direction (suspected root cause, relevant code areas, constraints), proceed directly to step 3 without asking the human.

If hints are insufficient — the issue is vague, the root cause is unclear, or there are multiple possible approaches — ask the human for guidance.

3. Research the big picture

Before jumping to a fix, verify assumptions. This step prevents wasted effort on the wrong solution.

3a. Understand the feature area

Use Explore agents to thoroughly investigate the relevant code paths. Trace the flow from user-facing API to the point of failure. Read the code — don't guess.

3b. Validate the reporter's setup

Check whether the reporter is using the library correctly:

3c. Check external dependencies and integrations

If the issue involves specific external systems (destinations, sources, file formats, etc.):

3d. Determine: bug or user error?

Based on research, conclude one of:

Report findings to the human before moving on.

4. Set up workspace

Before planning, create the working environment so plan-mode exploration runs against a clean branch.

4a. Determine branch name

Use the category from step 2 and the issue number:

{category}/{issue-number}-{short-description}

Example: fix/3529-dedup-sort-escape

If ISSUE was already a branch name rather than a number (no ticket exists), use it as given.

4b. Create worktree and dev environment

Invoke the /worktree-from-issue skill with the branch name:

/worktree-from-issue {branch-name}

This creates the worktree, checks out a new branch from origin/devel, and runs /worktree-make-dev.

Use it also when there is no issue number.

Note the worktree path — referred to as WORKTREE below.

Verify that the cwd is now inside the worktree:

pwd

If pwd does not show WORKTREE, run cd WORKTREE and verify again. Stop with an error if the cwd cannot be set. Once confirmed, subsequent Bash calls will run inside the worktree automatically.

5. Draft implementation plan

Enter plan mode and design a plan that will pass the /review-pr skill. The review-pr skill checks:

  1. Code quality: Style conforming to @CLAUDE.md, no over-engineering, proper use of existing patterns and utilities.
  2. Test coverage: Required scenarios identified, tests in the right location, no duplication, proper parametrization.
  3. Documentation: Public API changes need doc updates.
  4. Backward compatibility: Breaking changes flagged with deprecation path.
  5. Dependencies: Changes to pyproject.toml flagged.

The plan must include:

Present the plan via ExitPlanMode for human approval.

6. Implement the fix

Apply the changes from the approved plan. Follow these rules:

7. Verify

Run verification in this order. Stop and fix issues before proceeding to the next step.

7a. Run the new test selectively

Run only the new/changed test functions using the commands from the plan. Be selective — target specific test functions, not entire modules.

7b. Regression proof (for external system interactions)

When the fix involves an external system (destination, source, API) where you don't have full visibility into the behavior — a "black box" — verify experimentally that the test actually catches the bug:

This is valuable when you cannot fully predict how the external system handles the input (e.g., how a database treats unquoted identifiers, how an API responds to edge-case payloads). It proves the test is meaningful and not a no-op.

Skip this step when the code path is fully internal and you can reason about correctness from the code alone.

7c. Format and lint
make format && make lint

If you changed pages under docs/website/docs, also run make md-fix && make md-check in docs/.

All must pass cleanly. Fix any issues before reporting.

8. Report

Summarize results:

## Fix for #ISSUE: <title>

**Branch**: {branch-name}
**Worktree**: WORKTREE

### Changes
- `<file>`: <description> (<lines> lines)
- ...

### Verification
- <test-function> on <config>: passed
- <test-function> on <config> without fix: FAILED (confirms bug) [if applicable]
- make format: pass
- make lint: pass

Ready to commit.

Wait for the human to confirm before committing.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.