task-analyzer

GitHub

执行元认知任务分析与技能选择,通过解析任务本质、评估规模及类型,结合标签匹配与隐含依赖,精准推荐所需技能组合,以优化工作流效率。

skills/task-analyzer/SKILL.md shinpr/claude-code-workflows

Trigger Scenarios

需要确定任务复杂度时 选择合适的技能时 估算工作量规模时

Install

npx skills add shinpr/claude-code-workflows --skill task-analyzer -g -y
More Options

Use without installing

npx skills use shinpr/claude-code-workflows@task-analyzer

指定 Agent (Claude Code)

npx skills add shinpr/claude-code-workflows --skill task-analyzer -a claude-code -g -y

安装 repo 全部 skill

npx skills add shinpr/claude-code-workflows --all -g -y

预览 repo 内 skill

npx skills add shinpr/claude-code-workflows --list

SKILL.md

Frontmatter
{
    "name": "task-analyzer",
    "description": "Performs metacognitive task analysis and skill selection. Use when determining task complexity, selecting appropriate skills, or estimating work scale."
}

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 Work Fundamental 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

Scale File Count Indicators
Small 1-2 Single function/component change
Medium 3-5 Multiple related components
Large 6+ 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

Type Characteristics Key Skills
Implementation New code, features coding-principles, testing-principles
Fix Bug resolution ai-development-guide, testing-principles
Refactoring Structure improvement coding-principles, ai-development-guide
Design Architecture decisions documentation-criteria, implementation-approach
Quality Testing, review testing-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 Involves Also Include
Error handling debugging, testing
New features design, implementation, documentation
Performance profiling, optimization, testing
Frontend typescript-rules, test-implement
API/Integration integration-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: typetaskType (qualityquality-improvement; other values unchanged), tagsextractedTags, and selectedSkillsselectedRules 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 Type Question Focus
Implementation Design validity, edge cases, performance
Fix Root cause (5 Whys), impact scope, regression testing
Refactoring Current problems, target state, phased plan
Design Requirement clarity, future extensibility, trade-offs

Warning Patterns

Detect and flag these patterns:

Pattern Warning Mitigation
Large change detected Pair with implementation-approach Split into phases per strategy
Implementation task detected Pair with testing-principles Apply TDD from start
Error fix requested Pair with ai-development-guide Apply 5 Whys before fixing
Multi-file task without plan Pair with documentation-criteria Create work plan first

Version History

  • 56ab6c1 Current 2026-07-19 22:47

    重构提示词执行指导,细化大型任务的技能优先级策略,增加对研究或文档类任务的实现路径判断逻辑。

  • 66e3b29 2026-07-05 12:02

Same Skill Collection

dev-skills/skills/ai-development-guide/SKILL.md
dev-skills/skills/coding-principles/SKILL.md
dev-skills/skills/documentation-criteria/SKILL.md
dev-skills/skills/external-resource-context/SKILL.md
dev-skills/skills/frontend-ai-guide/SKILL.md
dev-skills/skills/implementation-approach/SKILL.md
dev-skills/skills/integration-e2e-testing/SKILL.md
dev-skills/skills/llm-friendly-context/SKILL.md
dev-skills/skills/test-implement/SKILL.md
dev-skills/skills/testing-principles/SKILL.md
dev-skills/skills/typescript-rules/SKILL.md
dev-workflows-frontend/skills/ai-development-guide/SKILL.md
dev-workflows-frontend/skills/coding-principles/SKILL.md
dev-workflows-frontend/skills/documentation-criteria/SKILL.md
dev-workflows-frontend/skills/external-resource-context/SKILL.md
dev-workflows-frontend/skills/frontend-ai-guide/SKILL.md
dev-workflows-frontend/skills/implementation-approach/SKILL.md
dev-workflows-frontend/skills/integration-e2e-testing/SKILL.md
dev-workflows-frontend/skills/llm-friendly-context/SKILL.md
dev-workflows-frontend/skills/recipe-diagnose/SKILL.md
dev-workflows-frontend/skills/recipe-front-adjust/SKILL.md
dev-workflows-frontend/skills/recipe-front-build/SKILL.md
dev-workflows-frontend/skills/recipe-front-design/SKILL.md
dev-workflows-frontend/skills/recipe-front-plan/SKILL.md
dev-workflows-frontend/skills/recipe-front-review/SKILL.md
dev-workflows-frontend/skills/recipe-task/SKILL.md
dev-workflows-frontend/skills/recipe-update-doc/SKILL.md
dev-workflows-frontend/skills/subagents-orchestration-guide/SKILL.md
dev-workflows-frontend/skills/task-analyzer/SKILL.md
dev-workflows-frontend/skills/test-implement/SKILL.md
dev-workflows-frontend/skills/testing-principles/SKILL.md
dev-workflows-frontend/skills/typescript-rules/SKILL.md
dev-workflows-fullstack/skills/ai-development-guide/SKILL.md
dev-workflows-fullstack/skills/coding-principles/SKILL.md
dev-workflows-fullstack/skills/documentation-criteria/SKILL.md
dev-workflows-fullstack/skills/external-resource-context/SKILL.md
dev-workflows-fullstack/skills/frontend-ai-guide/SKILL.md
dev-workflows-fullstack/skills/implementation-approach/SKILL.md
dev-workflows-fullstack/skills/integration-e2e-testing/SKILL.md
dev-workflows-fullstack/skills/llm-friendly-context/SKILL.md
dev-workflows-fullstack/skills/recipe-add-integration-tests/SKILL.md
dev-workflows-fullstack/skills/recipe-build/SKILL.md
dev-workflows-fullstack/skills/recipe-design/SKILL.md
dev-workflows-fullstack/skills/recipe-diagnose/SKILL.md
dev-workflows-fullstack/skills/recipe-front-adjust/SKILL.md
dev-workflows-fullstack/skills/recipe-front-build/SKILL.md
dev-workflows-fullstack/skills/recipe-front-design/SKILL.md
dev-workflows-fullstack/skills/recipe-front-plan/SKILL.md
dev-workflows-fullstack/skills/recipe-front-review/SKILL.md
dev-workflows-fullstack/skills/recipe-fullstack-build/SKILL.md
dev-workflows-fullstack/skills/recipe-fullstack-implement/SKILL.md
dev-workflows-fullstack/skills/recipe-implement/SKILL.md
dev-workflows-fullstack/skills/recipe-plan/SKILL.md
dev-workflows-fullstack/skills/recipe-prepare-implementation/SKILL.md
dev-workflows-fullstack/skills/recipe-reverse-engineer/SKILL.md
dev-workflows-fullstack/skills/recipe-review/SKILL.md
dev-workflows-fullstack/skills/recipe-task/SKILL.md
dev-workflows-fullstack/skills/recipe-update-doc/SKILL.md
dev-workflows-fullstack/skills/subagents-orchestration-guide/SKILL.md
dev-workflows-fullstack/skills/task-analyzer/SKILL.md
dev-workflows-fullstack/skills/test-implement/SKILL.md
dev-workflows-fullstack/skills/testing-principles/SKILL.md
dev-workflows-fullstack/skills/typescript-rules/SKILL.md
dev-workflows/skills/ai-development-guide/SKILL.md
dev-workflows/skills/coding-principles/SKILL.md
dev-workflows/skills/documentation-criteria/SKILL.md
dev-workflows/skills/external-resource-context/SKILL.md
dev-workflows/skills/implementation-approach/SKILL.md
dev-workflows/skills/integration-e2e-testing/SKILL.md
dev-workflows/skills/llm-friendly-context/SKILL.md
dev-workflows/skills/recipe-add-integration-tests/SKILL.md
dev-workflows/skills/recipe-build/SKILL.md
dev-workflows/skills/recipe-design/SKILL.md
dev-workflows/skills/recipe-diagnose/SKILL.md
dev-workflows/skills/recipe-implement/SKILL.md
dev-workflows/skills/recipe-plan/SKILL.md
dev-workflows/skills/recipe-prepare-implementation/SKILL.md
dev-workflows/skills/recipe-reverse-engineer/SKILL.md
dev-workflows/skills/recipe-review/SKILL.md
dev-workflows/skills/recipe-task/SKILL.md
dev-workflows/skills/recipe-update-doc/SKILL.md
dev-workflows/skills/subagents-orchestration-guide/SKILL.md
dev-workflows/skills/task-analyzer/SKILL.md
dev-workflows/skills/testing-principles/SKILL.md
skills/ai-development-guide/SKILL.md
skills/coding-principles/SKILL.md
skills/documentation-criteria/SKILL.md
skills/external-resource-context/SKILL.md
skills/frontend-ai-guide/SKILL.md
skills/implementation-approach/SKILL.md
skills/integration-e2e-testing/SKILL.md
skills/llm-friendly-context/SKILL.md
skills/recipe-add-integration-tests/SKILL.md
skills/recipe-build/SKILL.md
skills/recipe-design/SKILL.md
skills/recipe-diagnose/SKILL.md
skills/recipe-front-adjust/SKILL.md
skills/recipe-front-build/SKILL.md
skills/recipe-front-design/SKILL.md
skills/recipe-front-plan/SKILL.md
skills/recipe-front-review/SKILL.md
skills/recipe-fullstack-build/SKILL.md
skills/recipe-fullstack-implement/SKILL.md
skills/recipe-implement/SKILL.md
skills/recipe-plan/SKILL.md
skills/recipe-prepare-implementation/SKILL.md
skills/recipe-reverse-engineer/SKILL.md
skills/recipe-review/SKILL.md
skills/recipe-task/SKILL.md
skills/recipe-update-doc/SKILL.md
skills/subagents-orchestration-guide/SKILL.md
skills/test-implement/SKILL.md
skills/testing-principles/SKILL.md
skills/typescript-rules/SKILL.md

Metadata

Files
0
Version
56ab6c1
Hash
499f31c9
Indexed
2026-07-05 12:02

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-22 07:38
浙ICP备14020137号-1 $お客様$