Skill v1.0.1
currentAutomated scan100/100+4 new
name: critique description: Find failure modes, edge cases, ambiguities, and exploit paths in plans, code, or designs. Use when reviewing proposals, auditing security, stress-testing logic, or validating assumptions. argument-hint: "[target] [criteria] [severity_threshold]" disable-model-invocation: false user-invocable: true allowed-tools: Read, Grep context: fork agent: explore metadata: version: "1.0.1"
Intent
Systematically analyze a target (plan, code, design, document) to identify failure modes, edge cases, ambiguities, and potential exploits. Produce actionable findings with severity ratings and mitigation recommendations.
Success criteria:
- All major failure modes identified
- Edge cases documented with reproduction scenarios
- Ambiguities flagged with clarification requests
- Security/exploit risks rated appropriately
- Each issue has an actionable suggestion
Compatible schemas:
schemas/output_schema.yaml
Inputs
| Parameter | Required | Type | Description | |
|---|---|---|---|---|
target | Yes | any | Plan, code, design, or document to critique | |
criteria | No | array | Evaluation criteria | |
severity_threshold | No | string | Minimum severity to report: low, medium, high, critical | |
context | No | any | Additional context about the target |
Inputs not listed here are outside the capability's contract: a workflow step that binds them gets W604 (STANDARD v1.1 §5.5).
Procedure
1) Understand the target: Analyze what is being critiqued
- Read and comprehend the target fully
- Identify the purpose and intended behavior
- Note stated assumptions and constraints
- Understand success criteria
2) Identify failure modes: Find ways the target could fail
- What happens under unexpected inputs?
- What if dependencies are unavailable?
- What if timing assumptions are wrong?
- What if scale exceeds expectations?
3) Enumerate edge cases: Find boundary conditions
- Empty inputs, null values, missing fields
- Maximum/minimum values
- Concurrent access scenarios
- Unicode, special characters, injection patterns
4) Detect ambiguities: Find unclear specifications
- Terms with multiple interpretations
- Missing definitions
- Implicit assumptions
- Contradictory requirements
5) Assess exploit paths: Identify security vulnerabilities
- Input validation gaps
- Authentication/authorization bypasses
- Data exposure risks
- Privilege escalation opportunities
6) Rate severity: Classify each issue (recorded per issue and in the severity map)
- CRITICAL: System compromise or data loss
- HIGH: Significant functionality or security impact
- MEDIUM: Moderate impact, workarounds exist
- LOW: Minor issues, cosmetic or edge-case
- Report in
issuesonly those at or aboveseverity_threshold
7) Recommend mitigations: Provide actionable fixes as suggestions
- Specific changes to address each finding
- Priority ordering for fixes
- Estimated effort for each mitigation
Output Contract
Return a structured object:
issues:- id: string # Unique finding identifiertype: failure_mode | edge_case | ambiguity | exploit | gapdescription: string # Clear description of the issueseverity: low | medium | high | criticallocation: string # Where in target (file:line, section, etc.)evidence: string # Supporting evidencereproduction: string | null # How to reproducerecommendation: string # Suggested fixseverity: # Issue severities, keyed by issue id<issue_id>: low | medium | high | criticalrisk_summary:overall_risk: low | medium | high | criticalmitigations_possible: booleanurgent_issues: array[string] # Issue IDs requiring immediate attentionrisk_distribution:critical: integerhigh: integermedium: integerlow: integersuggestions:- issue_ref: string # Issue IDsuggestion: string # Detailed fix suggestioneffort: low | medium | highpriority: integer # 1 = highest prioritypatterns_identified:- pattern: string # Recurring issue patternaffected_issues: array[string]systemic_fix: string # How to address patternconfidence: number # 0.0-1.0evidence_anchors: ["file:line", "section:name"]assumptions: []
Field Definitions
| Field | Type | Description | |
|---|---|---|---|
issues | array | Weaknesses found at or above severity_threshold (empty when none; workflows gate on ${<step>.issues} == []) | |
severity | object | Issue severities, keyed by issue id | |
risk_summary | object | Overall risk assessment | |
suggestions | array<object> | Prioritized improvement suggestions, each referencing an issue | |
patterns_identified | array | Recurring issues with systemic fixes | |
confidence | number | 0.0-1.0 based on analysis completeness | |
evidence_anchors | array | References to target locations | |
assumptions | array | Assumptions made during analysis |
Examples
Example 1: Plan Critique
Input:
target:id: "deploy-plan-001"goal: "Deploy new authentication service"steps:- id: "step-1"action: "Stop old auth service"- id: "step-2"action: "Deploy new auth service"- id: "step-3"action: "Run smoke tests"criteria: ["availability", "rollback", "security"]
Output:
issues:- id: "CRT-001"type: failure_modedescription: "Zero-downtime deployment not guaranteed. Stopping old service before new is verified creates outage window."severity: highlocation: "step-1 to step-2 transition"evidence: "step-1 stops service, step-2 starts new - gap exists"reproduction: "Execute plan; observe 503 errors between steps"recommendation: "Use blue-green deployment: start new service, verify health, then route traffic"- id: "CRT-002"type: gapdescription: "No rollback step defined. If step-3 smoke tests fail, no recovery procedure."severity: criticallocation: "plan.steps - missing rollback"evidence: "No rollback_action in any step"reproduction: "Smoke tests fail; manual intervention required"recommendation: "Add rollback step: 'If step-3 fails, restart old auth service'"- id: "CRT-003"type: ambiguitydescription: "'Smoke tests' not defined. Unclear what is being tested or pass criteria."severity: mediumlocation: "step-3"evidence: "No verification_criteria specified"reproduction: nullrecommendation: "Define specific test cases: auth flow, token validation, error handling"- id: "CRT-004"type: exploitdescription: "No security verification step. New service could have misconfigured permissions."severity: highlocation: "plan - missing security check"evidence: "No step validates auth service security posture"reproduction: "Deploy service with open admin endpoint; not caught by smoke tests"recommendation: "Add security scan step before traffic routing"severity:CRT-001: highCRT-002: criticalCRT-003: mediumCRT-004: highrisk_summary:overall_risk: criticalmitigations_possible: trueurgent_issues: ["CRT-002", "CRT-001"]risk_distribution:critical: 1high: 2medium: 1low: 0suggestions:- issue_ref: "CRT-002"suggestion: "Add rollback step with automatic trigger on smoke test failure"effort: lowpriority: 1- issue_ref: "CRT-001"suggestion: "Rewrite as blue-green deployment with health check before cutover"effort: mediumpriority: 2- issue_ref: "CRT-004"suggestion: "Add security scan after deployment, before enabling traffic"effort: mediumpriority: 3- issue_ref: "CRT-003"suggestion: "Define smoke test checklist with pass/fail criteria"effort: lowpriority: 4patterns_identified:- pattern: "Missing safety gates"affected_issues: ["CRT-001", "CRT-002", "CRT-004"]systemic_fix: "Adopt CAVR pattern: checkpoint before each mutation, verify after each step"confidence: 0.9evidence_anchors:- "plan:step-1:stops-service"- "plan:steps:no-rollback"assumptions:- "Auth service is critical for all user operations"- "Downtime of auth service blocks all authenticated requests"
Evidence pattern: Each issue references specific plan location; suggestions are actionable.
Example 2: Code Critique (Security Focus)
Input:
target:file: "src/api/auth.py"code: |def login(username, password):user = db.query(f"SELECT * FROM users WHERE username='{username}'")if user and user.password == password:return create_token(user.id)return Nonecriteria: ["security"]
Review adversarially: probe the code as an attacker would.
Output:
issues:- id: "CRT-001"type: exploitdescription: "SQL injection vulnerability. Username is interpolated directly into query string."severity: criticallocation: "auth.py:2"evidence: "f-string query with unescaped username input"reproduction: "username=\"admin'--\", password=\"anything\" bypasses auth"recommendation: "Use parameterized query: db.query('SELECT * FROM users WHERE username=?', (username,))"- id: "CRT-002"type: exploitdescription: "Plain-text password comparison. Passwords stored in cleartext or compared unsafely."severity: criticallocation: "auth.py:3"evidence: "Direct comparison: user.password == password"reproduction: "Database compromise exposes all passwords"recommendation: "Use bcrypt or argon2: bcrypt.checkpw(password, user.password_hash)"- id: "CRT-003"type: failure_modedescription: "No rate limiting. Brute force attacks possible."severity: highlocation: "auth.py:login function"evidence: "No attempt tracking or delay mechanism"reproduction: "Script 1000 login attempts per second"recommendation: "Add rate limiting: max 5 attempts per minute per IP/username"- id: "CRT-004"type: edge_casedescription: "Empty username/password not handled. Could cause unexpected behavior."severity: lowlocation: "auth.py:1"evidence: "No input validation at function entry"reproduction: "login('', '') - behavior undefined"recommendation: "Add input validation: if not username or not password: return None"severity:CRT-001: criticalCRT-002: criticalCRT-003: highCRT-004: lowrisk_summary:overall_risk: criticalmitigations_possible: trueurgent_issues: ["CRT-001", "CRT-002"]risk_distribution:critical: 2high: 1medium: 0low: 1suggestions:- issue_ref: "CRT-001"suggestion: "IMMEDIATE: Replace f-string query with parameterized query"effort: lowpriority: 1- issue_ref: "CRT-002"suggestion: "IMMEDIATE: Migrate to bcrypt password hashing"effort: mediumpriority: 2- issue_ref: "CRT-003"suggestion: "Add rate limiting middleware before login endpoint"effort: mediumpriority: 3- issue_ref: "CRT-004"suggestion: "Add input validation decorator"effort: lowpriority: 4patterns_identified:- pattern: "OWASP Top 10 violations"affected_issues: ["CRT-001", "CRT-002"]systemic_fix: "Security code review and SAST integration in CI"confidence: 0.95evidence_anchors:- "auth.py:2:sql-injection"- "auth.py:3:plaintext-password"assumptions:- "This code handles real user authentication"- "Database contains actual user credentials"
Verification
- [ ] All criteria were examined
- [ ] Severity ratings are justified
- [ ] Each issue has a suggestion
- [ ] Critical issues are highlighted
- [ ] Patterns are identified for systemic fixes
Verification tools: Read (for code/doc analysis), Grep (for pattern search)
Safety Constraints
mutation: falserequires_checkpoint: falserequires_approval: falserisk: low
Capability-specific rules:
- Never test exploits on production systems
- Report all critical findings immediately
- Do not disclose security findings to unauthorized parties
- If finding reveals active exploit, escalate immediately
- Be thorough but avoid false positives
Composition Patterns
Commonly follows:
plan- Critique plans before executioninspect- Understand target before critiqueretrieve- Gather context for critique
Commonly precedes:
plan- Revise plan based on critique issues and suggestionsmitigate- Address identified risksverify- Validate fixes for findingsaudit- Record critique and responses
Anti-patterns:
- Never skip critique for high-risk plans
- Never proceed with critical issues unaddressed
- Avoid superficial critique of security-sensitive targets
Workflow references:
- See
reference/composition_patterns.md#debug-code-changefor critique in debugging - See
reference/composition_patterns.md#capability-gap-analysisfor planning context