Skip to main content

Automated Workflows

Stop running audits after the damage is done. Loop skills in the background while you code — catching problems within minutes instead of after hundreds of lines. Or schedule them to run overnight, so your codebase gets better while you sleep.

How it works: The /loop command runs any prompt or slash command on a timer. Pair it with a skill from the catalog to create a hands-free automation loop.

Quick start

1. Install a skill

npx @skills-hub-ai/cli install ux

2. Loop it

/loop 30m /ux

That's it. Claude will run a UX audit every 30 minutes while you code, flagging regressions as you introduce them.

Syntax

/loop [interval] <prompt or /skill>

Intervals: Ns, Nm, Nh, Nd
  5m   = every 5 minutes
  30m  = every 30 minutes
  1h   = every hour
  1d   = every day

If no interval is given, defaults to 10m.

Workflow recipes

Proven patterns. Install the skill, start the loop, forget about it.

Continuous quality guard

UX and accessibility audits every 30 minutes. Catches regressions the moment you introduce them — not in a painful batch at the end of the sprint.

/loop 30m /ux

Deploy watchdog

Validates CI/CD config, Docker setup, and environment variables while you prepare for launch. Finds the missing env var before production does.

/loop 10m /devops

Autonomous build loop

Build, test, fix, ship — every 15 minutes. Claude handles the cycle autonomously. You handle the architecture decisions.

/loop 15m /ship

Growth tracking

SEO, onboarding quality, retention hooks, conversion funnels — checked every hour during a feature sprint. Ship features that actually grow the product.

/loop 1h /growth-audit

Living runbooks

Runbooks that update themselves as infrastructure changes. Your docs are never stale because they're regenerated every 2 hours.

/loop 2h /runbook

Security sweep

Hourly security audits during active development. Surface vulnerabilities while the code is fresh in your mind — not 3 months later in a penetration test.

/loop 1h /audit

The pattern

The key insight: instead of running quality skills after you finish work, loop them while you work. Problems surface in near-real-time, which means:

  • Smaller fixes— catch issues within minutes, not after hundreds of lines
  • Less rework— no more “go back and fix everything” sessions
  • Higher quality— continuous checks enforce standards that slip under deadline pressure
  • Hands-free— set it up once and focus on building

Stack multiple loops

You can run multiple loops at different intervals in the same session. Build a full quality pipeline that runs while you code:

/loop 15m /ship          # build-test-fix cycle
/loop 30m /ux            # UX + a11y audit
/loop 1h  /audit         # security sweep
/loop 2h  /growth-audit  # growth metrics check

Each loop runs independently. Frequent checks (build, UX) run on shorter intervals, while deeper analyses (security, growth) run less often.

Custom prompts

/loop works with any prompt, not just installed skills. Combine natural language with specific checks:

/loop 5m check if the deploy finished and report status
/loop 10m run the tests and fix any failures
/loop 30m review the last 3 commits for code quality issues

Scheduled tasks (headless automation)

Claude Code supports scheduled tasks that run on a cron-like schedule without keeping a terminal open. Unlike /loop(which runs inside an active session), scheduled tasks run headlessly in the background — perfect for overnight pipelines, daily maintenance, and recurring workflows that should run even when you're away.

When to use which: /loop is best for real-time feedback while you're actively coding. Scheduled tasks are best for recurring maintenance that should run on a fixed schedule regardless of whether you're at your desk.

Creating a scheduled task

Use claude task:create from the CLI to set up a recurring task with a cron expression:

# Run a security audit every day at 8am
claude task:create --schedule "0 8 * * *" \
  --prompt "run /audit and commit fixes if any are found"

# Run UX checks every weekday at noon
claude task:create --schedule "0 12 * * 1-5" \
  --prompt "run /ux and open a PR if issues are found"

# Nightly dependency update check
claude task:create --schedule "0 2 * * *" \
  --prompt "check for outdated dependencies, update patch versions, run tests, and commit if green"

Pairing with combo skills

Scheduled tasks become especially powerful when combined with compositions. Install a combo skill, then schedule it to run your entire quality pipeline automatically:

# Install a quality pipeline combo
npx @skills-hub-ai/cli install quality-pipeline

# Schedule it to run every morning before standup
claude task:create --schedule "0 9 * * 1-5" \
  --prompt "run /quality-pipeline on the whole repo and summarize findings"

# Or pair individual skills into a nightly sweep
claude task:create --schedule "0 3 * * *" \
  --prompt "run /security-audit then /perf-audit then /tech-debt, commit any auto-fixes"

Managing tasks

claude task:list                 # view all scheduled tasks
claude task:status <id>          # check last run status
claude task:delete <id>          # remove a scheduled task
claude task:logs <id>            # view run history and output

Scheduled tasks run in your project directory with full access to your codebase and installed skills. They can read files, run commands, make commits, and open PRs — just like an interactive Claude session.

Next steps