GeezerVison is showing github.com — chore: improve Claude Code configuration by redfish4ktc · Pull Request #1029 · maxGraph/maxGraph
Conversation
redfish4ktc
commented
Mar 25, 2026
•
edited by tbouffard
Loading
Uh oh!
There was an error while loading. Please reload this page.
Make the AI assistant more effective by providing focused, actionable instructions instead of a monolithic reference document.
- Slim down CLAUDE.md from 500+ lines to 63 lines
- Extract coding practices, testing conventions, commit conventions, and LSP fallbacks into path-scoped .claude/rules/ files so they load only when relevant files are being edited
- Add 4 build skills (/build, /test, /lint, /ci) using sub-agents to keep verbose output out of the main context window
- Add build warning hook to nudge toward skill usage
- Remove outdated .github/copilot-instructions.md (superseded by CLAUDE.md and .claude/rules/)
- Narrow .gitignore build/ pattern to /packages/**/build/
Summary by CodeRabbit
-
Documentation
- Added repository-wide guidelines: coding practices, testing conventions, and commit message conventions
- Condensed main README and pointed to new internal rules; removed prior Copilot-specific instructions
-
New Features
- Added dedicated build, test, lint, and CI sub-agent skills for streamlined command execution and reporting
- Added a pre-tool hook that emits warnings for heavy build/test/lint invocations
-
Chores
- Narrowed ignored build artifact scope in project config
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Make the AI assistant more effective by providing focused, actionable
instructions instead of a monolithic reference document.
- Slim down CLAUDE.md from 500+ lines to 63 lines
- Extract coding practices, testing conventions, commit conventions,
and LSP fallbacks into path-scoped .claude/rules/ files so they
load only when relevant files are being edited
- Add 4 build skills (/build, /test, /lint, /ci) using sub-agents
to keep verbose output out of the main context window
- Add build warning hook to nudge toward skill usage
- Remove outdated .github/copilot-instructions.md (superseded by
CLAUDE.md and .claude/rules/)
- Narrow .gitignore build/ pattern to /packages/**/build/
coderabbitai
Bot
commented
Mar 26, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Walkthrough
The PR splits and consolidates assistant guidance into a new .claude/ structure: adds rules, testing/lint/build skills, a Bash hook that warns about direct build/test/lint tool usage, and replaces verbose CLAUDE/Copilot docs with concise README-style content and targeted rule files.
Changes
| Cohort / File(s) |
Summary |
Claude Assistant Rules /.claude/rules/architecture/coding-practices.md, /.claude/rules/git/commit-conventions.md, /.claude/rules/testing/conventions.md, /.claude/rules/tooling/lsp-fallbacks.md |
Added repository governance docs: coding practices for packages/core, commit message conventions, Jest/testing layout and mapping rules, and LSP fallback diagnostics guidance. |
Claude Skills /.claude/skills/build/SKILL.md, /.claude/skills/ci/SKILL.md, /.claude/skills/lint/SKILL.md, /.claude/skills/test/SKILL.md |
New skill definitions that run build/ci/lint/test via sub-agents with fixed timeouts and constrained, structured result outputs (SUCCESS/FAILURE summaries, limited failure excerpts). |
Pre-execution Hook /.claude/hooks/block-build.sh |
New Bash hook that parses tool invocation JSON, skips sub-agent contexts, treats lightweight flags as benign, and emits stderr warnings when heavy npm/build/test/lint Bash commands are detected; always exits 0. |
Docs & README Cleanup CLAUDE.md, /.github/copilot-instructions.md |
Replaced detailed in-repo Copilot/Claude guidance with modular .claude/ docs; removed long .github/copilot-instructions.md and condensed CLAUDE.md to a shorter overview referencing new rule files. |
Repo Ignore Rules .gitignore |
Changed ignore pattern to ignore package-scoped packages/**/build/ directories instead of a root-level build/ directory. |
Sequence Diagram(s)
sequenceDiagram
participant User
participant Claude as Claude Agent
participant Hook as Pre-exec Hook (block-build.sh)
participant SubAgent
User->>Claude: invoke Bash tool / run command
Claude->>Hook: provide tool invocation JSON
Hook->>Hook: parse tool_name and command (jq)
alt command is lightweight or agent-context
Hook-->>Claude: no warning (exit 0)
Claude->>SubAgent: (optional) proceed with execution
else heavy build/test/lint command detected
Hook-->>Claude: write warnings to stderr (exit 0)
Claude->>SubAgent: route to corresponding `/build`/`/test`/`/lint` skill
end
SubAgent-->>Claude: structured result (SUCCESS/FAILURE + excerpt + duration)
Claude-->>User: final succinct report
Loading
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~12 minutes
Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
| Check name |
Status |
Explanation |
Resolution |
| Description check |
⚠️ Warning |
The PR description is missing required checklist items, issue reference, and testing/documentation evidence needed by the template. |
Add completed PR Checklist with issue reference (closes #...), confirm testing was done, provide evidence of docs updates, and ensure title follows Conventional Commits format with proper type and scope. |
✅ Passed checks (2 passed)
| Check name |
Status |
Explanation |
| Title check |
✅ Passed |
The title 'chore: improve Claude Code configuration' accurately summarizes the main change: reorganizing and improving Claude AI assistant configuration files and adding new build skills. |
| Docstring Coverage |
✅ Passed |
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment @coderabbitai help to get the list of available commands and usage tips.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (3)
.claude/rules/tooling/lsp-fallbacks.md (1)
1-3: Consider adding frontmatter with path scope for consistency.
Other rules files in this PR (e.g., commit-conventions.md, conventions.md, coding-practices.md) include a YAML frontmatter block with paths: to scope when the rules load. This file lacks that frontmatter, which may cause it to load unconditionally or not integrate properly with Claude's path-scoped rules system.
📝 Suggested frontmatter addition
+---
+paths:
+ - "packages/core/src/**"
+ - "**/*.ts"
+---
# LSP Fallbacks (tsserver via mcp_ide)
Read this BEFORE any LSP operation. Update this file when new failures are discovered.
.claude/skills/ci/SKILL.md (1)
15-35: Consider adding a language identifier to the fenced code block.
The static analysis tool flagged the missing language specifier. Since this is a prompt template rather than executable code, you could use text or plaintext as the identifier for consistency with markdown best practices.
📝 Suggested fix
-```
+```text
Run the full CI validation sequence from the project root, stopping at the first failure:
.claude/hooks/block-build.sh (1)
20-29: Regex may miss npm run test variant.
The current pattern ^\s*npm\s+(run\s+build|test|run\s+lint|run\s+check) captures npm test but not npm run test. While npm test is the conventional shorthand, users might use the explicit form. Consider whether this should also be caught.
📝 Suggested pattern adjustment
-if echo "$COMMAND" | grep -qE '^\s*npm\s+(run\s+build|test|run\s+lint|run\s+check)'; then
+if echo "$COMMAND" | grep -qE '^\s*npm\s+(run\s+(build|test|lint|check)|test)'; then
This captures both npm test and npm run test, as well as npm run build, npm run lint, and npm run check.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 512cde8a-b75b-4de3-b673-bf1203342359
📥 Commits
Reviewing files that changed from the base of the PR and between 24357a7 and 3178859.
📒 Files selected for processing (12)
.claude/hooks/block-build.sh
.claude/rules/architecture/coding-practices.md
.claude/rules/git/commit-conventions.md
.claude/rules/testing/conventions.md
.claude/rules/tooling/lsp-fallbacks.md
.claude/skills/build/SKILL.md
.claude/skills/ci/SKILL.md
.claude/skills/lint/SKILL.md
.claude/skills/test/SKILL.md
.github/copilot-instructions.md
.gitignore
CLAUDE.md
💤 Files with no reviewable changes (1)
- .github/copilot-instructions.md
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Use [[ ]] instead of [ ] in block-build.sh for idiomatic bash and robustness
- Fix npm command regex to catch both 'npm test' and 'npm run test' variants
- Add language specifier (text) to code blocks in skill markdown files for linting
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
chore
Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...)
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|