reflect
Analyze workflow runs and produce a daily reflection.
SKILL.mdskills/reflect/SKILL.md
GitHubReflect
You are running one phase of the reflect pipeline. The phase is specified after --- below as PHASE=<fetch|analyze-run|summarize>.
Phase: fetch
Download workflow run logs and artifacts for a date range.
Environment
SINCE— start date (YYYY-MM-DD).UNTIL— end date inclusive (YYYY-MM-DD).OUTPUT_DIR— directory to write fetched data into.WORKFLOW— workflow name to filter by (optional).
Instructions
- Run
get_workflow_runswith:reposet towhilp/workingsinceset to SINCEuntil_set to UNTILoutput_dirset to OUTPUT_DIRworkflowset to WORKFLOW (if provided)
- The tool downloads logs and artifacts for each run into OUTPUT_DIR.
- Verify the manifest file exists at
OUTPUT_DIR/manifest.json. - Write
OUTPUT_DIR/fetch-donecontaining the number of runs fetched.
Output
OUTPUT_DIR/manifest.json— JSON array of run metadata with log/artifact paths.OUTPUT_DIR/<run-id>/log.txt— full log for each run.OUTPUT_DIR/<run-id>/artifacts/— downloaded artifacts for each run.OUTPUT_DIR/fetch-done— completion marker.
Phase: analyze-run
Analyze a single workflow run. You are sandboxed with no network access.
Environment
RUN_DIR— directory containing this run's log and artifacts.RUN_META— JSON string with run metadata (from manifest).OUTPUT_FILE— path to write the analysis.
Instructions
- Parse RUN_META to get run metadata (workflowName, conclusion, displayTitle, etc.).
- Analyze
RUN_DIR/log.txtefficiently — do not read the full log. Logs are large (~100KB). Use targeted commands:grep -n "==>" RUN_DIR/log.txt— phase transitions and timinggrep -n "done in\|verdict\|failed\|error\|exit" RUN_DIR/log.txt— outcomes and errorsgrep -n "no_issues\|pr_limit\|issue.json" RUN_DIR/log.txt— pick resultshead -30 RUN_DIR/log.txtandtail -30 RUN_DIR/log.txt— run boundaries- Use
readwithoffsetandlimitto inspect specific line ranges when needed.
- Check
RUN_DIR/artifacts/for structured data (these are small, safe to read fully):*/pick/issue.json— which issue was picked*/pick/reasoning.md— why it was picked*/plan/plan.md— what was planned*/do/do.md— what was done*/check/actions.json— verdict and actions*/do/feedback.md— if needs-fixes, what feedback*/act.json— final outcome**/session*.db— session databases (note their presence/size)
- Write a concise analysis to OUTPUT_FILE.
Output
Write OUTPUT_FILE in this format:
## <workflowName>: <displayTitle> (<conclusion>)
- **run**: <databaseId> | **event**: <event> | **branch**: <headBranch>
- **started**: <startedAt> | **conclusion**: <conclusion>
### Summary
1-3 sentence summary of what happened in this run.
### Issue
If a work run: issue number, title, verdict, PR link (if any).
### Failures
If failed: root cause, relevant log lines (keep brief).
### Notes
Anything notable: retries, feedback loops, unusual patterns.
Keep it concise — under 80 lines. Focus on what matters for the daily summary.
Phase: summarize
Combine per-run analyses into a final reflection. You are sandboxed with no network access.
Environment
ANALYSIS_DIR— directory containing per-run analysis files.DATE— date string (YYYY-MM-DD).OUTPUT_FILE— path to write the reflection.
Instructions
- Read all
*.mdfiles in ANALYSIS_DIR. - Synthesize across all runs:
- success rate: how many runs passed vs failed vs cancelled, by workflow.
- failure patterns: common failure modes grouped by root cause.
- work loop outcomes: issues attempted, verdicts, PRs created.
- patterns: trends, flakiness, duration observations.
- recommendations: concrete, actionable improvements — each specific enough to become an issue.
- Write OUTPUT_FILE.
Output
Write OUTPUT_FILE in this format:
# Reflection: YYYY-MM-DD
## Summary
Brief overview of the day.
## Runs
| workflow | total | pass | fail | cancel |
|---|---|---|---|---|
## Failure Analysis
Group failures by root cause. Include brief log excerpts where helpful.
## Work Loop Outcomes
Issues attempted, verdicts, PRs created.
## Patterns
Trends, flakiness, duration.
## Recommendations
Concrete improvements. Each should be specific enough to become an issue.