GuideOpen

Skill Automation Quickstart

This GitHub-facing maintainer guide describes the two repository automation pipelines that were previously documented in the main README. It is not part of the beginner trading workflow or the documentation-site navigation.

Skill Automation Quickstart

This GitHub-facing maintainer guide describes the two repository automation pipelines that were previously documented in the main README. It is not part of the beginner trading workflow or the documentation-site navigation.

Run every command below from the repository root. For environment setup, drift gates, recovery procedures, and scheduled-job troubleshooting, use the [maintenance runbook](maintenance-runbook.md).

Safety and side effects

--dry-run suppresses branch and PR creation, but it is not a read-only filesystem mode. The current implementations have these boundaries:

ModeReadsLocal writesClaude CLIGit / GitHub writes
Self-improvement dry-runSkills, repository metadata, existing stateLock and log files, auto-review artifacts, daily summary, .skill_improvement_state.jsonNoneNone
Self-improvement normalSkills, repository metadata, existing stateReview artifacts, logs, summaries, state, and possibly the selected skillReviews the selected skill on every normal run when Claude CLI is available; edits it only when the auto score is below thresholdRuns git pull --ff-only; may create a branch, commit, push, and PR; deletes local automation branches whose PR is merged or closed
Generation daily dry-runExisting idea backlogLock and log files, daily summary, .skill_generation_state.jsonNoneNone; backlog status is not changed
Generation weekly dry-runAllowlisted session logs under ~/.claude/projects/raw_candidates.yaml, lock and log files, weekly summary, .skill_generation_state.jsonNoneNone; backlog is not updated
Generation weekly normalAllowlisted session logs and existing backlogRaw candidates, backlog, logs, summary, and stateSession-derived signals and length-limited user-message samples may be sent to the abstraction prompt. The resulting candidate descriptions are then sent to the scoring prompt; raw session-log files are not sent directly.None
Generation daily normalExisting idea backlog and repository filesskills/<name>/, generated EN/JA skill docs and indexes/catalogs, pyproject.toml when needed, reports, backlog, logs, summary, and stateDesigns and reviews a selected skillRuns git pull --ff-only; may delete a same-name stale local branch, then create a branch, commit, push, and PR; deletes local automation branches whose PR is merged or closed

This table describes the Python orchestrators when invoked directly. The self-improvement launchd wrapper manages a dedicated checkout and runs fetch, checkout -B main origin/main, reset --hard origin/main, and clean -fd; see [The improvement loop runs in its own checkout](maintenance-runbook.md#the-improvement-loop-runs-in-its-own-checkout) before enabling it.

Generation daily normal does not create or update skill-packages/<name>.skill. Package the skill separately after review:

python3 scripts/package_skills.py --skill <name>

Review the inputs before a normal weekly mining run. Although its source files are local, its abstraction and scoring stages are not local-only when they invoke claude -p.

Skill Self-Improvement Loop

This section is contributor-oriented. New users can skip it and start with the Core + Satellite path in the README.

An automated pipeline continuously reviews and improves skill quality. A daily launchd job picks one skill, scores it with the dual-axis reviewer, and, if the score is below 90/100, invokes claude -p to apply improvements and open a PR.

How It Works

  1. Round-robin selection — cycles through all skills (excluding the reviewer itself), persisted in logs/.skill_improvement_state.json.
  2. Auto scoring — runs run_dual_axis_review.py to get a deterministic score (0-100).
  3. Improvement gate — if auto_review.score < 90, Claude CLI applies fixes to SKILL.md and references.
  4. Quality gate — re-scores after improvement (with tests enabled); rolls back if the score did not improve.
  5. PR creation — commits changes to a feature branch and opens a GitHub PR for human review.
  6. Daily summary — writes results to reports/skill-improvement-log/YYYY-MM-DD_summary.md.

Manual Execution

# Dry-run: score one skill without applying improvements or creating PRs
python3 scripts/run_skill_improvement_loop.py --dry-run

# Full run: score, improve if needed, and open PR
python3 scripts/run_skill_improvement_loop.py

The previous README also showed the following command:

python3 scripts/run_skill_improvement_loop.py --dry-run --all

The current orchestration CLI does not accept --all. To review all skills without applying improvements, run the reviewer directly:

uv run skills/dual-axis-skill-reviewer/scripts/run_dual_axis_review.py \
  --project-root . --all --output-dir reports/

launchd Setup (macOS)

The loop runs daily at 05:00 local time via macOS launchd:

# Render all four maintenance agents (no activation)
python3 scripts/install_launchd.py
# Activate explicitly
python3 scripts/install_launchd.py --load

# Verify
launchctl list | grep skill-improvement

# Manual trigger
launchctl start com.trade-analysis.skill-improvement

This installs the independent 08:00 heartbeat watchdog as well. It defaults to macOS notifications when daily success is over 48 hours old (weekly generation: 14 days), missing, invalid or future-dated. Set SKILL_LOOP_NOTIFY=off in the private installed watchdog plist to opt out. The watchdog does not source .envrc. For existing installations, unload the exact maintenance services before --load; customized plists are preserved and require a manual backup/move before replacement. See the [installation and update procedure](maintenance-runbook.md#5-scheduled-self-maintenance-jobs). Checking out this code does not install jobs or demonstrate a healthy scheduled run.

Key Files

FilePurpose
scripts/run_skill_improvement_loop.pyOrchestration script (selection, scoring, improvement, PR)
scripts/run_skill_improvement.shThin shell wrapper for launchd
launchd/com.trade-analysis.skill-improvement.plistmacOS launchd agent configuration
skills/dual-axis-skill-reviewer/Reviewer skill (scoring engine)
logs/.skill_improvement_state.jsonRound-robin state and history
reports/skill-improvement-log/Daily summary reports

Skill Auto-Generation Pipeline

This section is contributor-oriented. It describes repository maintenance automation, not a required trading workflow.

An automated pipeline mines session logs for skill ideas (weekly) and designs, reviews, and creates new skills as PRs (daily). It works alongside the Self-Improvement Loop to continuously expand the skill catalog.

How It Works

  1. Weekly mining — scans Claude Code session logs for recurring patterns that could become skills, then scores each idea for novelty, feasibility, and trading value.
  2. Backlog scoring — stores ranked ideas in logs/.skill_generation_backlog.yaml with status tracking (pending, in_progress, completed, design_failed, review_failed, pr_failed).
  3. Daily selection — picks the highest-scoring pending idea; retries design_failed / pr_failed once (review_failed is terminal).
  4. Design & review — the Skill Designer builds a complete skill (SKILL.md, references, scripts), then the Dual-Axis Reviewer scores it. If the score is too low, the idea is marked review_failed.
  5. PR creation — commits the new skill to a feature branch and opens a GitHub PR for human review.

Manual Execution

Use the wrapper, which runs in a separate generation clone and preserves a dirty primary checkout. It does not source primary .envrc; inherit the correct GitHub/SSH credentials and optional notification settings from the operator or private LaunchAgent environment. It refuses --project-root overrides. See [generation isolation](maintenance-runbook.md#the-generation-pipeline-runs-in-its-own-checkout) for lock, shared-state and non-destructive recovery details. A dry run may fetch and write local output/state; it is not filesystem-read-only.

# Weekly: mine ideas from session logs and score them
bash scripts/run_skill_generation.sh --mode weekly --dry-run

# Daily: design a skill from the highest-scoring backlog idea
bash scripts/run_skill_generation.sh --mode daily --dry-run

# Full daily run (creates branch, designs skill, opens PR)
bash scripts/run_skill_generation.sh --mode daily

launchd Setup (macOS)

Two launchd agents handle the weekly and daily schedules:

# Render all four maintenance agents (no activation)
python3 scripts/install_launchd.py
# Activate explicitly
python3 scripts/install_launchd.py --load

# Verify
launchctl list | grep skill-generation

# Manual trigger
launchctl start com.trade-analysis.skill-generation-weekly
launchctl start com.trade-analysis.skill-generation-daily

Key Files

FilePurpose
scripts/run_skill_generation_pipeline.pyOrchestration script (mining, selection, design, review, PR)
scripts/run_skill_generation.shIsolated launchd/manual entry point
scripts/run_skill_generation_isolated.pyDedicated clone validation, sync and resource locks
launchd/com.trade-analysis.skill-generation-weekly.plistWeekly mining schedule (Saturday 06:00)
launchd/com.trade-analysis.skill-generation-daily.plistDaily generation schedule (07:00)
skills/skill-idea-miner/Mining and scoring skill
skills/skill-designer/Skill design prompt builder
logs/.skill_generation_backlog.yamlScored idea backlog with status tracking
logs/.skill_generation_state.jsonRun history and state
reports/skill-generation-log/Daily generation summary reports

Source: https://github.com/tradermonty/claude-trading-skills/blob/main/docs/dev/skill-automation.md

Author: tradermonty, Trading skills. License: MIT.

Shown here with formatting for the web. Keep the author and license notice when you reuse it.

Related entries

There are more like this in the members library

The Claude Code library holds 13,843 entries. Members can search all of them by meaning and read every one in full.