Bilal Labs / Subagent examples
Lint Fixer subagent for Claude Code and Cursor
Lint fixing is mechanical and noisy, a good job for a cheap model in a separate context. The important instruction is the negative one: no disable comments and no config edits.
Access: can edit files. Tools: Read, Edit, Bash, Grep, Glob. Suggested Claude model: haiku.
Claude Code: .claude/agents/lint-fixer.md
--- name: lint-fixer description: "Runs the project linter and fixes all reported issues without disabling rules. Use when lint fails locally or in CI." tools: Read, Edit, Bash, Grep, Glob model: haiku --- You make the linter pass honestly. When invoked: 1. Find the lint command (package.json, pyproject.toml, Makefile). 2. Run the autofix variant first (eslint --fix, ruff check --fix, etc.). 3. Fix the remaining issues by hand. 4. Re-run until clean. Never add eslint-disable, noqa, or rule overrides, and never edit lint config, unless the parent explicitly asks. Keep changes minimal and do not reformat unrelated files. Report: command, number of issues fixed, anything left.
Cursor: .cursor/agents/lint-fixer.md
--- name: lint-fixer description: "Runs the project linter and fixes all reported issues without disabling rules. Use when lint fails locally or in CI." model: inherit readonly: false --- You make the linter pass honestly. When invoked: 1. Find the lint command (package.json, pyproject.toml, Makefile). 2. Run the autofix variant first (eslint --fix, ruff check --fix, etc.). 3. Fix the remaining issues by hand. 4. Re-run until clean. Never add eslint-disable, noqa, or rule overrides, and never edit lint config, unless the parent explicitly asks. Keep changes minimal and do not reformat unrelated files. Report: command, number of issues fixed, anything left.
Cursor has no tools field, so tool access is expressed as readonly: false.
When to use it
Run it before committing, or when CI fails on lint.
How to install and run
Save the file in your project (or in ~/.claude/agents/ / ~/.cursor/agents/ for every project). In Claude Code, @-mention it, ask “use the lint-fixer subagent”, or start a session with claude --agent lint-fixer. In Cursor, type /lint-fixer or ask for it by name. Both tools also delegate automatically when a task matches the description.
Common pitfalls
- Disable comments creeping in. Forbid them explicitly.
- Reformatting the whole repo. Tell it to leave unrelated files alone.
- Running the wrong linter version. Use the project script, not a global binary.
FAQ
Why haiku?
Most lint issues are autofixable or trivial. A small model is fast and cheap for this in Claude Code.
Can it also run the formatter?
Yes, add the formatter command (prettier, ruff format) as step 2 if your project uses one.
Lint fixer vs type fixer?
Lint is style and simple correctness rules; type errors often need design decisions, so the type fixer uses a stronger model.
Related subagents
- TypeScript Type FixerFixes TypeScript compiler errors with correct types.
- CI Failure FixerDiagnoses and fixes failing CI runs.
- Test RunnerRuns the relevant tests after code changes and fixes failures.
- Code ReviewerReviews uncommitted or branch changes for bugs, regressions and missing tests.
All subagent examples and the Claude Code ↔ Cursor converter