Agent skill

feat-20260126-214833

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/feat-20260126-214833

SKILL.md

Extract story metrics skill from story-writer agent

Overview

Extract the performance metrics calculation logic from story-writer agent into a dedicated skill with bash script. The agent will preload this skill for calculating commit counts, timestamps, duration, and velocity.

Key Files

  • plugins/core/agents/story-writer.md - Simplify to preload skill
  • plugins/core/skills/story-metrics/SKILL.md - New skill definition (create)
  • plugins/core/skills/story-metrics/scripts/calculate.sh - Bash script for metrics calculation (create)

Implementation Steps

  1. Create plugins/core/skills/story-metrics/SKILL.md with instructions for using the metrics script
  2. Create plugins/core/skills/story-metrics/scripts/calculate.sh that:
    • Takes base branch as argument (default: main)
    • Calculates commit count: git rev-list --count <base>..HEAD
    • Gets first/last commit timestamps
    • Calculates duration in hours
    • Determines velocity unit (hours vs business days)
    • Outputs JSON with all metrics for easy parsing
  3. Update plugins/core/agents/story-writer.md:
    • Add skills: [story-metrics] to frontmatter
    • Replace inline bash commands with reference to skill script
    • Keep narrative writing instructions in agent

Considerations

  • Script output should be JSON for reliable parsing
  • Duration unit logic (hours vs business days) belongs in script
  • Story narrative generation stays in agent (requires LLM reasoning)

Final Report

Development completed as planned.

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results