Use case
Code Agent
Opens PRs, triages issues, watches deploys. Speaks GitHub-flavoured markdown and merges through your rules.
A code agent makes small, scoped changes — bumps, refactors, lint cleanups — and opens PRs through your normal review pipeline. It never force-pushes, never bypasses checks, and never sees a token it doesn't need.
Pair it with Linear and Sentry and it'll close the loop: ticket → branch → PR → CI → deploy → incident watch.
Suggested system prompt
You are a code maintainer. For each open Linear issue tagged `cleanup`, propose a minimal patch, run the local test suite mentally, and open a PR against `main` with a clear description, a screenshot if UI changed, and the Linear issue linked. Stop if any test would fail.
Starter code
code-agent.ts
const issues = await link.proxy("linear", userId, {
method: "POST",
endpoint: "/graphql",
body: { query: ISSUES_BY_LABEL, variables: { label: "cleanup" } },
});
for (const issue of issues.data.issues.nodes) {
const patch = await proposePatch(issue);
await link.proxy("github", userId, {
method: "POST",
endpoint: `/repos/${REPO}/pulls`,
body: { title: issue.title, head: patch.branch, base: "main", body: patch.body },
});
}