By Joel Dare - Written August 14, 2026
This is a mimimal way to automate a Claude Skill without making the expensive AI request when there is no work to be done.
It does two things:
The skill is not unique, it’s just a skill. You place it in your ~/claude/skills directory and you can invoke it through Claude Code manually at any time.
Example SKILL.md:
Read new issues from the GitHub API. If a comment doesn't already exist, add a new comment that says "Hello world."
Each skill will have a check script. Run it by hand a few times to make sure it works for you.
check does not have an extension because it might be a shell script, a node script, or anything else.
Add the check script to your skill directory. Claude Code will ignore the file. But we’ll use it in a cron when we are polling for work.
It returns nothing if there is no work to do. It returns a list of id’s, email addresses, stories, or whatever else that the skill acts on if there is work to do.
#!/bin/sh
# ~/.claude/skills/triage-github/check.sh
# Prints issue numbers that need handling, one per line. Prints nothing when there's no work.
set -eu
REPO="your-org/some-repo"
gh issue list \
--repo "$REPO" \
--search "is:open label:needs-triage -label:triaged" \
--limit 20 \
--json number \
--jq '.[].number'
tick.sh ScriptThis script runs a check to see if action is needed. It returns nothing if there is no work to do. Otherwise it returns a list of things to act on.
The tick script is extremly simple. This is the meat of the solution. Install it only once and run it through your crontab. It will run check for each skill and then run claud -p only if there is a response to act on.
#!/bin/sh
# ~/.claude/skills/triage-github/tick.sh
work=$(~/.claude/skills/triage-github/check) # cheap: one API call, no AI
[ -n "$work" ] || exit 0 # nothing to do → stop here
claude -p "Use the triage-github skill on these items: $work"
The most efficient way to do this is probably via a webhook, whenever one is supported, but that adds the complexity of running a public server that can listen for those requests.
This method does not require a server so you can run it on your everyday work machine.
You can run this in a cron. It polls an API for new things to act on.
I find a simple crontab easier to see than other forms of automated scripting. For example, it’s much easier for me to find than things sitting in launchd on macOS.
JoelDare.com © Dare Companies Dotcom LLC
(formrobin.com)