DEV Community

Samarth Bhamare
Samarth Bhamare

Posted on

I built 10 autonomous AI agents for Claude Code — here's how they work Tags: ai, webdev, productivity, opensource

Most developers use Claude Code at maybe 20% of its potential.

They type "fix this bug" and expect magic. When the output is mediocre, they blame the tool.

The problem is not the tool. It is the prompt.

I spent weeks building production-grade instruction files that turn Claude Code into specialized autonomous agents. Each one combines multiple skills into a structured workflow with real bash commands, specific patterns to check, output formats, and rules to avoid false positives.

Here are all 10 agents and what they actually do:

PR Review Agent
Reviews every changed file in a branch against main. Checks for correctness (off-by-one errors, missing await, null handling), error handling (empty catch blocks, swallowed errors), naming clarity, and unused imports. Runs tsc and eslint on changed files. Outputs a structured report with exact file:line references, corrected code suggestions, and a verdict (approve, request changes, needs discussion). Always includes a "what looks good" section so it does not just criticize.

Test Writer Agent
Detects your test framework by reading package.json and existing test files. Finds every exported function without a corresponding test. For each function, it analyzes inputs, outputs, dependencies, and every branch (if, else, switch, ternary). Generates tests covering happy path, edge cases (null, empty, zero, boundary values), error conditions, and async behavior. Every test follows the AAA pattern with realistic data, not "foo" and "bar". Runs the tests after writing them to make sure they pass.

Bug Fixer Agent
Give it an error message, stack trace, or description of wrong behavior. It reads the stack trace bottom-to-top, traces the execution path through your code, and categorizes the root cause (off-by-one, null reference, async timing, type coercion, logic error, stale state). Before proposing a fix, it verifies the hypothesis explains all symptoms, checks git blame to see if a recent change introduced the bug, and looks for the same pattern elsewhere in the codebase. Fix diffs are minimal. Never modifies tests to make them pass.

Documentation Agent
Reads your actual source code to write documentation. Not guessing from function names. It checks package.json for the stack, finds entry points, reads route handlers, and builds a mental model of what the project does. Generates README with getting started, environment variables (read from .env.example), project structure, API reference (from actual route handler code), and scripts. Also generates JSDoc for undocumented exported functions with examples. Never fabricates endpoints or features that do not exist.

Security Audit Agent
Full OWASP Top 10 audit. Starts with secret detection (hardcoded API keys, AWS credentials, private keys, connection strings with passwords). Then dependency vulnerabilities via npm audit. Then injection checks: SQL injection (string concatenation in queries), command injection (user input in exec/spawn), XSS (dangerouslySetInnerHTML, innerHTML). Then auth audit: password hashing algorithm, JWT validation, rate limiting, session handling. Then CORS and security headers. Outputs a prioritized report with attack scenarios and exact code fixes.

Refactoring Agent
Only starts if tests pass. Finds the largest files, duplicate logic (files with similar imports), dead code (exports not imported anywhere), and complexity issues (deep nesting, long parameter lists, god objects). Executes one refactor at a time: dead code removal, extract shared logic, split long functions, guard clauses for nested conditions, named constants for magic numbers. Runs tests after every single change. If tests break, undoes the refactor. Never changes public APIs or behavior.

CI/CD Pipeline Agent
Reads your project structure, detects the framework and build commands, checks for existing workflow files, and generates or fixes GitHub Actions or GitLab CI configs. Knows about caching strategies for npm, pip, and Docker layers. Sets up proper job dependencies, artifacts, and environment variables. If a pipeline is failing, reads the error logs and traces the failure to the exact step and fix.

Database Migration Agent
Detects your ORM (Prisma, Drizzle, TypeORM, Knex, Django, Rails). Reads the current schema, compares it against the code that uses the database, and generates migration files for missing changes. For every migration, checks for data loss risks (dropping columns with data, changing types), generates a rollback script, estimates execution time for large tables, and suggests running during low-traffic windows if the migration locks tables.

Performance Optimizer Agent
Three-layer analysis. Frontend: runs bundle analysis, finds large dependencies, identifies components that re-render unnecessarily, checks for missing lazy loading and code splitting. Backend: finds N+1 queries, missing database indexes, API endpoints that could use caching, synchronous operations that should be async. Memory: looks for event listener leaks, growing arrays that are never cleared, unclosed connections. Every optimization includes before and after measurements.

Onboarding Agent
Maps the entire codebase. Identifies the framework, entry points, routing, data flow from request to database to response. Documents the directory structure with what each folder actually contains (not just the folder name). Finds conventions by reading existing code (naming patterns, error handling patterns, test patterns). Lists key files a new developer should read first. Identifies gotchas (unusual patterns, workarounds, things that look wrong but are intentional by checking git blame). Outputs a structured onboarding guide.

How to use them

Each agent is a .md file. You download it, put it in ~/.claude/skills/, and invoke it with /agent-name in Claude Code.

Example:

/pr-review-agent
/security-audit-agent
/test-writer-agent
That is it. No API keys, no setup, no subscriptions.

All 10 agents plus 789 additional skills are free and open source at clskills.in

GitHub: github.com/Samarth0211/claude-skills-hub

I would love feedback on which agents you find most useful and what other agents you would want built.

Top comments (0)