qa-setup
Verify or create standardized QA commands for polyglot projects
- License 许可
- MIT
- 最近更新
- 2026-11-09
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- model
- sonnet
- description
- Verify or create standardized QA commands for polyglot projects
- allowed-tools
- Read, Write, Bash
- argument-hint
- [ "audit|setup|--runner=just|npm|uv" ]
03 SKILL.md 正文
QA Setup
Ensure a project has standardized QA commands that work regardless of the underlying tools. This enables polyglot projects to have consistent developer experience.
Variables
MODE: $ARGUMENTS # audit (default) | setup PREFERRED_RUNNER: just # just | npm | uv | make
Standard Commands
Every project should expose these commands via the chosen runner:
| Command | Purpose | Required |
|---|---|---|
lint |
Run linter (check mode) | ✅ |
format |
Run formatter (check mode) | ✅ |
format:fix |
Run formatter (fix mode) | ✅ |
typecheck |
Run type checker | ✅ |
test |
Run test suite | ✅ |
test:watch |
Run tests in watch mode | ⚪ |
build |
Build/compile project | ✅ |
check |
Run all checks (lint+format+typecheck+test) | ✅ |
check:fix |
Run all checks with auto-fix | ⚪ |
clean |
Clean build artifacts | ⚪ |
Workflow
Phase 1: Detect Runner & Stack
echo "=== Runner Detection ==="
# Check for existing runners
RUNNER=""
if [ -f "justfile" ] || [ -f "Justfile" ]; then
echo "✓ Justfile found"
RUNNER="just"
fi
if [ -f "package.json" ]; then
echo "✓ package.json found"
if [ -z "$RUNNER" ]; then RUNNER="npm"; fi
fi
if [ -f "pyproject.toml" ]; then
echo "✓ pyproject.toml found"
if [ -z "$RUNNER" ]; then RUNNER="uv"; fi
fi
if [ -f "Makefile" ]; then
echo "✓ Makefile found (legacy)"
fi
echo ""
echo "Selected runner: ${RUNNER:-none}"
Phase 2: Audit Existing Commands
For Justfile:
if [ -f "justfile" ] || [ -f "Justfile" ]; then
echo "=== Justfile Commands ==="
just --list 2>/dev/null || echo "Could not list commands"
fi
For package.json:
if [ -f "package.json" ]; then
echo "=== npm scripts ==="
cat package.json | grep -A 50 '"scripts"' | grep -E '^\s+"' | head -20
fi
For pyproject.toml (uv scripts or poe):
if [ -f "pyproject.toml" ]; then
echo "=== Python scripts ==="
grep -A 30 "\[tool.poe.tasks\]" pyproject.toml 2>/dev/null || \
grep -A 30 "\[project.scripts\]" pyproject.toml 2>/dev/null || \
echo "No scripts section found"
fi
Phase 3: Check Required Commands
For each required command, verify it exists:
Required commands:
- [ ] lint
- [ ] format
- [ ] format:fix (or format-fix)
- [ ] typecheck
- [ ] test
- [ ] build
- [ ] check
Phase 4: Setup (if MODE=setup)
If commands are missing and MODE=setup, create them.
Justfile Template:
# QA Commands - Standardized interface for polyglot projects
# Generated by /qa-setup
# Run all checks
check: lint format typecheck test
@echo "✓ All checks passed"
# Run all checks with auto-fix
check-fix: format-fix lint-fix
@echo "✓ Auto-fixes applied"
# === Linting ===
# Check for lint errors
lint:
# TODO: Add your linter command
# Python: ruff check .
# Rust: cargo clippy --all-targets -- -D warnings
# Node: eslint .
@echo "lint: not configured"
# Fix lint errors
lint-fix:
# TODO: Add your linter fix command
@echo "lint-fix: not configured"
# === Formatting ===
# Check formatting
format:
# TODO: Add your formatter check command
# Python: ruff format --check .
# Rust: cargo fmt --check
# Node: prettier --check .
@echo "format: not configured"
# Fix formatting
format-fix:
# TODO: Add your formatter fix command
@echo "format-fix: not configured"
# === Type Checking ===
# Run type checker
typecheck:
# TODO: Add your type checker command
# Python: pyright or mypy .
# Rust: cargo check
# Node: tsc --noEmit
@echo "typecheck: not configured"
# === Testing ===
# Run tests
test:
# TODO: Add your test command
# Python: pytest
# Rust: cargo test
# Node: npm test or jest
@echo "test: not configured"
# Run tests in watch mode
test-watch:
# TODO: Add your test watch command
@echo "test-watch: not configured"
# === Building ===
# Build the project
build:
# TODO: Add your build command
@echo "build: not configured"
# === Cleanup ===
# Clean build artifacts
clean:
rm -rf build/ dist/ target/ node_modules/.cache/
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type d -name .pytest_cache -exec rm -rf {} + 2>/dev/null || true
@echo "✓ Cleaned"
package.json scripts template:
{
"scripts": {
"lint": "echo 'lint: not configured'",
"format": "echo 'format: not configured'",
"format:fix": "echo 'format:fix: not configured'",
"typecheck": "echo 'typecheck: not configured'",
"test": "echo 'test: not configured'",
"test:watch": "echo 'test:watch: not configured'",
"build": "echo 'build: not configured'",
"check": "npm run lint && npm run format && npm run typecheck && npm run test",
"check:fix": "npm run format:fix && npm run lint:fix"
}
}
pyproject.toml (poethepoet) template:
[tool.poe.tasks]
lint = "echo 'lint: not configured'"
format = "echo 'format: not configured'"
format-fix = "echo 'format-fix: not configured'"
typecheck = "echo 'typecheck: not configured'"
test = "echo 'test: not configured'"
build = "echo 'build: not configured'"
check = ["lint", "format", "typecheck", "test"]
check-fix = ["format-fix", "lint"]
Report
## QA Setup Audit
**Project:** <name>
**Runner:** <just|npm|uv|make|none>
**Mode:** <audit|setup>
---
### Command Status
| Command | Status | Implementation |
|---------|--------|----------------|
| `lint` | ✅/❌ | <actual command or "missing"> |
| `format` | ✅/❌ | <actual command> |
| `format:fix` | ✅/❌ | <actual command> |
| `typecheck` | ✅/❌ | <actual command> |
| `test` | ✅/❌ | <actual command> |
| `build` | ✅/❌ | <actual command> |
| `check` | ✅/❌ | <actual command> |
---
### Verdict
**Status:** ✅ QA READY / ⚠️ PARTIAL / ❌ NOT CONFIGURED
<If not ready>
**Missing Commands:**
- <list>
**To Fix:**
Run `/qa-setup setup` to generate missing commands, or manually add them to your runner.
</If>
<If ready>
**Next Steps:**
- Run `/pre-commit-qa` to execute all checks
- Add `just check` to your CI/CD pipeline
</If>
Examples
Example 1: Audit current project
/qa-setup
Example 2: Setup with justfile
/qa-setup setup --runner=just
Example 3: Audit and suggest fixes
/qa-setup audit
04 同仓库更多 Skills
testing-expert
Expert knowledge for analyzing testing architecture and planning improvements
security-hardening
Audit and harden repository security — supply chain, CI/CD scanners, secrets, credentials
review
Review implementation against project plan and verify completeness
prioritize
Prioritize review comments by severity
pre-commit-qa
Run standardized QA checks before committing changes
macos-keychain-secrets
Store and retrieve secrets securely using macOS Keychain. Use when working with API keys, tokens, credentials, or any sensitive values that should not be stored in plain text files, dotfiles, or committed to git. Triggers on requests to store secrets, manage credentials, set up environment variables securely, or avoid hardcoding sensitive values.