mcpField
T
task-analyzer

task-analyzer

github.com/shinprAgent workflows70559 installsUpdated 6d ago
Repository

About task-analyzer

task-analyzer is a task-analysis skill for Agents that classifies task purpose, scale, and type, then selects relevant skills using skills-index.yaml. It also defines metacognitive questions and warning patterns for the analysis output.

Key features

  1. 01Task purpose classification
  2. 02Task scale and type estimation
  3. 03Tag-based skill matching
  4. 04Metacognitive question generation
  5. 05Warning pattern detection

Use cases

  1. 01Selecting skills for a requested code change
  2. 02Analyzing task scope before implementation
  3. 03Flagging when a plan or testing skill is needed

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/shinpr/claude-code-workflows --skill task-analyzer

After installing, type/task-analyzerin Claude Code to confirm it loaded.

Bundled filesreferences/skills-index.yaml

Details

From the project README

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

Action: Map the user request to one row in the Surface Work → Fundamental Purpose table above. If no row matches, state the fundamental purpose explicitly before proceeding.

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:

  • Scale >= Large → include documentation-criteria with priority high, preserving the repository's 6+ file planning contract
  • Scale >= Large and the task changes executable system behavior or requires dependency/phase strategy → also include implementation-approach with priority high
  • Scale >= Large but the task is research, documentation-only, or mechanical → include implementation-approach only when an implementation strategy decision is actually required
  • Scale = Small → select task-type essential skills only and target a maximum of 3; exceed 3 when another skill directly governs a named risk, language, or output contract
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, test-implement
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.

Consumer mapping: rule-advisor consumes this intermediate shape and owns the final schema transformation: type → taskType (quality → quality-improvement; other values unchanged), tags → extractedTags, and selectedSkills → selectedRules after it reads and extracts the selected skill sections. Preserve metaCognitiveQuestions as a separate final field generated from the question design below.

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 up to 5 questions whose answers can change skill selection, verification, or escalation. Return no questions when none would change those decisions.

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 detectedPair with implementation-approachSplit into phases per strategy
Implementation task detectedPair with testing-principlesApply TDD from start
Error fix requestedPair with ai-development-guideApply 5 Whys before fixing
Multi-file task without planPair with documentation-criteriaCreate work plan first

Comments

Markdown supported