portfolio-artifact
Auto-extract GTME metrics from work sessions. Lines shipped, bugs fixed, PRs merged, cost per feature. Weekly digests and executive summaries. Use when: capture metrics, portfolio report, what did I ship, weekly summary.
What this skill does
<objective>
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.
</objective>
<quick_start>
**Capture today's metrics:**
```bash
# 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:**
```bash
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>
<triggers>
- "capture metrics", "portfolio report", "what did I ship"
- "weekly summary", "executive summary", "sprint report"
- "show impact", "productivity metrics"
</triggers>
---
## Metrics Captured
### Per Session (End Day auto-capture)
| Metric | Source | How |
|--------|--------|-----|
| Commits | `git log --since="today"` | Count |
| Files changed | `git diff --stat` | Count from diff |
| Lines added/removed | `git diff --stat` | Parse +/- |
| Tests added | `git diff --stat -- '*.test.*'` | Count test files |
| PRs created | `gh pr list --author @me` | GitHub CLI |
| Bugs fixed | Commits matching `fix:` | Conventional commits |
| Features shipped | Commits matching `feat:` | Conventional commits |
| Cost | `~/.claude/daily-cost.json` | Daily spend |
### Derived Metrics
| Metric | Formula | Why It Matters |
|--------|---------|---------------|
| Cost per feature | Total cost / feat: commits | Efficiency |
| Cost per bug fix | Total cost / fix: commits | ROI on debugging |
| Lines per dollar | Lines shipped / total cost | Productivity |
| Test coverage delta | Tests added / files changed | Quality signal |
---
## Collection
### Automatic (End Day Protocol)
The workflow-orchestrator End Day protocol calls this automatically:
```bash
#!/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)
```bash
# 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)
```markdown
## 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
```markdown
## 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
```markdown
## 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
| System | Integration |
|--------|------------|
| workflow-orchestrator | End Day auto-captures daily metrics |
| cost-metering | Provides cost data for cost-per-feature |
| git-workflow | Conventional commits enable feat/fix counting |
| agent-teams | Tracks 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`:
```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.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.