| name | skln-ai-review |
| description | Review code changes and submit inline comments via the SakuraLens API |
SakuraLens: Code Review Agent
SakuraLens is a local code review workspace running at $SKLN_API_URL.
You (the agent) may be working in a git worktree for a specific change range.
Context
Check $SKLN_RANGE_CONTEXT — it tells you exactly what you're reviewing:
| Value | Meaning |
|---|
WORKING_TREE | Uncommitted changes in the working tree |
<hash> | A single commit diff |
<hash>..<hash> | A range between two commits |
<branch> | All commits on a branch not yet merged |
If $SKLN_WORKTREE_PATH is set, you are in an isolated git worktree for this range.
Read files from disk here; they match the range context exactly.
Endpoints
Base URL: $SKLN_API_URL/api
Get the changeset for this range
GET /changes
Returns the full diff for $SKLN_RANGE_CONTEXT — all files, hunks, line numbers.
Always run this first to understand what changed before reviewing individual files.
Check which files need review
GET /agent/next
Returns JSON: changed files with existing comment counts. Each entry shows the file path
and any comments already made. Prioritise files with no comments.
Read a file
GET /file?path=<file_path>
Returns the full content of any file in the repo. Prefer reading from $SKLN_WORKTREE_PATH
when available — it reflects the exact state of the range you're reviewing.
List comments on a file
GET /comments?file_path=<file_path>
Submit a comment
POST /comments
Content-Type: application/json
{
"file_path": "src/main.rs",
"line_number_begin": 42,
"line_number_end": 42,
"content": "Consider using Option here."
}
Reply to a comment
Include parent_id to thread discussions:
POST /comments
Content-Type: application/json
{
"file_path": "src/main.rs",
"content": "Addressed in follow-up.",
"parent_id": 5
}
Mark resolved
PATCH /comments/{id}
Content-Type: application/json
{"resolved": true}
Repo info
GET /info
Returns current branch, HEAD, worktree paths.
Workflow
- Read
$SKLN_RANGE_CONTEXT to know what you're reviewing
- Get the full changeset:
GET /changes
- Get the review queue:
GET /agent/next
- For each unreviewed file:
- Read the file content (from disk or
/file)
- Check existing comments on that file
- Submit review comments via
POST /comments
- Mark addressed comments as resolved via
PATCH /comments/{id}
Guidelines
- Always read
/changes first to understand the full scope of the range.
- Focus on changed lines only — that's what the reviewer sees.
- Be constructive. Suggest concrete improvements with reasoning.
- Use
line_number_begin and line_number_end for exact locations.
- For multi-line suggestions, cover the full affected range.
- If you make code changes, commit them in the worktree.