Agent skill
gap-analysis-workflow
Identify capability gaps and propose new skills with prioritization. Use when analyzing missing capabilities, planning skill development, performing ontology expansion, or assessing coverage.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/capability-gap-analysis
SKILL.md
Intent
Run the composed workflow gap-analysis-workflow using atomic capability skills to systematically identify what capabilities are missing and prioritize their development.
Success criteria:
- Current capability coverage mapped with evidence
- Gaps identified with clear justification
- Relationships between existing and missing capabilities documented
- Prioritized roadmap for new skill development
- Audit trail of analysis process
Compatible schemas:
reference/capability_ontology.yamlreference/workflow_catalog.yaml
Inputs
| Parameter | Required | Type | Description |
|---|---|---|---|
goal |
Yes | string | The analysis objective (e.g., "identify gaps for autonomous deployment") |
scope |
Yes | string|array | Domain, layer, or capability set to analyze |
constraints |
No | object | Limits (e.g., max new skills, priority criteria, timeline) |
reference_ontology |
No | string | Path to reference ontology for comparison |
existing_capabilities |
No | array | List of already-implemented capabilities |
Procedure
-
Create checkpoint marker if mutation might occur:
- Create
.claude/checkpoint.okafter confirming rollback strategy
- Create
-
Invoke
/inspectand store output asinspect_out- Examine current capability landscape and documentation
-
Invoke
/map-relationshipsand store output asmap-relationships_out- Map dependencies and connections between existing capabilities
-
Invoke
/discover-relationshipand store output asdiscover-relationship_out- Identify implicit relationships and missing links
-
Invoke
/compare-plansand store output ascompare-plans_out- Compare current state against ideal or reference ontology
-
Invoke
/prioritizeand store output asprioritize_out- Rank gaps by impact, effort, and strategic value
-
Invoke
/generate-planand store output asgenerate-plan_out- Create development roadmap for new capabilities
-
Invoke
/auditand store output asaudit_out- Record analysis process and evidence
Output Contract
Return a structured object:
workflow_id: string # Unique analysis execution ID
goal: string # Analysis objective
status: completed | partial | failed
current_state:
capabilities_analyzed: integer
coverage_percentage: number # 0.0-1.0
layers_covered: array[string]
evidence_anchors: array[string]
gaps_identified:
total: integer
by_layer:
perception: array[string]
modeling: array[string]
reasoning: array[string]
action: array[string]
safety: array[string]
meta: array[string]
by_priority:
critical: array[string]
high: array[string]
medium: array[string]
low: array[string]
evidence_anchors: array[string]
relationships:
existing_dependencies: array[object]
missing_connections: array[object]
orphan_capabilities: array[string]
evidence_anchors: array[string]
comparison:
reference_ontology: string
alignment_score: number # 0.0-1.0
divergences: array[string]
evidence_anchors: array[string]
roadmap:
phases: array[object]
total_new_skills: integer
estimated_effort: string
dependencies: array[object]
evidence_anchors: array[string]
audit:
log_path: string
methodology: string
evidence_anchors: array[string]
confidence: number # 0.0-1.0
evidence_anchors: array[string]
assumptions: array[string]
Field Definitions
| Field | Type | Description |
|---|---|---|
workflow_id |
string | Unique identifier for this analysis |
current_state |
object | Summary of existing capability coverage |
gaps_identified |
object | Missing capabilities organized by layer and priority |
relationships |
object | Dependency mapping including missing connections |
comparison |
object | Alignment with reference ontology |
roadmap |
object | Phased development plan for new skills |
audit |
object | Analysis methodology and evidence trail |
confidence |
number | 0.0-1.0 based on evidence completeness |
evidence_anchors |
array | All evidence references collected |
assumptions |
array | Explicit assumptions made during analysis |
Examples
Example 1: Gap Analysis for Autonomous Code Review
Input:
goal: "Identify gaps for fully autonomous code review capability"
scope:
- "reasoning"
- "safety"
- "action"
constraints:
max_new_skills: 10
priority_criteria:
- "security_impact"
- "automation_potential"
reference_ontology: "schemas/capability_ontology.yaml"
Output:
workflow_id: "gap_20240115_120000_codereview"
goal: "Identify gaps for fully autonomous code review capability"
status: completed
current_state:
capabilities_analyzed: 45
coverage_percentage: 0.72
layers_covered:
- "reasoning"
- "safety"
- "action"
evidence_anchors:
- "file:schemas/capability_ontology.yaml"
- "file:skills/critique/SKILL.md"
gaps_identified:
total: 8
by_layer:
perception: []
modeling:
- "detect-code-smell"
- "identify-security-pattern"
reasoning:
- "compare-implementations"
- "evaluate-test-coverage"
action:
- "generate-review-comment"
- "apply-suggested-fix"
safety:
- "verify-no-regression"
- "constrain-auto-merge"
meta: []
by_priority:
critical:
- "verify-no-regression"
- "identify-security-pattern"
high:
- "detect-code-smell"
- "constrain-auto-merge"
medium:
- "compare-implementations"
- "generate-review-comment"
low:
- "evaluate-test-coverage"
- "apply-suggested-fix"
evidence_anchors:
- "file:schemas/capability_ontology.yaml:nodes"
- "tool:compare-plans:coverage_analysis"
relationships:
existing_dependencies:
- from: "critique"
to: "evaluate"
type: "requires"
- from: "plan"
to: "critique"
type: "soft_requires"
missing_connections:
- from: "detect-code-smell"
to: "critique"
type: "should_precede"
reason: "Code smells inform critique priorities"
- from: "verify-no-regression"
to: "act-plan"
type: "must_follow"
reason: "Regression check required after any code change"
orphan_capabilities: []
evidence_anchors:
- "tool:map-relationships:dependency_graph"
- "tool:discover-relationship:implicit_links"
comparison:
reference_ontology: "schemas/capability_ontology.yaml"
alignment_score: 0.72
divergences:
- "Missing specialized detection capabilities for code patterns"
- "No automated fix application in action layer"
- "Regression verification not formalized"
evidence_anchors:
- "tool:compare-plans:ontology_diff"
roadmap:
phases:
- phase: 1
name: "Security Foundation"
skills:
- "identify-security-pattern"
- "verify-no-regression"
rationale: "Critical for safe autonomous operation"
- phase: 2
name: "Detection Enhancement"
skills:
- "detect-code-smell"
- "constrain-auto-merge"
rationale: "Improves review quality and safety"
- phase: 3
name: "Automation Expansion"
skills:
- "compare-implementations"
- "generate-review-comment"
- "evaluate-test-coverage"
- "apply-suggested-fix"
rationale: "Full autonomous review capability"
total_new_skills: 8
estimated_effort: "2-3 sprints"
dependencies:
- skill: "apply-suggested-fix"
requires: ["verify-no-regression", "constrain-auto-merge"]
evidence_anchors:
- "tool:prioritize:impact_matrix"
- "tool:generate-plan:roadmap"
audit:
log_path: ".claude/audit/gap_20240115_120000_codereview.log"
methodology: "Systematic comparison against reference ontology with layer-by-layer analysis"
evidence_anchors:
- "file:.claude/audit/gap_20240115_120000_codereview.log"
confidence: 0.85
evidence_anchors:
- "file:schemas/capability_ontology.yaml"
- "tool:map-relationships:dependency_graph"
- "tool:compare-plans:ontology_diff"
- "tool:prioritize:impact_matrix"
assumptions:
- "Reference ontology is current and complete"
- "Existing skills are correctly implemented"
- "Priority criteria reflect actual business needs"
Evidence pattern: Ontology comparison, dependency graph analysis, impact-based prioritization.
Verification
- Coverage Analyzed: All capabilities in scope examined
- Gaps Documented: Each gap has layer classification and priority
- Relationships Mapped: Dependencies and missing connections identified
- Comparison Complete: Alignment score computed against reference
- Roadmap Generated: Phased plan with dependencies
- Audit Trail: Analysis methodology documented
Verification tools: Read (for ontology files), Grep (for capability search), Bash (for validation)
Safety Constraints
mutation: falserequires_checkpoint: falserequires_approval: falserisk: low
Capability-specific rules:
- Do not create new skills during analysis (discovery only)
- Validate all capability references against ontology
- Document assumptions about missing capabilities
- Flag potential security implications of gaps
- Preserve existing ontology structure
Composition Patterns
Commonly follows:
inspect- After initial codebase explorationretrieve- After fetching reference documentation
Commonly precedes:
generate-plan- To create detailed skill specificationsprioritize- To refine gap prioritizationsummarize- To create executive summary
Anti-patterns:
- Never skip relationship mapping before prioritization
- Never propose skills without checking ontology for existing alternatives
- Never prioritize without defined criteria
- Never generate roadmap without dependency analysis
Workflow references:
- See
reference/workflow_catalog.yaml#gap-analysis-workflowfor step definitions - See
reference/capability_ontology.yamlfor reference 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?