Auto-configure quality gates, hooks, and settings for a new project. Detects project type and sets up appropriate tooling. Use when onboarding a new codebase.
git clone https://github.com/rohitg00/pro-workflow.git--- name: auto-setup description: Auto-configure quality gates, hooks, and settings for a new project. Detects project type and sets up appropriate tooling. Use when onboarding a new codebase. user-invocable: true --- # Auto Setup Detect project type and configure pro-workflow quality gates automatically. ## Trigger Use when: - Starting work on a new project - Onboarding to an unfamiliar codebase - Setting up CI integration ## Detection ### Step 1: Identify Project Type ```bash ls package.json pyproject.toml Cargo.toml go.mod Gemfile pom.xml build.gradle 2>/dev/null ``` ### Step 2: Configure Quality Gates **Node.js/TypeScript:** ```json { "lint": "npm run lint", "typecheck": "npx tsc --noEmit", "test": "npm test -- --changed --passWithNoTests", "format": "npx prettier --check ." } ``` **Python:** ```json { "lint": "ruff check .", "typecheck": "mypy .", "test": "pytest --tb=short -q", "format": "ruff format --check ." } ``` **Rust:** ```json { "lint": "cargo clippy -- -D warnings", "typecheck": "cargo check", "test": "cargo test --quiet", "format": "cargo fmt --check" } ``` **Go:** ```json { "lint": "golangci-lint run", "typecheck": "go vet ./...", "test": "go test ./... -count=1", "format": "gofmt -l ." } ``` ### Step 3: Verify Tools Are Installed Run each command with `--version` or `--help` to confirm availability. Report missing tools. ### Step 4: Create Configuration Generate a `.claude/settings.json` with: - Quality gate commands for the detected project type - Suggested permission rules (user reviews and approves) - Hook configuration for the project ## Output ```text AUTO SETUP Project type: [Node.js/Python/Rust/Go/Mixed] Package manager: [npm/pnpm/yarn/pip/cargo] Quality gates configured: lint: [command] ✓ typecheck: [command] ✓ test: [command] ✓ format: [command] ✓ Missing tools: - [tool] — install with: [command] Settings written to: .claude/settings.json ``` ## Rules - Never overwrite existing settings without asking - Detect, don't assume — check for tool presence - Support monorepos (check for workspaces config) - Report missing tools with install commands
1. **Specify the project path**: Run the prompt with `[PROJECT_PATH]` set to your new project's root directory (e.g., `/path/to/myproject`). 2. **Define tools and rulesets**: Customize `[TOOLS]` (e.g., ESLint, SonarQube) and `[RULESETS]` (e.g., `airbnb` for JavaScript, `google` for Python) based on your team's standards. 3. **Review changes**: The AI will output a summary of configured files (e.g., `.pre-commit-config.yaml`, `.github/workflows/ci.yml`). Verify these align with your project's needs. 4. **Commit and test**: Apply the changes, commit them to the repo, and run the CI pipeline to ensure everything works. 5. **Iterate**: Adjust rulesets or tools as needed by re-running the prompt with updated placeholders. **Tips**: - For monorepos, specify the subdirectory (e.g., `/workspace/monorepo/apps/backend`). - Use `TOOLS=all` to auto-detect and set up the most common tools for your project type. - If the project is language-agnostic (e.g., a config repo), omit `[TOOLS]` to focus on hooks and CI.
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/rohitg00/pro-workflow/tree/main/skills/auto-setupCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Analyze the new project in [PROJECT_PATH]. Detect the project type (e.g., Python, JavaScript, Java) and automatically configure required quality gates, pre-commit hooks, and IDE settings. Set up [TOOLS] (e.g., ESLint, Black, SonarQube) with [RULESETS] and ensure CI/CD pipelines include [STAGES]. Provide a summary of changes and next steps for the team.
For a new Python project in `/workspace/myapp`, the AI detected a Flask application with a `requirements.txt` file. It configured: 1. **Pre-commit hooks**: Installed `pre-commit` with hooks for `black`, `flake8`, and `mypy` (using the `strict` profile). The hooks will run on every commit to enforce PEP 8 compliance and type checking. 2. **Quality gates**: Added a `.pre-commit-config.yaml` file with the following rules: - `black`: Auto-format Python code to PEP 8 standards. - `flake8`: Enforce coding style with a max line length of 88 and disallow unused imports. - `mypy`: Enable strict type checking with `disallow_untyped_defs = True`. 3. **IDE settings**: Generated a `.vscode/settings.json` file to auto-apply Black formatting on save and enable Pylance for type checking. 4. **CI/CD pipeline**: Updated the GitHub Actions workflow (`/.github/workflows/ci.yml`) to include: - Linting (flake8) and type checking (mypy) on every push. - Unit tests (pytest) with coverage reporting. - A SonarQube scan triggered on pull requests. **Next steps**: - Run `pre-commit install` to enable the hooks locally. - Commit the changes to trigger CI checks. - Review the SonarQube report for any critical issues before merging. The setup ensures consistent code quality from day one and reduces manual configuration overhead for the team.
skills-collection
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan