Feature: Agents (Specialized Assistants)
Relevant source files
The following files were used as context for generating this wiki page:Agents are specialized AI assistants designed with focused purposes and custom system prompts to handle complex, multi-step workflows. Unlike general-purpose interactions, agents are configured to perform specific roles, such as a senior code reviewer or a git workflow manager. They are a key component for automating sophisticated tasks within the development lifecycle.
These agents are defined in Markdown files and can be invoked manually or, more powerfully, through automated processes like GitHub Actions for tasks like continuous integration reviews and scheduled repository maintenance. This allows for consistent and high-quality automation of code reviews, documentation synchronization, dependency audits, and more.
Sources: README.md:405-407, README.md:11-14
Agent Architecture
Agents are defined as individual Markdown files located in the .claude/agents/ directory. Each file represents a distinct agent with a unique set of instructions and configuration.
Sources: README.md:405-407, README.md:52-53
File Structure and Format
An agent file consists of two main parts: a YAML frontmatter for configuration and a Markdown body for the system prompt and instructions.
This diagram illustrates the structure of an agent definition file.
Sources: README.md:409-425
The frontmatter contains metadata that configures the agent's behavior.
| Field | Required | Description |
|---|---|---|
name | Yes | A unique, lowercase identifier for the agent (e.g., code-reviewer). |
description | Yes | A brief explanation of the agent's purpose and when to use it (max 1024 chars). |
model | No | Specifies the model to use, such as opus, sonnet, or haiku. |
tools | No | A comma-separated list of tools the agent is permitted to use. |
Sources: README.md:427-433
The body of the Markdown file contains the system prompt that instructs the AI on its role, process, and any specific rules or checklists it must follow.
---
name: code-reviewer
description: Reviews code for quality, security, and conventions. Use after writing or modifying code.
model: opus
---
# Agent System Prompt
You are a senior code reviewer...
## Your Process
1. Run `git diff` to see changes
2. Apply review checklist
3. Provide feedback
## Checklist
- [ ] No TypeScript `any`
- [ ] Error handling present
- [ ] Tests included
Sources: README.md:412-425, .claude/agents/code-reviewer.md:1-17
Example Agents
The repository contains several examples of agents for different tasks.
Code Review Agent
The code-reviewer agent is designed to perform comprehensive code reviews. It is instructed to act as a senior code reviewer, check for changes using git diff, and validate the changes against a detailed checklist.
The checklist includes items such as:
- TypeScript Strictness: No
anytypes. - Error Handling: Presence of error handling logic.
- Testing: Inclusion of tests for new code.
- UI States: Proper handling of loading, error, and empty states.
This agent is central to the automated PR review workflow.
Sources: .claude/agents/code-reviewer.md, README.md:15-17, CLAUDE.md:25-36
GitHub Workflow Agent
The github-workflow agent is responsible for managing Git and GitHub operations, such as handling commits, branches, and pull requests.
Sources: README.md:408, .claude/agents/github-workflow.md
Integration with GitHub Actions
A primary use case for agents is automating tasks within CI/CD pipelines using GitHub Actions. This enables scheduled maintenance and automated reviews on pull requests.
Sources: README.md:15-17, README.md:452-455
Automated Pull Request Reviews
The pr-claude-code-review.yml workflow automates code reviews on every new pull request. It uses the code-reviewer agent to analyze the changes and post feedback.
The workflow is triggered on pull_request events or when a comment containing @claude is posted on a PR.
This diagram shows the automated PR review process.
The core of the workflow is the anthropics/claude-code-action step, which executes the agent.
- uses: anthropics/claude-code-action@beta
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
model: claude-opus-4-5-20251101
prompt: |
Review this PR using .claude/agents/code-reviewer.md standards.
Run `git diff origin/main...HEAD` to see changes.
Sources: .github/workflows/pr-claude-code-review.yml:20-25
Scheduled Maintenance Workflows
Agents are also used in scheduled workflows to perform routine maintenance tasks, ensuring long-term code quality and documentation accuracy.
| Workflow | Schedule | Purpose | Source File |
|---|---|---|---|
| Code Quality | Weekly (Sunday) | Reviews random directories and auto-fixes issues. | .github/workflows/scheduled-claude-code-quality.yml |
| Docs Sync | Monthly (1st) | Reads recent commits and ensures documentation is aligned with code changes. | .github/workflows/scheduled-claude-code-docs-sync.yml |
| Dependency Audit | Biweekly (1st & 15th) | Performs safe dependency updates and verifies with tests. | .github/workflows/scheduled-claude-code-dependency-audit.yml |
Sources: README.md:478-483, README.md:19-23
Conclusion
The Agents feature provides a robust framework for creating specialized, instruction-driven AI assistants within the project. By defining agents in simple Markdown files, developers can automate complex, domain-specific tasks like detailed code reviews and repository maintenance. The integration with GitHub Actions makes these agents a powerful tool for enforcing quality standards and reducing manual toil throughout the development lifecycle.
Sources: README.md:11-14, README.md:405-407