
minimal-claude
Auto-configure code quality tools and generate custom /fix command for parallel agent-based fixing
- version
- 1.7.0
- GitHub stars
- 19
Install
/plugin install minimal-claude@minimal-claude-marketplaceRun it inside Claude Code after adding the marketplace with /plugin marketplace add KenKaiii/minimal-claude.
Contents
Discovered from sourceCommands 9
Find quick wins in this codebase. Spawn 5 explore agents in parallel using the Task tool (subagent_type: Explore), each focusing on one area. Adapt each area to what's relevant for THIS project's stack and architecture.
Agent 1 - Performance: Inefficient algorithms, unnecessary work, missing early returns, blocking operations, things that scale poorly
Agent 2 - Dead Weight: Unused code, unreachable paths, stale comments/TODOs, obsolete files, imports to nowhere
Agent 3 - Lurking Bugs: Unhandled edge cases, missing error handling, resource leaks, race conditions, silent failures
Agent 4 - Security: Hardcoded secrets, injection risks, exposed sensitive data, overly permissive access, unsafe defaults
Agent 5 - Dependencies & Config: Unused packages, vulnerable dependencies, misconfigured settings, dead environment variables, orphaned config files
The Only Valid Findings
A finding is ONLY valid if it falls into one of these categories:
- Dead - Code that literally does nothing. Unused, unreachable, no-op.
- Broken - Will cause errors, crashes, or wrong behavior. Not "might" - WILL.
- Dangerous - Security holes, data exposure, resource exhaustion.
That's it. Three categories. If it doesn't fit, don't report it.
NOT valid findings:
- "This works but could be cleaner" - NO
- "Modern best practice suggests..." - NO
- "This is verbose/repetitive but functional" - NO
- "You could use X instead of Y" - NO
- "This isn't how I'd write it" - NO
If the code works, isn't dangerous, and does something - leave it alone.
Output Format
For each finding:
[DEAD/BROKEN/DANGEROUS] file:line - What it is
Impact: What happens if left unfixed
Finding nothing is a valid outcome. Most codebases don't have easy wins - that's fine.
Verify this codebase against current best practices and official documentation. Spawn 8 explore agents in parallel using the Task tool (subagent_type: Explore), each focusing on one category. Each agent must VERIFY findings using kencode-search MCP (mcp__kencode-search__searchCode — real code samples from 2M+ public repos) or WebSearch (official docs) - no assumptions allowed.
Agent 1 - Core Framework: Detect the main framework (React, Next, Express, Django, Rails, etc.), verify usage patterns against official documentation via WebSearch
Agent 2 - Dependencies/Libraries: Check if library APIs being used are current or deprecated. Verify against library documentation and kencode-search MCP for how modern codebases use these libraries
Agent 3 - Language Patterns: Identify the primary language (TypeScript, Python, Go, etc.), verify idioms and patterns are current. Use kencode-search MCP to see how modern projects write similar code
Agent 4 - Configuration: Examine build tools, bundlers, linters, and config files. Verify settings against current tool documentation via WebSearch
Agent 5 - Security Patterns: Review auth, data handling, secrets management. Verify against current security guidance and OWASP recommendations via WebSearch
Agent 6 - Testing: Identify test framework in use, verify testing patterns match current library recommendations. Check via docs and kencode-search MCP for modern test patterns
Agent 7 - API/Data Handling: Review data fetching, state management, storage patterns. Verify against current patterns via kencode-search MCP and framework docs
Agent 8 - Error Handling: Examine error handling patterns, verify they match library documentation. Use kencode-search MCP to compare against real-world implementations
Agent Workflow
Each agent MUST follow this process:
- Identify - What's relevant in THIS project for your category
- Find - Locate specific implementations in the codebase
- Verify - Check against kencode-search MCP (real code) OR WebSearch (official docs)
- Report - Only report when verified current practice differs from codebase
The Only Valid Findings
A finding is ONLY valid if:
- OUTDATED - Works but uses old patterns with verified better alternatives
- DEPRECATED - Uses APIs marked deprecated in current official docs
- INCORRECT - Implementation contradicts official documentation
NOT valid findings:
- "I think there's a better way" without verification - NO
- "This looks old" without proof - NO
- Style preferences or subjective improvements - NO
- Anything not verified via kencode-search MCP or official docs - NO
Output Format
For each finding:
[OUTDATED/DEPRECATED/INCORRECT] file:line - What it is
Current: How it's implemented now
Verified: What the correct/current approach is
Source: kencode-search MCP (X repos) | URL to official docs
No findings is a valid outcome. If implementations match current practices, that's good news.
Compare the code you just created or modified in this conversation against real-world implementations using the mcp__kencode-search__searchCode tool.
You already know what you just built. For each file you created or modified, use mcp__kencode-search__searchCode to search for how real projects implement the same patterns. Look at the specific APIs, hooks, functions, and architecture you used. Use peek: true first for cheap triage, then drill in with full context. Filter with language, repo ("owner/name"), or path to narrow noisy results.
If you find something consistently done differently across real codebases, or something commonly included that you left out, report it:
[MISSING/DIVERGENT/INCOMPLETE] file:line - What it is
Wrote: What was implemented
Real-world: What real projects do instead/additionally
Evidence: kencode-search MCP - pattern seen in X out of Y repos searched
Style preferences and subjective improvements are not valid findings. Only report things backed by clear kencode-search MCP evidence across multiple repos.
If the code aligns well with real-world patterns, say so. That's a good outcome.
Research the best tools, dependencies, and architecture for the user's project. The user will describe what they want to build. If no description is provided, analyze the current codebase to infer the project type and goals.
First, ask the user: "What are you building? Describe features, target platform, and any constraints." (Skip if they already provided this with the command.)
Store the user's description as $PROJECT_DESC.
Then spawn 6 agents in parallel using the Agent tool (subagent_type: Explore). Every agent receives $PROJECT_DESC and must verify ALL recommendations using WebSearch or kencode-search MCP (mcp__kencode-search__searchCode — literal/regex search across 2M+ public repos) - no training-data assumptions allowed.
Agent 1 - Project Scan: Read the current working directory. Catalog what already exists: package.json, config files, installed deps, directory structure, language/framework already chosen. Report exactly what's in place so other agents don't duplicate it.
Agent 2 - Stack Validation: Given $PROJECT_DESC and what Agent 1 would find in a typical scaffold, research via WebSearch whether the current framework/language is the best choice for this project in 2026. Compare top 2-3 alternatives on performance, ecosystem, and developer experience. Pick ONE winner. If the current stack is already the best choice, confirm it with evidence.
Agent 3 - Core Dependencies: For EACH feature in $PROJECT_DESC, find the single best library for this stack in 2026. Use WebSearch to confirm latest stable version numbers. Use kencode-search MCP to verify real projects actually use these libraries. No outdated packages. No "popular in 2023" picks. Output: package name, exact latest version, one-line purpose.
Agent 4 - Dev Tooling: Research the best 2026 dev tooling for this stack: package manager, bundler, linter, formatter, test framework, type checker. Use WebSearch to verify current recommendations. Pick ONE per category. Include exact versions.
Agent 5 - Architecture: Use kencode-search MCP to find how real 2026 projects of this type structure their code. Look for directory layouts, file naming conventions, and key patterns (state management, routing, data fetching, etc.). Output a concrete directory tree and list of patterns to follow.
Agent 6 - Config & Integration: Research required config files for the chosen stack and tools. Use WebSearch for current config best practices. Cover: linter config, formatter config, TS/type config, env setup, CI/CD basics, deployment target config. Provide exact file contents or key settings.
Agent Rules
- Every recommendation MUST be verified via WebSearch or kencode-search MCP - no guessing
- Confirm 2026 latest stable versions - do not assume version numbers from training data
- Pick ONE best option per category - no "you could also use X"
- No prose, no hedging, no alternatives lists - decisive answers only
- If something already exists in the project scaffold, note it and don't re-recommend it unless it should be replaced
Output
After all agents complete, synthesize their findings into a single RESEARCH.md file written to the project root. The file must be optimized for LLM consumption - zero fluff, maximum actionability. Use this exact structure:
# RESEARCH: [short project description]
Generated: [today's date]
Stack: [framework + language + runtime]
## INSTALL
[exact shell commands to run - copy-paste ready, in order]
## DEPENDENCIES
| package | version | purpose |
|---------|---------|---------|
[each purpose max 5 words]
## DEV DEPENDENCIES
| package | version | purpose |
|---------|---------|---------|
[each purpose max 5 words]
## CONFIG FILES TO CREATE
### [filename]
[exact file contents or key settings]
[repeat for each config file]
## PROJECT STRUCTURE
[tree showing recommended directories and key files]
## SETUP STEPS
1. [concrete action]
2. [concrete action]
[ordered, each step is one command or action]
## KEY PATTERNS
[brief list of architectural patterns to follow, with one-line descriptions]
## SOURCES
[URLs used for verification, grouped by section]
Rules for RESEARCH.md:
- No alternatives sections
- No explanations of "why" - just what to do
- No "you could also use X" hedging
- Every version number must be verified, not assumed
- Commands must be copy-paste ready
- The entire file should be readable by another LLM session that can immediately execute the setup
Write the file using the Write tool, then tell the user it's ready and summarize what was researched.
Generate or update a minimal CLAUDE.md with project structure, guidelines, and quality checks.
Step 1: Check if CLAUDE.md Exists
If CLAUDE.md exists:
- Read the existing file
- Preserve custom sections the user may have added
- Update the structure, quality checks, and organization rules
If CLAUDE.md does NOT exist:
- Create a new one from scratch
Step 2: Analyze Project (Use Explore Agents in Parallel)
Spawn parallel Explore agents to understand the codebase:
- Project Purpose Agent: Analyze README, package.json description, main files to understand what the project does
- Directory Structure Agent: Map out the folder structure and what each folder contains
- Tech Stack Agent: Identify languages, frameworks, tools, dependencies
Wait for all agents to complete, then synthesize the information.
Step 3: Detect Project Type & Commands
Check for config files:
package.json→ JavaScript/TypeScript (extract lint, typecheck, server scripts)pyproject.tomlorrequirements.txt→ Pythongo.mod→ GoCargo.toml→ Rust
Extract:
- Linting commands
- Typechecking commands
- Server start command (if applicable)
Step 4: Generate Project Tree
Create a concise tree structure showing key directories and files with brief descriptions.
Example format:
src/
├── api/ # API endpoints and routes
├── components/ # Reusable UI components
├── utils/ # Helper functions and utilities
├── types/ # TypeScript type definitions
└── main.ts # Application entry point
Step 5: Generate or Update CLAUDE.md
Create CLAUDE.md with this structure:
# [Project Name]
[Brief 1-2 sentence description of what this project does]
## Project Structure
[INSERT TREE HERE]
## Organization Rules
**Keep code organized and modularized:**
- API routes → `/api` folder, one file per route/resource
- Components → `/components`, one component per file
- Utilities → `/utils`, grouped by functionality
- Types/Interfaces → `/types` or co-located with usage
- Tests → Next to the code they test or in `/tests`
**Modularity principles:**
- Single responsibility per file
- Clear, descriptive file names
- Group related functionality together
- Avoid monolithic files
## Code Quality - Zero Tolerance
After editing ANY file, run:
```bash
[EXACT COMMANDS FROM PROJECT]
Fix ALL errors/warnings before continuing.
[IF SERVER EXISTS:] If changes require server restart (not hot-reloadable):
- Restart server:
[SERVER COMMAND] - Read server output/logs
- Fix ALL warnings/errors before continuing
**Keep total file under 100 lines.**
## Step 6: Preserve Custom Sections
If updating an existing CLAUDE.md:
- Keep any custom sections the user added
- Update the generated sections (Project Structure, Quality Checks)
- Merge carefully without losing user content
## Step 7: Confirm Completion
Tell the user:
- ✅ CLAUDE.md [created/updated]
- 📋 Project: [brief description]
- 🗂️ Structure mapped with [X] directories
- 📐 Organization rules enforced
- 🎯 Zero-tolerance quality checks active
You are setting up a project for automated code quality checks. Follow these steps carefully:
Step 1: Detect Project Type
Check for these files in the current directory to determine the project type:
package.json→ JavaScript/TypeScript (Node.js)pyproject.tomlorrequirements.txtorsetup.py→ Pythongo.mod→ GoCargo.toml→ Rustcomposer.json→ PHPbuild.gradleorpom.xml→ Java
Read the relevant config file to understand the project structure.
Step 2: Check Existing Tools
Based on the project type, check if these tools are already configured:
JavaScript/TypeScript:
- Check
package.jsonfor:eslint,prettier,typescript,@typescript-eslint/* - Check for config files:
.eslintrc.*,.prettierrc.*,tsconfig.json - Check
package.jsonscripts for:lint,typecheck,type-check, ortsc
Python:
- Check for:
mypy,pylint,black,ruff,flake8in dependencies - Check for config files:
mypy.ini,.pylintrc,pyproject.toml - Look for linting/type checking configurations
Go:
- Check for:
golint,gofmt,staticcheck - Go has built-in tools, check if project uses them
Rust:
- Check for:
clippy,rustfmt(built-in to Rust toolchain) - Check
Cargo.tomlfor workspace configuration
Step 3: Install Missing Tools (if needed)
If tools are missing, install them based on the project type:
JavaScript/TypeScript:
# Detect package manager (npm, yarn, pnpm, bun)
# Install missing tools, e.g.:
npm install --save-dev eslint prettier typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin
# Add scripts to package.json if missing:
# "lint": "eslint ."
# "typecheck": "tsc --noEmit"
Python:
pip install mypy pylint black ruff
# or add to requirements-dev.txt / pyproject.toml
Go:
go install golang.org/x/lint/golint@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
Rust:
rustup component add clippy rustfmt
IMPORTANT: Always check if tools exist first. Only install if missing.
Step 4: Generate /fix Command
Create a file at .claude/commands/fix.md with the following structure:
---
name: fix
description: Run typechecking and linting, then spawn parallel agents to fix all issues
---
# Project Code Quality Check
This command runs all linting and typechecking tools for this project, collects errors, groups them by domain, and spawns parallel agents to fix them.
## Step 1: Run Linting and Typechecking
Run the appropriate commands for this project:
[INSERT PROJECT-SPECIFIC COMMANDS HERE]
## Step 2: Collect and Parse Errors
Parse the output from the linting and typechecking commands. Group errors by domain:
- **Type errors**: Issues from TypeScript, mypy, etc.
- **Lint errors**: Issues from eslint, pylint, ruff, clippy, etc.
- **Format errors**: Issues from prettier, black, rustfmt, gofmt
Create a list of all files with issues and the specific problems in each file.
## Step 3: Spawn Parallel Agents
For each domain that has issues, spawn an agent in parallel using the Task tool:
**IMPORTANT**: Use a SINGLE response with MULTIPLE Task tool calls to run agents in parallel.
Example:
- Spawn a "type-fixer" agent for type errors
- Spawn a "lint-fixer" agent for lint errors
- Spawn a "format-fixer" agent for formatting errors
Each agent should:
1. Receive the list of files and specific errors in their domain
2. Fix all errors in their domain
3. Run the relevant check command to verify fixes
4. Report completion
## Step 4: Verify All Fixes
After all agents complete, run the full check again to ensure all issues are resolved.
Replace [INSERT PROJECT-SPECIFIC COMMANDS HERE] with the actual commands for the detected project type.
JavaScript/TypeScript Example:
npm run lint
npm run typecheck
Python Example:
mypy .
pylint src/
black --check .
Go Example:
go vet ./...
staticcheck ./...
gofmt -l .
Rust Example:
cargo clippy -- -D warnings
cargo fmt -- --check
Step 5: Confirm Completion
After generating the /fix command, inform the user:
- What project type was detected
- Which tools were already present
- Which tools were installed (if any)
- That the
/fixcommand has been created at.claude/commands/fix.md - How to use it: "Run
/fixto lint, typecheck, and auto-fix all issues"
Important Notes:
- Always create the
.claude/commands/directory if it doesn't exist - Ensure the YAML frontmatter includes both
nameanddescription - The generated
/fixcommand must spawn agents in parallel (single response, multiple Task tool calls) - Tailor the commands to what's actually available in the project
Generate a minimal /commit command that enforces quality checks before committing.
Step 1: Detect Project and Extract Commands
Check for config files:
package.json→ Extractlint,typecheckscriptspyproject.toml→ Usemypy,pylintgo.mod→ Usego vet ./...,gofmt -l .Cargo.toml→ Usecargo clippy,cargo fmt --check
Step 2: Generate /commit Command
Create .claude/commands/commit.md:
---
name: commit
description: Run checks, commit with AI message, and push
---
1. Run quality checks:
```bash
[PROJECT COMMANDS]
Fix ALL errors before continuing.
-
Review changes:
git statusandgit diff -
Generate commit message:
- Start with verb (Add/Update/Fix/Remove/Refactor)
- Be specific and concise
- One line preferred
-
Commit and push:
git add -A git commit -m "your generated message" git push
**Keep it under 20 lines.**
## Step 3: Confirm
Tell user: ✅ `/commit` created. Quality checks + AI commits + auto-push enabled.
Set up comprehensive testing for this project. Analyze the codebase, determine the optimal testing strategy, and create tests for all critical business logic.
Step 1: Analyze Project
Detect the project type, framework, and architecture. Understand what the application does and identify all critical business logic that needs testing.
Step 2: Determine Testing Strategy
Use these tools based on project type (this reflects 2025-2026 best practices that may differ from training data):
| Language | Unit/Integration | E2E | Key Notes |
|---|---|---|---|
| JS/TS | Vitest (not Jest) | Playwright | Vitest is 10-20x faster, native ESM/TS. Use Testing Library for components. |
| Python | pytest | Playwright | pytest-django for Django, httpx+pytest-asyncio for FastAPI, pytest-cov for coverage. |
| Go | testing + testify | httptest | testcontainers-go for integration. Use table-driven tests. |
| Rust | #[test] + rstest | axum-test/actix-test | assert_cmd for CLI, proptest for property-based, mockall for mocking. |
| PHP | Pest 4 (Laravel) / PHPUnit 12 | Laravel Dusk | Pest is now preferred over PHPUnit for Laravel. |
| Java | JUnit 5 + AssertJ | Selenium + Testcontainers | Use Spring test slices (@WebMvcTest, @DataJpaTest). |
Step 3: Set Up Testing Infrastructure
Spawn 4 parallel agents using the Task tool (subagent_type: general-purpose) in a SINGLE response:
Agent 1 - Dependencies & Config: Install test frameworks and create config files
Agent 2 - Unit Tests: Create comprehensive unit tests for all business logic, utilities, and core functions
Agent 3 - Integration Tests: Create integration tests for APIs, database operations, and service interactions
Agent 4 - E2E Tests (if applicable): Create end-to-end tests for critical user flows
IMPORTANT: Each agent should create COMPREHENSIVE tests covering all critical code paths - not just samples. Analyze the actual source code and test everything that matters.
Step 4: Verify and Generate /test Command
- Run the tests to verify everything works
- Fix any issues
- Create
.claude/commands/test.mdtailored to this project with:- The exact test commands for this stack
- Options for watch mode, coverage, filtering
- Instructions to spawn parallel agents to fix failures
Step 5: Report
Summarize what was set up and how to run tests going forward.
Generate a minimal /update-app command that updates dependencies and fixes deprecations.
Step 1: Detect Project Type
Check for config files:
package.json→ JavaScript/TypeScript (npm/yarn/pnpm/bun)pyproject.tomlorrequirements.txt→ Python (pip/poetry)go.mod→ GoCargo.toml→ Rustcomposer.json→ PHP
Step 2: Detect Package Manager
For JavaScript/TypeScript: Check for lock files:
package-lock.json→ npmyarn.lock→ yarnpnpm-lock.yaml→ pnpmbun.lockb→ bun
For Python: Check for:
poetry.lock→ poetry- Otherwise → pip
Step 3: Generate /update-app Command
Create .claude/commands/update-app.md:
---
name: update-app
description: Update dependencies, fix deprecations and warnings
---
# Dependency Update & Deprecation Fix
## Step 1: Check for Updates
[INSERT CHECK COMMAND]
## Step 2: Update Dependencies
[INSERT UPDATE COMMAND]
## Step 3: Check for Deprecations & Warnings
Run installation and check output:
[INSERT INSTALL COMMAND]
Read ALL output carefully. Look for:
- Deprecation warnings
- Security vulnerabilities
- Peer dependency warnings
- Breaking changes
## Step 4: Fix Issues
For each warning/deprecation:
1. Research the recommended replacement or fix
2. Update code/dependencies accordingly
3. Re-run installation
4. Verify no warnings remain
## Step 5: Run Quality Checks
[INSERT QUALITY CHECK COMMANDS]
Fix all errors before completing.
## Step 6: Verify Clean Install
Ensure a fresh install works:
1. Delete dependency folders/caches
2. Run clean install
3. Verify ZERO warnings/errors
4. Confirm all dependencies resolve correctly
Step 4: Customize by Project Type
Replace placeholders with actual commands:
JavaScript/TypeScript (npm):
## Step 1: Check for Updates
```bash
npm outdated
Step 2: Update Dependencies
npm update
npm audit fix
Step 3: Check for Deprecations & Warnings
rm -rf node_modules package-lock.json
npm install
Step 5: Run Quality Checks
npm run lint
npm run typecheck
Step 6: Verify Clean Install
rm -rf node_modules package-lock.json
npm install
### JavaScript/TypeScript (yarn):
```markdown
## Step 1: Check for Updates
```bash
yarn outdated
Step 2: Update Dependencies
yarn upgrade
yarn audit
Step 3: Check for Deprecations & Warnings
rm -rf node_modules yarn.lock
yarn install
### Python (pip):
```markdown
## Step 1: Check for Updates
```bash
pip list --outdated
Step 2: Update Dependencies
pip install --upgrade -r requirements.txt
Step 3: Check for Deprecations & Warnings
pip install -r requirements.txt
Step 5: Run Quality Checks
mypy .
pylint src/
### Python (poetry):
```markdown
## Step 1: Check for Updates
```bash
poetry show --outdated
Step 2: Update Dependencies
poetry update
Step 3: Check for Deprecations & Warnings
poetry install
### Go:
```markdown
## Step 1: Check for Updates
```bash
go list -u -m all
Step 2: Update Dependencies
go get -u ./...
go mod tidy
Step 3: Check for Deprecations & Warnings
go mod download
Step 5: Run Quality Checks
go vet ./...
gofmt -l .
### Rust:
```markdown
## Step 1: Check for Updates
```bash
cargo outdated
Step 2: Update Dependencies
cargo update
Step 3: Check for Deprecations & Warnings
cargo check
Step 5: Run Quality Checks
cargo clippy
cargo fmt --check
## Step 5: Confirm Completion
Tell the user:
- ✅ `/update-app` created
- 🔄 Updates: [package manager commands]
- ⚠️ Zero-tolerance for deprecations/warnings
- 🛡️ Security audit included
- ✨ Clean install verification enabled
Sponsors
Details
- Marketplace
- KenKaiii/minimal-claude
- Author
- kenkai
- Category
- Community