home / skills / yonatangross / orchestkit / skill-analyzer

skill-analyzer skill

/plugins/ork/skills/skill-analyzer

This skill analyzes metadata blocks to extract structured patterns for phases, features, and related skills to accelerate integration.

npx playbooks add skill yonatangross/orchestkit --skill skill-analyzer

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
2.3 KB
---
name: skill-analyzer
description: Reference patterns for parsing and analyzing OrchestKit skill metadata from SKILL.md files. Used by demo-producer for extraction.
context: inherit
version: 1.0.0
author: OrchestKit
tags: [skill, metadata, parser, analysis, reference]
user-invocable: false
---

# Skill Analyzer

Reference patterns for extracting structured metadata from SKILL.md files.

> **Note**: Actual analysis is performed by `demo-producer/scripts/generate.sh`. This skill provides reference patterns.

## Output Structure

```typescript
interface SkillMetadata {
  name: string;
  description: string;
  tags: string[];
  version: string;
  userInvocable: boolean;
  context: 'fork' | 'inherit' | 'none';

  // Extracted content
  phases: WorkflowPhase[];
  examples: CodeExample[];
  keyFeatures: string[];
  relatedSkills: string[];
}

interface WorkflowPhase {
  name: string;
  description: string;
  tools: string[];
  isParallel: boolean;
}

interface CodeExample {
  language: string;
  code: string;
  description: string;
}
```

## Extraction Rules

### Frontmatter Parsing (Bash)
```bash
# Extract name
name=$(grep "^name:" SKILL.md | head -1 | cut -d: -f2- | xargs)

# Extract description
description=$(grep "^description:" SKILL.md | head -1 | cut -d: -f2- | xargs)

# Extract tags
tags=$(grep "^tags:" SKILL.md | sed 's/tags: \[//' | sed 's/\]//' | tr -d '"')
```

### Phase Detection
- Look for `## Phase N:` or `### Phase N:` headers
- Extract tools from code blocks (Grep, Glob, Read, Task, etc.)
- Detect parallel execution from "PARALLEL" comments or multiple tool calls

### Example Detection
- Find code blocks with language tags
- Extract surrounding context as description
- Identify quick start examples

### Feature Detection
- Parse bullet points after "Key Features" or "What it does"
- Extract from description field
- Identify from tags

## Usage in Demo Pipeline

```bash
# Integrated into demo-producer
./skills/demo-producer/scripts/generate.sh skill explore

# Internally calls extraction functions to:
# 1. Parse SKILL.md frontmatter
# 2. Extract phases from ## headers
# 3. Identify related skills
# 4. Generate demo script with extracted content
```

## References

See `references/` for detailed extraction patterns:
- `frontmatter-parsing.md` - YAML frontmatter extraction
- `phase-extraction.md` - Workflow phase detection

Overview

This skill provides reference patterns for parsing and analyzing OrchestKit skill metadata files to produce structured metadata. It defines expected output shapes, extraction heuristics, and examples used by the demo-producer pipeline. The patterns are language-agnostic and focused on reliable detection of phases, examples, and features from plain text skill documents.

How this skill works

The analyzer inspects document frontmatter and section headers to extract core fields like name, description, tags, version, invocation policy, and context. It detects workflow phases by scanning for numbered or named phase headings and extracts tools and parallelization hints from adjacent code blocks or inline comments. Code examples are discovered by locating fenced code blocks with language tags and capturing surrounding descriptive lines.

When to use it

  • When you need a consistent, typed metadata object for skills across a catalog.
  • When generating demo scripts or automated documentation from plain skill files.
  • When extracting workflow phases and tool usage for planning or visualizing pipelines.
  • When building search, recommendations, or dependency graphs from skill metadata.

Best practices

  • Include a concise frontmatter with name, description, tags, and version for reliable parsing.
  • Use clear section headers (e.g., Phase 1, Phase 2) to improve phase detection accuracy.
  • Add fenced code blocks with language tags for all runnable examples.
  • List key features as bullets under a consistent heading to simplify extraction.
  • Annotate parallel steps explicitly with a recognizable marker (e.g., PARALLEL).

Example use cases

  • Automated generation of demo scripts that call extraction functions to build pipelines.
  • Creating a searchable skill catalog with structured fields for filtering and sorting.
  • Visualization of multi-phase workflows by mapping detected phases and tools.
  • Populating test harnesses with example code snippets pulled from skill documents.

FAQ

What metadata fields does the analyzer return?

It returns a typed object containing name, description, tags, version, invocation flag, context, phases, examples, key features, and related skills.

How are parallel steps detected?

Parallel execution is inferred from explicit PARALLEL markers in text or from multiple tool calls grouped together in the same phase.