By Joel Dare - Updated August 22, 2026 - Written August 14, 2026
This is a minimal 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 skills directory and you can invoke it through Claude Code manually at any time.
Example SKILL.md:
---
name: triage-github
description: Comment on new GitHub issues that don't have a comment yet.
---
Read new issues from the GitHub API. If a comment doesn't already exist, add a new comment that says "Hello world."
check.sh ScriptEach skill will have a check.sh script. This is a non-AI, mechanical check. It typically costs an API call (Jira, Trello, Shortcut, GitHub, etc.) but doesn’t burn any AI tokens.
Mine are usually shell scripts but any language will work, just modify the extension to match (or drop it altogether).
Add the check script to your skill’s scripts directory. Personal skills live in ~/.claude/skills and project skills in .claude/skills under the project directory. Claude Code will ignore the script but we’ll use it in a cron when we’re polling for work.
If there is no work to do, it exits early. Otherwise, it passes the results to claude -p. You can also substitute other harnesses here by using the codex or copilot commands instead of claude.
Here’s a simple example that uses the gh CLI to query for open issues on GitHub.
#!/bin/sh
# ~/.claude/skills/triage-github/scripts/check.sh
# Finds issues that need handling and runs the skill on them.
# Exits quietly when there's no work.
set -eu
REPO="your-org/some-repo"
work=$(gh issue list \
--repo "$REPO" \
--search "is:open label:needs-triage -label:triaged" \
--limit 20 \
--json number \
--jq '.[].number') # 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.
By polling, running the script every few minutes, it doesn’t require a server and can be run from anywhere.
I run this in a cron. It polls the API for a list of new things to act on and then runs the skill to act on anything that’s returned.
I find a simple crontab easier to see than other forms of automated scripting. For example, I find it much easier to find the list of crons than to find things sitting in launchd on macOS. crontab -l is mostly muscle memory.
Here’s what the cron line might look like:
# Poll every 15 minutes. cd first: check.sh reads ./env.sh relative to
# the repo root, so cron's default $HOME working directory won't do.
*/15 * * * * cd /path/to/repo && ./.claude/skills/your-skill/scripts/check.sh >> "$HOME/.dark/logs/your-skill.log" 2>&1
JoelDare.com © Dare Companies Dotcom LLC
(formrobin.com)