Skip to content

chore: add Claude Code configuration #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .claude/commands/analyze-markdown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This project uses GitHub Flavored Markdown for all *.md files. Please ensure that all markdown files are formatted
correctly and consistently. Use the following guidelines when writing or editing markdown files:
- Use proper American English spelling and grammar.
14 changes: 14 additions & 0 deletions .claude/commands/fix-github-issues.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Please analyze and fix the GitHub issue: $ARGUMENTS.

Follow these steps:

1. Use `gh issue view` to get the issue details
2. Understand the problem described in the issue
3. Search the codebase for relevant files
4. Implement the necessary changes to fix the issue
5. Write and run tests to verify the fix
6. Ensure code passes linting and type checking
7. Create a descriptive commit message
8. Push and create a PR

Remember to use the GitHub CLI (`gh`) for all GitHub-related tasks.
3 changes: 3 additions & 0 deletions .claude/commands/generate-pr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Generate a PR using the template in `.github/PULL_REQUEST_TEMPLATE.md` and fill in the details based on the changes made
in the code. The PR should include sections for changes, references, testing, and a checklist to ensure all necessary
steps have been completed. Be as descriptive as possible in the PR description, including any relevant issue numbers or links to related.
53 changes: 53 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"permissions": {
"allow": [
"Bash(npm run *)"
],
"automaticApproval": {
"enabled": true,
"safeCommands": [
"ls",
"cat",
"echo",
"head",
"tail",
"find",
"grep",
"gh pr list",
"git status",
"git log"
]
}
},
"paths": {
"excludedDirectories": [
"node_modules/"
],
"excludedPatterns": [
"**/*.env",
"**/*.key",
"**/*.pem",
"**/*.secret",
"**/password*",
"**/credentials*"
]
},
"security": {
"blockedCommands": [
"sudo",
"su",
"ssh-keygen",
"curl -o",
"wget -O",
"rm -rf /",
":(){ :|:& };:"
],
"sensitiveDataPatterns": [
"password",
"api[-_]?key",
"auth[-_]?token",
"secret",
"credential"
]
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ dist/
coverage/
.vscode/
.idea/
CLAUDE.local.md
37 changes: 37 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Build & Test Commands

- Build: `npm run build` (includes format, lint, and TypeScript compilation)
- Dev mode: `npm run dev`
- Debug mode: `npm run dev:debug` (with DEBUG=auth0-mcp)
- Lint: `npm run lint` (fix with `npm run lint:fix`)
- Format: `npm run format`
- Test: `npm run test`
- Test single file: `npm test -- test/path/to/file.test.ts`
- Test with coverage: `npm run test:coverage`

## Code Style Guidelines

- **TypeScript**: Strict mode, ES2022 target with Node.js module resolution
- **Imports**: Use type imports with `import type`, avoid duplicate imports
- **Error Handling**: Catch and log errors with utils/logger.ts functions
- **Naming**: camelCase for variables/functions, PascalCase for classes/types
- **Types**: Explicit typing preferred except for obvious return types
- **No console**: Use logger module instead of direct console usage
- **Formatting**: Prettier for auto-formatting (npm run format)
- **Testing**: Vitest framework with mocks and descriptive test naming
- **Variables**: Use const by default, no var, avoid parameter reassignment
- **Async**: Don't use return await, handle Promise rejections properly
- **Security**: Prioritize security best practices, especially in authentication and authorization

## Commit Message Guidelines

Use conventional commits for commit messages. Be as descriptive as possible for all the changes, including bullets. Never include Claude Code attribution in
commit messages.

## PR Guidelines

- Use the PR template in `.github/PULL_REQUEST_TEMPLATE.md`