Get the FREE Ultimate OpenClaw Setup Guide →

task-analyzer

Scanned
npx machina-cli add skill shinpr/claude-code-workflows/task-analyzer --openclaw
Files (1)
SKILL.md
4.4 KB

Task Analyzer

Provides metacognitive task analysis and skill selection guidance.

Skills Index

See skills-index.yaml for available skills metadata.

Task Analysis Process

1. Understand Task Essence

Identify the fundamental purpose beyond surface-level work:

Surface WorkFundamental Purpose
"Fix this bug"Problem solving, root cause analysis
"Implement this feature"Feature addition, value delivery
"Refactor this code"Quality improvement, maintainability
"Update this file"Change management, consistency

Key Questions:

  • What problem are we really solving?
  • What is the expected outcome?
  • What could go wrong if we approach this superficially?

2. Estimate Task Scale

ScaleFile CountIndicators
Small1-2Single function/component change
Medium3-5Multiple related components
Large6+Cross-cutting concerns, architecture impact

Scale affects skill priority:

  • Larger scale → process/documentation skills more important
  • Smaller scale → implementation skills more focused

3. Identify Task Type

TypeCharacteristicsKey Skills
ImplementationNew code, featurescoding-principles, testing-principles
FixBug resolutionai-development-guide, testing-principles
RefactoringStructure improvementcoding-principles, ai-development-guide
DesignArchitecture decisionsdocumentation-criteria, implementation-approach
QualityTesting, reviewtesting-principles, integration-e2e-testing

4. Tag-Based Skill Matching

Extract relevant tags from task description and match against skills-index.yaml:

Task: "Implement user authentication with tests"
Extracted tags: [implementation, testing, security]
Matched skills:
  - coding-principles (implementation, security)
  - testing-principles (testing)
  - ai-development-guide (implementation)

5. Implicit Relationships

Consider hidden dependencies:

Task InvolvesAlso Include
Error handlingdebugging, testing
New featuresdesign, implementation, documentation
Performanceprofiling, optimization, testing
Frontendtypescript-rules, typescript-testing
API/Integrationintegration-e2e-testing

Output Format

Return structured analysis with skill metadata from skills-index.yaml:

taskAnalysis:
  essence: <string>  # Fundamental purpose identified
  type: <implementation|fix|refactoring|design|quality>
  scale: <small|medium|large>
  estimatedFiles: <number>
  tags: [<string>, ...]  # Extracted from task description

selectedSkills:
  - skill: <skill-name>  # From skills-index.yaml
    priority: <high|medium|low>
    reason: <string>  # Why this skill was selected
    # Pass through metadata from skills-index.yaml
    tags: [...]
    typical-use: <string>
    size: <small|medium|large>
    sections: [...]  # All sections from yaml, unfiltered

Note: Section selection (choosing which sections are relevant) is done after reading the actual SKILL.md files.

Skill Selection Priority

  1. Essential - Directly related to task type
  2. Quality - Testing and quality assurance
  3. Process - Workflow and documentation
  4. Supplementary - Reference and best practices

Metacognitive Question Design

Generate 3-5 questions according to task nature:

Task TypeQuestion Focus
ImplementationDesign validity, edge cases, performance
FixRoot cause (5 Whys), impact scope, regression testing
RefactoringCurrent problems, target state, phased plan
DesignRequirement clarity, future extensibility, trade-offs

Warning Patterns

Detect and flag these patterns:

PatternWarningMitigation
Large change at onceHigh riskSplit into phases
Implementation without testsQuality riskFollow TDD
Immediate fix on errorRoot cause missedPause, analyze
Coding without planScope creepPlan first

Source

git clone https://github.com/shinpr/claude-code-workflows/blob/main/skills/task-analyzer/SKILL.mdView on GitHub

Overview

Task Analyzer performs metacognitive task analysis and guides skill selection to assess task complexity and work scale. It determines task essence, estimates scale, identifies task type, and matches tags against skills-index.yaml to output taskAnalysis and selectedSkills with confidence scores and metadata.

How This Skill Works

The tool first understands task essence by mapping surface work to fundamental purpose. It then estimates scale (small/medium/large) based on file counts, identifies task type (Implementation, Fix, Refactoring, Design, Quality), and performs tag-based skill matching using skills-index.yaml. It also considers implicit relationships (dependencies) and outputs a structured taskAnalysis and selectedSkills, including all relevant metadata sections from the YAML.

When to Use It

  • Before starting a project to gauge task complexity and required effort
  • When selecting which skills are most appropriate for a given task
  • When estimating the scale of work for planning and resourcing
  • During task scoping to map dependencies like error handling or performance
  • When aligning work with documentation and process requirements

Quick Start

  1. Step 1: Understand Task Essence by identifying the fundamental purpose beyond surface work
  2. Step 2: Estimate Task Scale using the file-count indicators to classify small, medium, or large
  3. Step 3: Perform Tag-Based Skill Matching against skills-index.yaml and review implicit relationships

Best Practices

  • Clarify the task essence first, mapping it to the fundamental purpose beyond surface work
  • Use the Scale table to assign small, medium, or large based on file counts (1-2, 3-5, 6+)
  • Identify the Task Type (Implementation, Fix, Refactoring, Design, Quality) to prioritize skills
  • Extract tags from the task description and match against skills-index.yaml for relevance
  • Account for implicit relationships (e.g., error handling, performance) in planning and skill selection

Example Use Cases

  • Implement user authentication with tests to map to coding-principles and testing-principles
  • Bug fix in login flow requiring root cause analysis and regression testing
  • Refactor a legacy payment module to improve maintainability and performance
  • Design a new API integration with clear documentation and implementation approach
  • Update test coverage and documentation alongside a small feature enhancement

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers