Skip to main content

Prompt library

This page collects short starting prompts for common tasks. Replace the file, method, and check names with your own. The full workflow and the safety measures are described in the linked guides.

Understand code

Mode: Ask.
Attach: a class, method, or test as the entry point.

Explain how data travels from this method to the result. Find the main calls
and implementations. For every conclusion, name the file and the symbol.
Do not change anything.

Done when: the conclusions are backed by real symbols, and assumptions are marked separately.
Open the guide

Check a library API

Mode: Ask.
Attach: the call site of the library and the error or the question about the API.

Check the signature and the implementation of this method in the version of the
library linked to the project. Explain the parameters, the result, and the
exceptions. Refer to the classes and methods you found.

Done when: the agent has examined exactly the version of the dependency that is linked to the project.
Open the guide

Change code safely

Mode: General or Code.
Attach: the target file, the expected behavior, and the check.

Make this change only in the files listed. First find the related usages and
tests, then make the minimal edit. Run the related check and report the result.

Done when: the check passes and the diff stays inside the agreed scope.
Open the guide

Fix a bug

Mode: Debug.
Attach: the reproduction steps, the stack trace, or the failing test.

Reproduce the error using an existing run configuration. Set a breakpoint
before the divergence and confirm the cause from the values and the call stack.
Do not change code until the cause is confirmed.

Done when: the original error no longer reproduces and the neighboring checks pass.
Open the guide

Refactor code

Mode: Plan, then Code or General.
Attach: the target module, the behavior to preserve, and the API constraints.

Prepare a refactoring that does not change behavior. Find the usages and tests,
propose small steps, and describe how to verify each step. Do not change the
public API.

Done when: the structure is better, the behavior is confirmed, and there are no unrelated edits.
Open the guide

Add tests

Mode: Test.
Attach: the code under test and one or two existing tests.

Add tests for the successful scenario, a missing record, and a dependency
failure. Follow the project style. Do not change production code without
a separate justification. Run the tests through the IDE run configuration.

Done when: the tests check the stated scenarios and pass reproducibly.
Open the guide

Increase coverage

Mode: Test or General.
Attach: the class or method and the target coverage level.

Measure the coverage of this class from the existing tests. Add the minimal
tests for the meaningful uncovered branches, run them, and show coverage
before and after.

Done when: the target level is reached, or it is explained why the remaining lines do not need coverage.
Open the guide

Review changes

Mode: Review.
Attach: the task and the finished diff.

Review the changes for errors, regressions, and mismatches with the task.
Name the file and the line for every issue. Do not propose fixes without
a concrete risk.

Done when: the diff has been reviewed, the significant findings have been handled, and the tests and the build pass.
Open the guide

Check security

Mode: Ask or General, after running the vulnerability search.
Attach: the finding you got.

Analyze this finding. Explain the conditions for exploitation, the data path,
and the possible damage. Do not change code yet. Separate confirmed facts
from assumptions.

Done when: the finding is fixed, justifiably marked as a false positive, or handed over to the responsible owner.
Open the guide

Prepare a large project

Mode: Ask, then Plan.
Attach: a small entry point and a description of the change you plan.

Map only the relevant part of the project: the entry point, the main calls,
the implementations, the tests, and the module boundaries. Then propose small
change steps with a separate check for each. Do not change anything yet.

Done when: the scope of impact is confirmed and the task is split into verifiable stages.
Open the guide