app-runner
Skill1 starsChanged 13 months agoApache-2.0View on GitHub
Manages application lifecycle and health checks. Use when app isn't running but needs to be (testing, debugging, development). Stores project-specific startup config, handles multi-service apps, performs health checks. INVOKE when webapp-testing or other skills detect app is not accessible.
In this repository23 other files it gives its agents.
- delegateSkill
- env-managerSkill
- lexical-recall-guardSkill
- narrative-inventorySkill
- narrative-keywordsSkill
- narrative-mapsSkill
- obsidian-apiSkill
- obsidianSkill
- project-indexerSkill
- skill-api-conversionSkill
- skill-creatorSkill
- skill-distillSkill
- slipbox-integrationSkill
- story-structure-22-step-apiSkill
- story-structure-22-step-distilledSkill
- story-structure-22-stepSkill
- story-structure-7-stepsSkill
- story-structure-crime-distilledSkill
- story-structure-crimeSkill
- story-structure-myth-distilledSkill
- story-structure-mythSkill
- symbol-webSkill
- webapp-testingSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Start/stop web applications and services
- Distinctive: line 30
Verify services are accessible before testing
- Distinctive: line 31
Wait for services to be ready
- Distinctive: line 36
Ask user once, remember for project
- Distinctive: line 146
Ask user: "How do you start your application?"
- Distinctive: line 148
Ask: "What URL should I check to verify it's running?"
- Distinctive: line 198
Document requirements: - If app needs database, mention in config comments
- Very specific: line 199
Health checks should be fast: - Use /health endpoints, not complex pages
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Application Runner
Manages the lifecycle of web applications and services for development and testing. Handles service startup, health checks, and project-specific configuration.
When to Use This Skill
AUTOMATICALLY invoke when:
- webapp-testing (or other skills) detects application is not accessible
- User asks to "start the app", "run the server", "start services"
- Tests fail with connection errors (connection refused, timeout, etc.)
- Health check fails when trying to access application endpoints
DO NOT use when:
- App is already running and accessible
- User just wants to know how to start the app (just read config)
Core Responsibilities
- Application Lifecycle Management
- Start/stop web applications and services
- Handle multi-service applications (frontend, backend, proxy, database, etc.)
- Manage service dependencies and startup order
- Health Checks
- Verify services are accessible before testing
- Wait for services to be ready
- Detect when services are down
- Project Configuration
- Store startup commands in
.app-runner.yml - Ask user once, remember for project
- Handle project-specific requirements
- Store startup commands in
Configuration File Format
.app-runner.yml in project root:
# Single service example
service:
command: npm run dev
health_check:
url: http://localhost:5173
timeout: 30
# Multi-service example
services:
- name: nginx-proxy
command: docker-compose up -d nginx
health_check:
url: http://localhost:3000
timeout: 10
- name: backend
command: cd src && uvicorn app:app --port 8000
health_check:
url: http://localhost:8000/health
timeout: 15
- name: frontend
command: cd web && npm run dev
health_check:
url: http://localhost:5173
timeout: 30
depends_on:
- backend
# Main entry point for testing/accessing the application
entry_point: http://localhost:3000Helper Scripts
scripts/health_check.py- Check if URL is accessiblescripts/manage_config.py- Read/write.app-runner.ymlscripts/start_services.py- Start services from config
Usage Patterns
Pattern 1: Check if App is Running
import subprocess
import json
result = subprocess.run(
['python', '~/.claude/skills/app-runner/scripts/health_check.py',
'--url', 'http://localhost:3000'],
capture_output=True,
text=True
)
info = json.loads(result.stdout)
if not info['accessible']:
# App not running - invoke app-runner skill
passPattern 2: Start Application
# app-runner skill handles this
# 1. Check for .app-runner.yml
# 2. If not found, ask user how to start app
# 3. Save config
# 4. Start services
# 5. Wait for health checks
# 6. Return control to calling skillIntegration with Other Skills
webapp-testing Integration
# In webapp-testing test script:
from pathlib import Path
import subprocess
# Check if app is accessible
health_check = subprocess.run(
['python', str(Path.home() / '.claude/skills/app-runner/scripts/health_check.py'),
'--url', os.environ['TEST_BASE_URL']],
capture_output=True,
text=True
)
if health_check.returncode != 0:
print(f"Application not accessible at {os.environ['TEST_BASE_URL']}")
print("Please invoke app-runner skill to start the application.")
sys.exit(1)
# Continue with testing...First-Run Experience
When no config exists:
- Detect
.app-runner.ymlis missing - Ask user: "How do you start your application?"
- User provides command(s)
- Ask: "What URL should I check to verify it's running?"
- Save to
.app-runner.yml - Start services
- Perform health checks
- Ready for testing
Subsequent runs:
- Read
.app-runner.yml - Start services
- Health checks
- Ready
Health Check Logic
Health checks verify a service is accessible:
def health_check(url: str, timeout: int = 30) -> bool:
"""
Check if a URL is accessible.
Retries with exponential backoff up to timeout.
Returns True if accessible, False otherwise.
"""
import requests
import time
start = time.time()
delay = 0.5
while time.time() - start < timeout:
try:
response = requests.get(url, timeout=5)
if response.status_code < 500:
return True
except requests.exceptions.RequestException:
pass
time.sleep(delay)
delay = min(delay * 1.5, 5) # Exponential backoff, max 5s
return FalseBest Practices
- Keep config in project root -
.app-runner.ymlshould be project-specific - Add to .gitignore if needed - Config might contain local paths
- Use relative paths - Makes config portable across machines
- Document requirements - If app needs database, mention in config comments
- Health checks should be fast - Use
/healthendpoints, not complex pages
Example Configurations
SvelteKit + Python Backend
services:
- name: backend
command: cd src && uvicorn app:app --reload
health_check:
url: http://localhost:8000/health
timeout: 15
- name: frontend
command: cd web && npm run dev
health_check:
url: http://localhost:5173
timeout: 30
depends_on:
- backend
entry_point: http://localhost:5173Docker Compose
service:
command: docker-compose up -d
health_check:
url: http://localhost:3000
timeout: 30
shutdown_command: docker-compose down
entry_point: http://localhost:3000Nginx Proxy + Services
services:
- name: backend
command: cd backend && python server.py
health_check:
url: http://localhost:8000
timeout: 15
- name: frontend
command: cd frontend && npm run dev
health_check:
url: http://localhost:5173
timeout: 30
- name: nginx
command: docker-compose up -d nginx
health_check:
url: http://localhost:3000
timeout: 10
depends_on:
- backend
- frontend
# Test through the nginx proxy
entry_point: http://localhost:3000Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

