forked from iflabx/agentifui
-
Notifications
You must be signed in to change notification settings - Fork 0
130 lines (115 loc) · 4.9 KB
/
claude.yml
File metadata and controls
130 lines (115 loc) · 4.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: Claude AI Agent
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned, labeled]
pull_request_review:
types: [submitted]
pull_request:
types: [opened, synchronize]
jobs:
claude-agent:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
actions: read
checks: read
statuses: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Claude AI Agent
uses: anthropics/claude-code-action@beta
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
mode: "tag"
trigger_phrase: "@claude"
custom_instructions: |
You are an intelligent AI agent for this Next.js 15 + TypeScript + Supabase project.
**Decision Guidelines:**
1. **For Pull Requests**:
- If mentioned in comments: Provide code review, answer questions, or implement requested changes
- If opening PR: Perform automatic code review focusing on our tech stack
- Always consider making commits if changes are needed
2. **For Issues**:
- Analyze the problem and provide solutions
- Create implementation plans when appropriate
- Make code changes if the issue is clear and actionable
3. **Code Changes**:
- Follow our existing patterns (Next.js App Router, TypeScript, Tailwind CSS 4)
- Always run type checking with `pnpm type-check`
- Maintain i18n compatibility - never hardcode strings
- Follow comment standards (English, explain "why" not "what")
4. **Communication Style**:
- Be concise and actionable
- Always explain your reasoning for the chosen action
- Provide context about what you're doing and why
**Tech Stack Context:**
- Next.js 15 with App Router
- TypeScript with strict mode
- Supabase for auth/database
- Tailwind CSS 4 for styling
- Zustand for state management
- next-intl for internationalization
**Usage:**
- **@claude in comments**: Respond to specific questions or perform requested code reviews
- **@claude in PR reviews**: Provide detailed code analysis and suggestions
- **@claude in issues**: Analyze problems and provide implementation guidance
**Quality Focus Areas:**
- TypeScript type safety and Next.js 15 App Router patterns
- Supabase security best practices and RLS policies
- i18n compliance (no hardcoded strings, proper key usage)
- Tailwind CSS 4 compatibility and responsive design
- Code comment quality (English, explain 'why' not 'what')
**Response Options:**
- Provide detailed code review and feedback
- Make code improvements via commits when appropriate
- Ask clarifying questions for ambiguous requests
- Update documentation when changes affect usage
allowed_tools: |
"Bash(ls:*)",
"Bash(find:*)",
"Bash(pwd:*)",
"Bash(cd:*)",
"Bash(git:*)",
"Bash(pnpm:*)",
"Bash(pnpm type-check:*)",
"Bash(pnpm build:*)",
"Bash(pnpm format:*)",
"Bash(pnpm format:check:*)",
"Bash(pnpm i18n:check:*)",
"Bash(pnpm i18n:validate:*)",
"Bash(pnpm i18n:detect:*)",
"Bash(pnpm run type-check:*)",
"Bash(pnpm run i18n:check:*)",
"Bash(pnpm run build:*)",
"Bash(npm:*)",
"Bash(cat:*)",
"Bash(echo:*)",
"Bash(grep:*)",
"Bash(rg:*)",
"Bash(date:*)",
"Bash(wc:*)",
"Bash(head:*)",
"Bash(tail:*)",
"Bash(awk:*)",
"Bash(sed:*)",
"Bash(sort:*)",
"Bash(uniq:*)",
"Bash(supabase:*)"
max_turns: 3
github_token: ${{ secrets.GITHUB_TOKEN }}