From b30ca2498835861e198bdd3cbe3af17f8dd62287 Mon Sep 17 00:00:00 2001 From: Hermes Pipeline Date: Wed, 5 Aug 2026 15:14:49 +0000 Subject: [PATCH] Add Skill: code-review-agent-workflow Extracted from: https://github.com/itszhaoziyan-n/AgentKit.git Score: 1.0 --- skills/code-review-agent-workflow/SKILL.md | 77 +++++++++++++++++++ skills/code-review-agent-workflow/commands.md | 6 ++ skills/code-review-agent-workflow/examples.md | 10 +++ .../code-review-agent-workflow/metadata.json | 24 ++++++ skills/code-review-agent-workflow/tests.md | 9 +++ 5 files changed, 126 insertions(+) create mode 100644 skills/code-review-agent-workflow/SKILL.md create mode 100644 skills/code-review-agent-workflow/commands.md create mode 100644 skills/code-review-agent-workflow/examples.md create mode 100644 skills/code-review-agent-workflow/metadata.json create mode 100644 skills/code-review-agent-workflow/tests.md diff --git a/skills/code-review-agent-workflow/SKILL.md b/skills/code-review-agent-workflow/SKILL.md new file mode 100644 index 0000000..e4fbe18 --- /dev/null +++ b/skills/code-review-agent-workflow/SKILL.md @@ -0,0 +1,77 @@ +--- +name: code-review-agent-workflow +version: 1.0.0 +description: Automate the code review process using a multi-step workflow with human-in-the-loop + approval. +inputs: +- Sample diff of code changes (str) +- Repo context (dict) +steps: +- 'Step 1: Build the graph for the code review agent using `build_graph()` from `agentkit.workflow.code_review.graph`' +- 'Step 2: Invoke the graph with initial parameters including sample diff, repo context, + user ID, and other metadata' +- 'Step 3: The graph processes the input through a series of steps, generating messages + and issues as it progresses' +outputs: +- Final result containing processed messages and issues (dict) +tags: [] +metadata: + source_repo: https://github.com/itszhaoziyan-n/AgentKit.git + extracted_at: '' + confidence: 0.95 +--- + +# code-review-agent-workflow + +Automate the code review process using a multi-step workflow with human-in-the-loop approval. + +## Setup + +**Dependencies:** + +```text +pip install langgraph>=0.3 langchain-core>=0.3 langchain-anthropic>=0.3 langfuse>=2.0 mcp[server]>=1.24,<2.0 langchain-mcp-adapters>=0.1 tenacity>=9.0 fastapi>=0.115 uvicorn[standard]>=0.32 psycopg[binary]>=3.1 langgraph-checkpoint-postgres>=2.0 httpx>=0.27 python-dotenv>=1.0 redis>=5.0 +``` + +**Setup steps:** + +1. cp .env.example .env +1. docker compose up -d +1. pip install -e '.[dev]' + +## Key Files + +- `agentkit/workflow/code_review/graph.py - Contains the `build_graph` function and graph invocation logic.` +- `examples/run_code_review.py - Example script demonstrating how to run the code review agent.` + +## Steps + +1. Step 1: Build the graph for the code review agent using `build_graph()` from `agentkit.workflow.code_review.graph` +2. Step 2: Invoke the graph with initial parameters including sample diff, repo context, user ID, and other metadata +3. Step 3: The graph processes the input through a series of steps, generating messages and issues as it progresses + +## Implementation Details + +```python +graph = build_graph() +thread_id = str(uuid.uuid4()) +result = graph.invoke(...) +``` + +## Inputs + +- Sample diff of code changes (str) +- Repo context (dict) + +## Outputs + +- Final result containing processed messages and issues (dict) + +## Failure Modes + +- Specific failure scenario with mitigation: If the `build_graph()` function fails to initialize properly, ensure all required dependencies are correctly installed. + +## Source + +Extracted from: [https://github.com/itszhaoziyan-n/AgentKit.git](https://github.com/itszhaoziyan-n/AgentKit.git) +Confidence: 0.95 diff --git a/skills/code-review-agent-workflow/commands.md b/skills/code-review-agent-workflow/commands.md new file mode 100644 index 0000000..722206d --- /dev/null +++ b/skills/code-review-agent-workflow/commands.md @@ -0,0 +1,6 @@ +# Commands: code-review-agent-workflow + +## Available Commands + +- `/skill code-review-agent-workflow` — Load this skill +- `/run code-review-agent-workflow` — Execute workflow diff --git a/skills/code-review-agent-workflow/examples.md b/skills/code-review-agent-workflow/examples.md new file mode 100644 index 0000000..e4a5ae1 --- /dev/null +++ b/skills/code-review-agent-workflow/examples.md @@ -0,0 +1,10 @@ +# Examples: code-review-agent-workflow + +## Usage Example + +```python +# How to use this skill +# Inputs: Sample diff of code changes (str), Repo context (dict) +# Process: Step 1: Build the graph for the code review agent using `build_graph()` from `agentkit.workflow.code_review.graph` → Step 2: Invoke the graph with initial parameters including sample diff, repo context, user ID, and other metadata → Step 3: The graph processes the input through a series of steps, generating messages and issues as it progresses +# Outputs: Final result containing processed messages and issues (dict) +``` diff --git a/skills/code-review-agent-workflow/metadata.json b/skills/code-review-agent-workflow/metadata.json new file mode 100644 index 0000000..09d6c02 --- /dev/null +++ b/skills/code-review-agent-workflow/metadata.json @@ -0,0 +1,24 @@ +{ + "name": "code-review-agent-workflow", + "version": "1.0.0", + "goal": "Automate the code review process using a multi-step workflow with human-in-the-loop approval.", + "inputs": [ + "Sample diff of code changes (str)", + "Repo context (dict)" + ], + "steps": [ + "Step 1: Build the graph for the code review agent using `build_graph()` from `agentkit.workflow.code_review.graph`", + "Step 2: Invoke the graph with initial parameters including sample diff, repo context, user ID, and other metadata", + "Step 3: The graph processes the input through a series of steps, generating messages and issues as it progresses" + ], + "outputs": [ + "Final result containing processed messages and issues (dict)" + ], + "failure_modes": [ + "Specific failure scenario with mitigation: If the `build_graph()` function fails to initialize properly, ensure all required dependencies are correctly installed." + ], + "confidence": 0.95, + "explanation": "This workflow is reusable for any code review process that requires a multi-step analysis and human approval.", + "source_repo": "https://github.com/itszhaoziyan-n/AgentKit.git", + "score": 1.0 +} \ No newline at end of file diff --git a/skills/code-review-agent-workflow/tests.md b/skills/code-review-agent-workflow/tests.md new file mode 100644 index 0000000..5b5dbfc --- /dev/null +++ b/skills/code-review-agent-workflow/tests.md @@ -0,0 +1,9 @@ +# Tests: code-review-agent-workflow + +## Test Checklist + +- [ ] Workflow has at least 3 steps +- [ ] All inputs are defined +- [ ] All outputs are defined +- [ ] Failure modes are documented +- [ ] Skill can be loaded without errors