An AI Agent that operates on GitHub Actions. By using this action, you can directly invoke Coding Agent CLI from GitHub Issues or Pull Request comments and automate code changes.
git clone https://github.com/potproject/code-agent.gitThe code-agent skill is an innovative AI automation tool that operates seamlessly within GitHub Actions. This automation skill allows developers to invoke the Coding Agent CLI directly from GitHub Issues or Pull Request comments, streamlining the process of making code changes. By integrating AI capabilities into the workflow, the code-agent enhances productivity and reduces manual effort, making it an essential tool for modern software development teams. One of the primary benefits of using the code-agent is its ability to automate repetitive coding tasks, which can significantly save time for developers. While the exact time savings are currently unknown, the efficiency gained from automating code changes is invaluable. Developers can focus on higher-level tasks, such as feature development and debugging, rather than getting bogged down in routine updates. This skill is particularly beneficial for teams looking to enhance their workflow automation and improve their overall development speed. The code-agent skill is ideal for developers, product managers, and AI practitioners who are familiar with GitHub and looking to implement AI-driven solutions in their workflows. With its intermediate complexity, it requires a basic understanding of GitHub Actions and coding practices, making it suitable for teams that are already leveraging automation in their development processes. The skill's integration into AI-first workflows allows teams to adopt a more efficient approach to software development, aligning with the growing trend of automation in the tech industry. In practical terms, the code-agent can be used in various scenarios, such as automating the merging of pull requests or triggering specific actions based on issue comments. For example, when a developer comments on a pull request to request a code change, the code-agent can automatically execute the necessary commands to implement those changes, thus reducing the back-and-forth communication typically required. Implementing this skill takes approximately 30 minutes, making it a quick addition to any development pipeline. By incorporating the code-agent into your workflow, you can leverage AI automation to enhance your team's efficiency and productivity.
[{"step":"Open a GitHub issue or comment on a pull request with a clear description of the desired code changes. Include details like the repository URL, specific files to modify, and any constraints or requirements.","tip":"Use bullet points or numbered lists in the issue body to make the requirements easy to parse. Example: '1. Update the `/api/users` endpoint to support pagination. 2. Default limit should be 10. 3. Add tests for edge cases.'"},{"step":"Mention the code-agent in your comment with the required placeholders. Example: '@code-agent implement the changes described in this issue in [REPO_URL] and create a new branch [BRANCH_NAME].'","tip":"Ensure the repository URL is accessible and the branch name follows your team's naming conventions (e.g., `feat/pagination-support`)."},{"step":"Wait for the code-agent to analyze the issue, create a branch, make the changes, and open a pull request. Monitor the progress in the GitHub Actions tab.","tip":"Check the 'Actions' tab in your repository to see the code-agent's progress. If the agent encounters issues, it will leave comments on the issue or PR."},{"step":"Review the generated pull request. Test the changes locally or in a staging environment to ensure they meet the requirements.","tip":"Use tools like Postman for API changes or Jest for frontend changes to validate the implementation. Leave comments on the PR if you need adjustments."},{"step":"Merge the pull request if the changes are approved. Delete the branch to keep the repository clean.","tip":"Use GitHub's 'Merge pull request' button or the command line with `git merge` and `git branch -d [BRANCH_NAME]`."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/potproject/code-agentCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Act as a GitHub Actions code-agent. Review the [GITHUB_ISSUE_TITLE] and [GITHUB_ISSUE_BODY] from the GitHub issue or pull request comment. Identify the requested code changes, analyze the repository structure, and generate a plan to implement the changes. Then, use the Coding Agent CLI to create a new branch, make the necessary code modifications, and open a pull request with a detailed description of the changes. Include [REPO_URL] and [BRANCH_NAME] as placeholders for the repository URL and branch name respectively.
### GitHub Issue Analysis
**Title:** Update API endpoint to support pagination
**Body:** The current `/users` endpoint returns all users at once, causing performance issues. We need to add pagination with `limit` and `offset` query parameters.
### Repository Structure
```
my-repo/
├── src/
│ ├── api/
│ │ ├── users.js # Contains the `/users` endpoint logic
│ │ └── middleware/
│ └── config/
│ └── routes.js # Defines API routes
└── tests/
└── api/
└── users.test.js
```
### Implementation Plan
1. **Modify `src/api/users.js`**: Update the endpoint to accept `limit` and `offset` parameters. Default `limit` to 10 and `offset` to 0.
2. **Update `src/config/routes.js`**: Add query parameter validation for `limit` and `offset`.
3. **Add Tests**: Update `tests/api/users.test.js` to test pagination scenarios.
4. **Documentation**: Add Swagger/OpenAPI documentation for the new parameters.
### Code Changes
```javascript
// src/api/users.js
const getUsers = async (req, res) => {
const { limit = 10, offset = 0 } = req.query;
const users = await UserModel.find()
.skip(parseInt(offset))
.limit(parseInt(limit));
res.json(users);
};
// src/config/routes.js
router.get('/users', validateQueryParams({ limit: 'number', offset: 'number' }), getUsers);
```
### Pull Request Details
**Title:** feat(api): add pagination support to `/users` endpoint
**Description:**
- Added `limit` and `offset` query parameters to `/users` endpoint.
- Default `limit` is 10, default `offset` is 0.
- Added query parameter validation.
- Updated tests to cover pagination scenarios.
- Added Swagger documentation.
**Changes:**
- Modified `src/api/users.js` to support pagination.
- Updated `src/config/routes.js` with query validation.
- Added tests in `tests/api/users.test.js`.
- Updated Swagger docs in `docs/api.yaml`.
**Testing:**
- Manually tested with Postman: `/users?limit=5&offset=0` returns 5 users.
- Automated tests pass: `npm test`.
**Related Issue:** #123
### Next Steps
1. Review the changes and approve the PR.
2. Merge after CI passes.
3. Deploy to staging for further testing.
---
*This PR was automatically generated by the GitHub Actions code-agent.*Automate your browser workflows effortlessly
Get more done every day with Microsoft Teams – powered by AI
Automate security compliance and monitor real-time security posture seamlessly.
Automate your spreadsheet tasks with AI power
Agentic AI Workflow platform
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan