/aggregate-logs
Generate LEARNINGS.md from skill execution logs.
$ npx -y skills add athola/claude-night-market --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/aggregate-logs
Context preview
What this command does when you run it.
Generate LEARNINGS.md from skill execution logs.
Command definition
aggregate-logs.mdAggregate Skill Execution Logs
Generate LEARNINGS.md from skill execution logs.
Usage
/abstract:aggregate-logs # Last 30 days (default)
/abstract:aggregate-logs --days 7 # Last 7 days
/abstract:aggregate-logs --days 90 # Last 90 days
Purpose
Part of Issue #69 Phase 3, this command processes skill execution logs to generate actionable insights for skill improvement.
What It Does
1. **Loads logs** from `~/.claude/skills/logs/<plugin>/<skill>/` 2. **Calculates metrics** for each skill:
- Execution count, success rate
- Average/max duration
- Average user rating (from evaluations)
- Common friction points
- Improvement suggestions
3. **Detects patterns**:
- High failure rates (>30%)
- Slow execution (>10s average)
- Low ratings (<3.5/5.0)
4. **Generates LEARNINGS.md** at `~/.claude/skills/LEARNINGS.md`
Output Format
LEARNINGS.md Structure
# Skill Performance Learnings
**Last Updated**: 2026-01-08 04:30:00 UTC
**Analysis Period**: Last 30 days
**Skills Analyzed**: 15
**Total Executions**: 342
## High-Impact Issues
### imbue:proof-of-work
**Type**: high_failure_rate
**Severity**: high
**Metric**: 42.3% success rate
**Detail**: 11/26 failures
**Recent Errors**:
- ValidationError: Missing acceptance_criteria field
- FileNotFoundError: PROOF.md not found
- KeyError: 'evidence' in evaluation
## Slow Execution
| Skill | Avg Duration | Max Duration | Executions |
|-------|--------------|--------------|------------|
| `sanctum:pr-agent` | 45.2s | 120.5s | 18 |
| `pensive:code-reviewer` | 32.1s | 89.3s | 24 |
## Low User Ratings
### abstract:skill-auditor - 2.8/5.0
**Common Friction**:
- Too verbose output
- Missing examples for modular skills
- Unclear token optimization guidance
**Improvement Suggestions**:
- Add --quiet flag
- Include example audits
- Link to token optimization docs
## Skill Performance Summary
| Skill | Executions | Success Rate | Avg Duration | Rating |
|-------|------------|--------------|--------------|--------|
| `imbue:proof-of-work` | 26 | 42.3% | 2.1s | 3.2/5.0 |
| `sanctum:pr-agent` | 18 | 94.4% | 45.2s | 4.5/5.0 |
Examples
Weekly Rollup
# Run every Monday morning
/abstract:aggregate-logs --days 7
# Output:
# Aggregating logs from last 7 days...
#
# ✅ LEARNINGS.md generated: ~/.claude/skills/LEARNINGS.md
#
# Summary:
# Skills Analyzed: 8
# Total Executions: 47
# High-Impact Issues: 2
# Slow Skills: 1
# Low-Rated Skills: 1
Full History Analysis
/abstract:aggregate-logs --days 90
# Analyzes last 3 months of data
Integration
**Phase 2** (Evaluation):
- Reads `qualitative_evaluation` field from logs
- Calculates average ratings
- Aggregates friction points and suggestions
**Phase 4** (/fix-workflow):
- `/fix-workflow` reads LEARNINGS.md
- Surfaces known issues before manual analysis
- Prioritizes improvements by frequency × impact
**Phase 5** (/improve-skills):
- Uses LEARNINGS.md to identify improvement opportunities
- Prioritizes by severity (high-impact issues first)
- Tracks improvements over time (version comparison)
**Phase 6a** (Collective Intelligence):
- After LEARNINGS.md is generated, posts a summary to the target repo's Discussions
- Target repo is detected at runtime: a `target_repo` override in `~/.claude/skills/discussions/config.json`, otherwise the current repo from `gh repo view`
- Check opt-out: reads `~/.claude/skills/discussions/config.json`
- If `auto_post_learnings` is `true` (default), runs `post_learnings_to_discussions.py`
- Reports: "Posted learning summary to Discussions: {url}"
- Skips silently if `gh` is not authenticated or network is unavailable
Automation
Cron Job (Optional)
# Add to crontab for weekly rollup
0 9 * * MON cd /path/to/claude-night-market && ./plugins/abstract/scripts/aggregate_skill_logs.py 7
Manual Workflow
# After evaluating several skills:
/abstract:evaluate-skill proof-of-work
/abstract:evaluate-skill code-reviewer
/abstract:aggregate-logs
# Review LEARNINGS.md
cat ~/.claude/skills/LEARNINGS.md
# Act on insights
/abstract:improve-skills # Phase 5
Metrics Thresholds
| Metric | Warning | Critical | |--------|---------|----------| | Success Rate | <80% | <70% | | Avg Duration | >5s | >10s | | User Rating | <4.0 | <3.5 | | Failure Count | >5 | >10 |
Performance
- **Runtime**: ~1-2s for 30 days of data (hundreds of executions)
- **Memory**: Loads one skill's logs at a time (streaming)
- **Disk**: LEARNINGS.md typically <50KB
Related
- `/abstract:evaluate-skill` - Capture qualitative feedback (Phase 2)
- `/abstract:improve-skills` - Act on insights (Phase 5)
- `/abstract:promote-discussions` - Promote highly-voted learnings to Issues (Phase 6c)
- `Skill(abstract:skill-execution-logger)` - Raw data capture (Phase 1)
Version
1.1.0 (Phase 6a integration)
Read more
Aggregate Skill Execution Logs
Generate LEARNINGS.md from skill execution logs.
Usage
/abstract:aggregate-logs # Last 30 days (default) /abstract:aggregate-logs --days 7 # Last 7 days /abstract:aggregate-logs --days 90 # Last 90 days
Purpose
Part of Issue #69 Phase 3, this command processes skill execution logs to generate actionable insights for skill improvement.
What It Does
1. **Loads logs** from `~/.claude/skills/logs/<plugin>/<skill>/` 2. **Calculates metrics** for each skill:
- Execution count, success rate
- Average/max duration
- Average user rating (from evaluations)
- Common friction points
- Improvement suggestions
3. **Detects patterns**:
- High failure rates (>30%)
- Slow execution (>10s average)
- Low ratings (<3.5/5.0)
4. **Generates LEARNINGS.md** at `~/.claude/skills/LEARNINGS.md`
Output Format
LEARNINGS.md Structure
# Skill Performance Learnings **Last Updated**: 2026-01-08 04:30:00 UTC **Analysis Period**: Last 30 days **Skills Analyzed**: 15 **Total Executions**: 342 ## High-Impact Issues ### imbue:proof-of-work **Type**: high_failure_rate **Severity**: high **Metric**: 42.3% success rate **Detail**: 11/26 failures **Recent Errors**: - ValidationError: Missing acceptance_criteria field - FileNotFoundError: PROOF.md not found - KeyError: 'evidence' in evaluation ## Slow Execution | Skill | Avg Duration | Max Duration | Executions | |-------|--------------|--------------|------------| | `sanctum:pr-agent` | 45.2s | 120.5s | 18 | | `pensive:code-reviewer` | 32.1s | 89.3s | 24 | ## Low User Ratings ### abstract:skill-auditor - 2.8/5.0 **Common Friction**: - Too verbose output - Missing examples for modular skills - Unclear token optimization guidance **Improvement Suggestions**: - Add --quiet flag - Include example audits - Link to token optimization docs ## Skill Performance Summary | Skill | Executions | Success Rate | Avg Duration | Rating | |-------|------------|--------------|--------------|--------| | `imbue:proof-of-work` | 26 | 42.3% | 2.1s | 3.2/5.0 | | `sanctum:pr-agent` | 18 | 94.4% | 45.2s | 4.5/5.0 |
Examples
Weekly Rollup
# Run every Monday morning /abstract:aggregate-logs --days 7 # Output: # Aggregating logs from last 7 days... # # ✅ LEARNINGS.md generated: ~/.claude/skills/LEARNINGS.md # # Summary: # Skills Analyzed: 8 # Total Executions: 47 # High-Impact Issues: 2 # Slow Skills: 1 # Low-Rated Skills: 1
Full History Analysis
/abstract:aggregate-logs --days 90 # Analyzes last 3 months of data
Integration
**Phase 2** (Evaluation):
- Reads `qualitative_evaluation` field from logs
- Calculates average ratings
- Aggregates friction points and suggestions
**Phase 4** (/fix-workflow):
- `/fix-workflow` reads LEARNINGS.md
- Surfaces known issues before manual analysis
- Prioritizes improvements by frequency × impact
**Phase 5** (/improve-skills):
- Uses LEARNINGS.md to identify improvement opportunities
- Prioritizes by severity (high-impact issues first)
- Tracks improvements over time (version comparison)
**Phase 6a** (Collective Intelligence):
- After LEARNINGS.md is generated, posts a summary to the target repo's Discussions
- Target repo is detected at runtime: a `target_repo` override in `~/.claude/skills/discussions/config.json`, otherwise the current repo from `gh repo view`
- Check opt-out: reads `~/.claude/skills/discussions/config.json`
- If `auto_post_learnings` is `true` (default), runs `post_learnings_to_discussions.py`
- Reports: "Posted learning summary to Discussions: {url}"
- Skips silently if `gh` is not authenticated or network is unavailable
Automation
Cron Job (Optional)
# Add to crontab for weekly rollup 0 9 * * MON cd /path/to/claude-night-market && ./plugins/abstract/scripts/aggregate_skill_logs.py 7
Manual Workflow
# After evaluating several skills: /abstract:evaluate-skill proof-of-work /abstract:evaluate-skill code-reviewer /abstract:aggregate-logs # Review LEARNINGS.md cat ~/.claude/skills/LEARNINGS.md # Act on insights /abstract:improve-skills # Phase 5
Metrics Thresholds
| Metric | Warning | Critical | |--------|---------|----------| | Success Rate | <80% | <70% | | Avg Duration | >5s | >10s | | User Rating | <4.0 | <3.5 | | Failure Count | >5 | >10 |
Performance
- **Runtime**: ~1-2s for 30 days of data (hundreds of executions)
- **Memory**: Loads one skill's logs at a time (streaming)
- **Disk**: LEARNINGS.md typically <50KB
Related
- `/abstract:evaluate-skill` - Capture qualitative feedback (Phase 2)
- `/abstract:improve-skills` - Act on insights (Phase 5)
- `/abstract:promote-discussions` - Promote highly-voted learnings to Issues (Phase 6c)
- `Skill(abstract:skill-execution-logger)` - Raw data capture (Phase 1)
Version
1.1.0 (Phase 6a integration)
A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.
Other commands on claude-night-market.
- /analyze-skill
Analyze skill file complexity metrics and generate modularization recommendations for splitting or progressive loading.
Open command - /bulletproof-skill
Harden skills against rationalization and bypass behaviors
Open command - /context-report
Generate context optimization report for skill directories
Open command - /create-command
Create slash commands with brainstorming and best practices
Open command - /create-hook
Create hooks with brainstorming and security-first design
Open command - /create-skill
Scaffold new Claude Code skills with brainstorming, TDD methodology, and proper frontmatter and module structure.
Open command

