mcpField
P
portfolio-artifact

portfolio-artifact

github.com/scientiacapitalProductivity2859 installsUpdated 3w ago
Repository

About portfolio-artifact

portfolio-artifact is a development metrics tracking skill for Go-To-Market Engineers, recording delivery, cost, and efficiency measures from development sessions. It creates weekly digests and executive reports, with metrics stored locally in JSONL files.

Key features

  1. 01Track commits, file changes, and lines shipped
  2. 02Count features, fixes, and test changes
  3. 03Calculate cost metrics for features and fixes
  4. 04Generate weekly digests and executive reports
  5. 05Store daily metrics in JSONL

Use cases

  1. 01Review weekly feature delivery and bug fixes
  2. 02Prepare engineering impact reports for stakeholders
  3. 03Compare project costs and delivery trends

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/scientiacapital/skills --skill portfolio-artifact

After installing, type/portfolio-artifactin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

config.json
reference/
metrics-guide.md
report-templates.md

Details

From the project README
Automatically extract Go-To-Market Engineer portfolio metrics from development sessions. Captures lines shipped, files changed, bugs fixed, tests added, PRs merged, time saved, and cost per feature. Generates executive summaries and weekly digests.

<quick_start> Capture today's metrics:

# Quick session stats
echo "Commits: $(git log --since='today 00:00' --oneline | wc -l | tr -d ' ')"
echo "Files changed: $(git diff --stat $(git log --since='today 00:00' --format='%H' | tail -1)..HEAD 2>/dev/null | tail -1)"

Generate weekly report:

cat ~/.claude/portfolio/daily-metrics.jsonl | jq -s 'map(select(.date >= "'$(date -v-7d +%Y-%m-%d)'"))'

</quick_start>

<success_criteria>

  • Daily metrics captured automatically via End Day protocol (commits, features, fixes, cost)
  • Derived metrics calculated: cost-per-feature, cost-per-bug-fix, lines-per-dollar
  • Weekly digest generated with project breakdown and day-by-day trends
  • Executive summary ready for stakeholder review with week-over-week comparisons
  • Metrics stored persistently at ~/.claude/portfolio/daily-metrics.jsonl </success_criteria>
- "capture metrics", "portfolio report", "what did I ship" - "weekly summary", "executive summary", "sprint report" - "show impact", "productivity metrics"

Metrics Captured

Per Session (End Day auto-capture)
MetricSourceHow
Commitsgit log --since="today"Count
Files changedgit diff --statCount from diff
Lines added/removedgit diff --statParse +/-
Tests addedgit diff --stat -- '*.test.*'Count test files
PRs createdgh pr list --author @meGitHub CLI
Bugs fixedCommits matching fix:Conventional commits
Features shippedCommits matching feat:Conventional commits
Cost~/.claude/daily-cost.jsonDaily spend
Derived Metrics
MetricFormulaWhy It Matters
Cost per featureTotal cost / feat: commitsEfficiency
Cost per bug fixTotal cost / fix: commitsROI on debugging
Lines per dollarLines shipped / total costProductivity
Test coverage deltaTests added / files changedQuality signal

Collection

Automatic (End Day Protocol)

The workflow-orchestrator End Day protocol calls this automatically:

#!/bin/bash
# Auto-capture at end of day
DATE=$(date +%Y-%m-%d)
COMMITS=$(git log --since="today 00:00" --oneline 2>/dev/null | wc -l | tr -d ' ')
FEATS=$(git log --since="today 00:00" --oneline --grep="^feat" 2>/dev/null | wc -l | tr -d ' ')
FIXES=$(git log --since="today 00:00" --oneline --grep="^fix" 2>/dev/null | wc -l | tr -d ' ')
COST=$(cat ~/.claude/daily-cost.json 2>/dev/null | jq '.spent // 0')

mkdir -p ~/.claude/portfolio
echo "{\"date\":\"$DATE\",\"commits\":$COMMITS,\"features\":$FEATS,\"fixes\":$FIXES,\"cost\":$COST}" >> ~/.claude/portfolio/daily-metrics.jsonl
Manual (On-Demand)
# Full session capture with git stats
STAT=$(git diff --stat $(git log --since="today 00:00" --format="%H" | tail -1)..HEAD 2>/dev/null | tail -1)
ADDED=$(echo "$STAT" | grep -oE '[0-9]+ insertion' | grep -oE '[0-9]+' || echo 0)
REMOVED=$(echo "$STAT" | grep -oE '[0-9]+ deletion' | grep -oE '[0-9]+' || echo 0)
echo "Today: +$ADDED/-$REMOVED lines, $COMMITS commits ($FEATS features, $FIXES fixes)"

Report Templates

Executive Summary (C-Suite)
## Engineering Impact — Week of [DATE]

**Headline:** Shipped [N] features, fixed [N] bugs across [N] projects

| Metric | This Week | Last Week | Trend |
|--------|-----------|-----------|-------|
| Features shipped | 5 | 3 | ↑ 67% |
| Bugs fixed | 8 | 12 | ↓ 33% |
| Lines shipped | 1,247 | 890 | ↑ 40% |
| Cost | $12.40 | $15.20 | ↓ 18% |
| Cost/feature | $2.48 | $5.07 | ↓ 51% |

**Key Deliverables:**
- [Feature 1]: [Impact]
- [Feature 2]: [Impact]

**Cost Optimization:** Shifted [N] tasks to Haiku, saving $[X] (Y% reduction)
Weekly Digest
## Weekly Digest — [DATE RANGE]

### By Project
| Project | Commits | Features | Fixes | Cost |
|---------|---------|----------|-------|------|
| skills-library | 12 | 5 | 2 | $3.40 |
| netzero-bot | 8 | 2 | 4 | $5.20 |

### By Day
| Day | Commits | Lines | Cost |
|-----|---------|-------|------|
| Mon | 5 | +234/-45 | $1.80 |
| Tue | 8 | +567/-123 | $2.40 |
| ... | ... | ... | ... |

### Insights
- Most productive day: Tuesday (567 lines)
- Most expensive feature: [feature] ($X)
- Cheapest bug fix: [fix] ($0.12, Haiku)
Sprint Report
## Sprint Report — [SPRINT NAME]

**Duration:** [START] → [END]
**Total Cost:** $[X]

### Deliverables
- [ ] Feature A (shipped, $X)
- [ ] Feature B (shipped, $X)
- [ ] Bug fix C (shipped, $X)

### Velocity
- Story points completed: [N]
- Cost per story point: $[X]
- Average cycle time: [N] hours

Storage

~/.claude/portfolio/
├── daily-metrics.jsonl      # One JSON line per day
├── weekly-YYYY-WW.md        # Auto-generated weekly digest
└── monthly-YYYY-MM.md       # Auto-generated monthly summary

Integration

SystemIntegration
workflow-orchestratorEnd Day auto-captures daily metrics
cost-meteringProvides cost data for cost-per-feature
git-workflowConventional commits enable feat/fix counting
agent-teamsTracks multi-agent session costs

Deep dive: See reference/metrics-guide.md, reference/report-templates.md

Emit Outcome Sidecar

As the final step, write to ~/.claude/skill-analytics/last-outcome-portfolio-artifact.json:

{"ts":"[UTC ISO8601]","skill":"portfolio-artifact","version":"1.0.0","variant":"default",
 "status":"[success|partial|error]","runtime_ms":[estimated ms from start],
 "metrics":{"metrics_captured":[n],"artifacts_generated":[n],"reports_created":[n]},
 "error":null,"session_id":"[YYYY-MM-DD]"}

Use status "partial" if some stages failed but results were produced. Use "error" only if no output was generated.

Comments

Markdown supported