Skip to content

Commit 24ada13

Browse files
committed
chore: add Claude Code configuration files
- Add Claude Code settings and command files - Add configuration for command permissions and security - Include markdown analysis and GitHub issue handling commands - Create PR generation template command
1 parent 5e2662d commit 24ada13

File tree

6 files changed

+111
-0
lines changed

6 files changed

+111
-0
lines changed

.claude/commands/analyze-markdown.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This project uses GitHub Flavored Markdown for all *.md files. Please ensure that all markdown files are formatted
2+
correctly and consistently. Use the following guidelines when writing or editing markdown files:
3+
- Use proper American English spelling and grammar.

.claude/commands/fix-github-issues.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Please analyze and fix the GitHub issue: $ARGUMENTS.
2+
3+
Follow these steps:
4+
5+
1. Use `gh issue view` to get the issue details
6+
2. Understand the problem described in the issue
7+
3. Search the codebase for relevant files
8+
4. Implement the necessary changes to fix the issue
9+
5. Write and run tests to verify the fix
10+
6. Ensure code passes linting and type checking
11+
7. Create a descriptive commit message
12+
8. Push and create a PR
13+
14+
Remember to use the GitHub CLI (`gh`) for all GitHub-related tasks.

.claude/commands/generate-pr.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Generate a PR using the template in `.github/PULL_REQUEST_TEMPLATE.md` and fill in the details based on the changes made
2+
in the code. The PR should include sections for changes, references, testing, and a checklist to ensure all necessary
3+
steps have been completed. Be as descriptive as possible in the PR description, including any relevant issue numbers or links to related.

.claude/settings.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(npm run *)"
5+
],
6+
"automaticApproval": {
7+
"enabled": true,
8+
"safeCommands": [
9+
"ls",
10+
"cat",
11+
"echo",
12+
"head",
13+
"tail",
14+
"find",
15+
"grep",
16+
"gh pr list",
17+
"git status",
18+
"git log"
19+
]
20+
}
21+
},
22+
"paths": {
23+
"excludedDirectories": [
24+
"node_modules/"
25+
],
26+
"excludedPatterns": [
27+
"**/*.env",
28+
"**/*.key",
29+
"**/*.pem",
30+
"**/*.secret",
31+
"**/password*",
32+
"**/credentials*"
33+
]
34+
},
35+
"security": {
36+
"blockedCommands": [
37+
"sudo",
38+
"su",
39+
"ssh-keygen",
40+
"curl -o",
41+
"wget -O",
42+
"rm -rf /",
43+
":(){ :|:& };:"
44+
],
45+
"sensitiveDataPatterns": [
46+
"password",
47+
"api[-_]?key",
48+
"auth[-_]?token",
49+
"secret",
50+
"credential"
51+
]
52+
}
53+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ dist/
1212
coverage/
1313
.vscode/
1414
.idea/
15+
CLAUDE.local.md

CLAUDE.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Build & Test Commands
6+
7+
- Build: `npm run build` (includes format, lint, and TypeScript compilation)
8+
- Dev mode: `npm run dev`
9+
- Debug mode: `npm run dev:debug` (with DEBUG=auth0-mcp)
10+
- Lint: `npm run lint` (fix with `npm run lint:fix`)
11+
- Format: `npm run format`
12+
- Test: `npm run test`
13+
- Test single file: `npm test -- test/path/to/file.test.ts`
14+
- Test with coverage: `npm run test:coverage`
15+
16+
## Code Style Guidelines
17+
18+
- **TypeScript**: Strict mode, ES2022 target with Node.js module resolution
19+
- **Imports**: Use type imports with `import type`, avoid duplicate imports
20+
- **Error Handling**: Catch and log errors with utils/logger.ts functions
21+
- **Naming**: camelCase for variables/functions, PascalCase for classes/types
22+
- **Types**: Explicit typing preferred except for obvious return types
23+
- **No console**: Use logger module instead of direct console usage
24+
- **Formatting**: Prettier for auto-formatting (npm run format)
25+
- **Testing**: Vitest framework with mocks and descriptive test naming
26+
- **Variables**: Use const by default, no var, avoid parameter reassignment
27+
- **Async**: Don't use return await, handle Promise rejections properly
28+
- **Security**: Prioritize security best practices, especially in authentication and authorization
29+
30+
## Commit Message Guidelines
31+
32+
Use conventional commits for commit messages. Be as descriptive as possible for all the changes, including bullets. Never include Claude Code attribution in
33+
commit messages.
34+
35+
## PR Guidelines
36+
37+
- Use the PR template in `.github/PULL_REQUEST_TEMPLATE.md`

0 commit comments

Comments
 (0)