Agent skill
Quality Gate Detection
Detect and configure quality gate commands for Ralph's autonomous execution. Use when: (1) Analyzing a project to determine available test, lint, and build scripts, (2) Generatiing a task-specific verification checklist based on project reality. This skill enables Ralph to adapt verification to the specific project context.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/quality-gate-detection
SKILL.md
Quality Gate Detection
Dynamically detect project quality gates from package.json scripts and frameworks.
Prerequisites
- Read access to
package.jsonin the project root
Detection Process
Step 1: Analyze Project Scripts (Hybrid Diagnosis)
Read package.json and inspect the scripts section to identify verification commands.
Priority Heuristics:
- Test: Look for
test,test:unit,test:ci. Preference:npm testor specific script. - Lint: Look for
lint,lint:fix,eslint. Preference:npm run lint. - Typecheck: Look for
typecheck,tsc,build. Preference:npm run typecheckortsc --noEmit. - Browser/E2E: Look for
test:browser,e2e,cypress,playwright. Preference:npm run test:browser.
Framework Detection:
- Identify test runner:
jest,vitest,mocha,ava. - Identify linter:
eslint,tslint,biome. - Identify builder/runtime:
tsc,vite,next,webpack.
Step 2: Formulate Verification Commands
Construct the actual commands to be run by the agent.
- If a script exists (e.g.,
"test": "jest"), usenpm run test. - If no script exists but framework is detected (e.g.,
jestin dependencies), try standard binarynpx jest. - MISSING: If no scripts/frameworks are detected for a category, leave the command empty. Do NOT assume defaults like
npm testexist.
Step 3: Execution (Just-in-Time)
Use the detected commands immediately to verify your work.
- Do not write a
quality-gates.jsonfile. - Do not ask for permission to run standard checks unless they are destructive.
- Simply execute the commands as part of your verification loop.
Edge Cases
Ambiguous Scripts:
- If multiple scripts match (e.g.,
testandtest:all), prefer the one that seems most appropriate for local verification (oftentestortest:unit). - When in doubt, note the ambiguity in the "rationale".
Missing Scripts:
- If a category (e.g.,
lint) has no script and no detected config, omit it from the required gates. Report it as "Not Detected".
Validation
- Verify
package.jsonexists and is valid JSON. - Ensure derived commands are executable (e.g., don't suggest
npm run lintiflintscript is missing).
Reference Documentation
- Config Template: See
tools/config.jsonfor full configuration structure
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?