fix: resolve YAML syntax errors and harden CI workflow

This commit is contained in:
sck_0
2026-02-04 09:05:11 +01:00
parent 0da99cd2c9
commit ca2551fe2b
3 changed files with 170 additions and 97 deletions

View File

@@ -68,6 +68,9 @@ jobs:
# If no changes, exit successfully # If no changes, exit successfully
git diff --quiet && exit 0 git diff --quiet && exit 0
# Pull with rebase to integrate remote changes
git pull origin main --rebase || true
git add README.md skills_index.json data/catalog.json data/bundles.json data/aliases.json CATALOG.md || true git add README.md skills_index.json data/catalog.json data/bundles.json data/aliases.json CATALOG.md || true
# If nothing to commit, exit successfully # If nothing to commit, exit successfully

View File

@@ -1,6 +1,6 @@
--- ---
name: readme name: readme
description: "When the user wants to create or update a README.md file for a project. Also use when the user says "write readme," "create readme," "document this project," "project documentation," or asks for help with README.md. This skill creates absurdly thorough documentation covering local setup, architecture, and deployment." description: "When the user wants to create or update a README.md file for a project. Also use when the user says 'write readme,' 'create readme,' 'document this project,' 'project documentation,' or asks for help with README.md. This skill creates absurdly thorough documentation covering local setup, architecture, and deployment."
source: "https://github.com/Shpigford/skills/tree/main/readme" source: "https://github.com/Shpigford/skills/tree/main/readme"
risk: safe risk: safe
--- ---
@@ -12,6 +12,7 @@ You are an expert technical writer creating comprehensive project documentation.
## When to Use This Skill ## When to Use This Skill
Use this skill when: Use this skill when:
- User wants to create or update a README.md file - User wants to create or update a README.md file
- User says "write readme" or "create readme" - User says "write readme" or "create readme"
- User asks to "document this project" - User asks to "document this project"
@@ -33,12 +34,14 @@ Use this skill when:
Before writing a single line of documentation, thoroughly explore the codebase. You MUST understand: Before writing a single line of documentation, thoroughly explore the codebase. You MUST understand:
**Project Structure** **Project Structure**
- Read the root directory structure - Read the root directory structure
- Identify the framework/language (Gemfile for Rails, package.json, go.mod, requirements.txt, etc.) - Identify the framework/language (Gemfile for Rails, package.json, go.mod, requirements.txt, etc.)
- Find the main entry point(s) - Find the main entry point(s)
- Map out the directory organization - Map out the directory organization
**Configuration Files** **Configuration Files**
- .env.example, .env.sample, or documented environment variables - .env.example, .env.sample, or documented environment variables
- Rails config files (config/database.yml, config/application.rb, config/environments/) - Rails config files (config/database.yml, config/application.rb, config/environments/)
- Credentials setup (config/credentials.yml.enc, config/master.key) - Credentials setup (config/credentials.yml.enc, config/master.key)
@@ -47,17 +50,20 @@ Before writing a single line of documentation, thoroughly explore the codebase.
- Deployment configs (config/deploy.yml for Kamal, fly.toml, render.yaml, Procfile, etc.) - Deployment configs (config/deploy.yml for Kamal, fly.toml, render.yaml, Procfile, etc.)
**Database** **Database**
- db/schema.rb or db/structure.sql - db/schema.rb or db/structure.sql
- Migrations in db/migrate/ - Migrations in db/migrate/
- Seeds in db/seeds.rb - Seeds in db/seeds.rb
- Database type from config/database.yml - Database type from config/database.yml
**Key Dependencies** **Key Dependencies**
- Gemfile and Gemfile.lock for Ruby gems - Gemfile and Gemfile.lock for Ruby gems
- package.json for JavaScript dependencies - package.json for JavaScript dependencies
- Note any native gem dependencies (pg, nokogiri, etc.) - Note any native gem dependencies (pg, nokogiri, etc.)
**Scripts and Commands** **Scripts and Commands**
- bin/ scripts (bin/dev, bin/setup, bin/ci) - bin/ scripts (bin/dev, bin/setup, bin/ci)
- Procfile or Procfile.dev - Procfile or Procfile.dev
- Rake tasks (lib/tasks/) - Rake tasks (lib/tasks/)
@@ -84,6 +90,7 @@ If no deployment config exists, provide general guidance with Docker as the reco
### Step 3: Ask Only If Critical ### Step 3: Ask Only If Critical
Only ask the user questions if you cannot determine: Only ask the user questions if you cannot determine:
- What the project does (if not obvious from code) - What the project does (if not obvious from code)
- Specific deployment credentials or URLs needed - Specific deployment credentials or URLs needed
- Business context that affects documentation - Business context that affects documentation
@@ -179,7 +186,7 @@ cp .env.example .env
Configure the following variables: Configure the following variables:
| Variable | Description | Example | | Variable | Description | Example |
|----------|-------------|---------| | ------------------ | ---------------------------- | ------------------------------------------ |
| `DATABASE_URL` | PostgreSQL connection string | `postgresql://localhost/myapp_development` | | `DATABASE_URL` | PostgreSQL connection string | `postgresql://localhost/myapp_development` |
| `REDIS_URL` | Redis connection (if used) | `redis://localhost:6379/0` | | `REDIS_URL` | Redis connection (if used) | `redis://localhost:6379/0` |
| `SECRET_KEY_BASE` | Rails secret key | `bin/rails secret` | | `SECRET_KEY_BASE` | Rails secret key | `bin/rails secret` |
@@ -218,10 +225,13 @@ bin/dev
Or manually: Or manually:
\`\`\`bash \`\`\`bash
# Terminal 1: Rails server # Terminal 1: Rails server
bin/rails server bin/rails server
# Terminal 2: Vite dev server (for Inertia/React) # Terminal 2: Vite dev server (for Inertia/React)
bin/vite dev bin/vite dev
\`\`\` \`\`\`
@@ -287,21 +297,25 @@ User Action → React Component → Inertia Visit → Rails Controller → Activ
### Key Components ### Key Components
**Authentication** **Authentication**
- Devise/Rodauth for user authentication - Devise/Rodauth for user authentication
- Session-based auth with encrypted cookies - Session-based auth with encrypted cookies
- `authenticate_user!` before_action for protected routes - `authenticate_user!` before_action for protected routes
**Inertia.js Integration (`app/frontend/`)** **Inertia.js Integration (`app/frontend/`)**
- React components receive props from Rails controllers - React components receive props from Rails controllers
- `inertia_render` in controllers passes data to frontend - `inertia_render` in controllers passes data to frontend
- Shared data via `inertia_share` for layout props - Shared data via `inertia_share` for layout props
**Background Jobs (`app/jobs/`)** **Background Jobs (`app/jobs/`)**
- Solid Queue for job processing - Solid Queue for job processing
- Jobs stored in PostgreSQL (no Redis required) - Jobs stored in PostgreSQL (no Redis required)
- Dashboard at `/jobs` for monitoring - Dashboard at `/jobs` for monitoring
**Database (`app/models/`)** **Database (`app/models/`)**
- ActiveRecord models with associations - ActiveRecord models with associations
- Query objects for complex queries - Query objects for complex queries
- Concerns for shared model behavior - Concerns for shared model behavior
@@ -346,7 +360,7 @@ Complete reference for all env vars:
### Required ### Required
| Variable | Description | How to Get | | Variable | Description | How to Get |
|----------|-------------|------------| | ------------------ | --------------------------------- | -------------------------------------- |
| `DATABASE_URL` | PostgreSQL connection string | Your database provider | | `DATABASE_URL` | PostgreSQL connection string | Your database provider |
| `SECRET_KEY_BASE` | Rails secret for sessions/cookies | Run `bin/rails secret` | | `SECRET_KEY_BASE` | Rails secret for sessions/cookies | Run `bin/rails secret` |
| `RAILS_MASTER_KEY` | Decrypts credentials file | Check `config/master.key` (not in git) | | `RAILS_MASTER_KEY` | Decrypts credentials file | Check `config/master.key` (not in git) |
@@ -354,7 +368,7 @@ Complete reference for all env vars:
### Optional ### Optional
| Variable | Description | Default | | Variable | Description | Default |
|----------|-------------|---------| | ------------------- | ------------------------------------------------- | ---------------------------- |
| `REDIS_URL` | Redis connection string (for caching/ActionCable) | - | | `REDIS_URL` | Redis connection string (for caching/ActionCable) | - |
| `RAILS_LOG_LEVEL` | Logging verbosity | `debug` (dev), `info` (prod) | | `RAILS_LOG_LEVEL` | Logging verbosity | `debug` (dev), `info` (prod) |
| `RAILS_MAX_THREADS` | Puma thread count | `5` | | `RAILS_MAX_THREADS` | Puma thread count | `5` |
@@ -367,10 +381,13 @@ Complete reference for all env vars:
Sensitive values should be stored in Rails encrypted credentials: Sensitive values should be stored in Rails encrypted credentials:
\`\`\`bash \`\`\`bash
# Edit credentials (opens in $EDITOR) # Edit credentials (opens in $EDITOR)
bin/rails credentials:edit bin/rails credentials:edit
# Or for environment-specific credentials # Or for environment-specific credentials
RAILS_ENV=production bin/rails credentials:edit RAILS_ENV=production bin/rails credentials:edit
\`\`\` \`\`\`
@@ -409,7 +426,7 @@ RAILS_SERVE_STATIC_FILES=true
## Available Scripts ## Available Scripts
| Command | Description | | Command | Description |
|---------|-------------| | ----------------------------- | --------------------------------------------------- |
| `bin/dev` | Start development server (Rails + Vite via Foreman) | | `bin/dev` | Start development server (Rails + Vite via Foreman) |
| `bin/rails server` | Start Rails server only | | `bin/rails server` | Start Rails server only |
| `bin/vite dev` | Start Vite dev server only | | `bin/vite dev` | Start Vite dev server only |
@@ -434,24 +451,31 @@ RAILS_SERVE_STATIC_FILES=true
### Running Tests ### Running Tests
\`\`\`bash \`\`\`bash
# Run all tests (Minitest) # Run all tests (Minitest)
bin/rails test bin/rails test
# Run all tests (RSpec, if used) # Run all tests (RSpec, if used)
bundle exec rspec bundle exec rspec
# Run specific test file # Run specific test file
bin/rails test test/models/user_test.rb bin/rails test test/models/user_test.rb
bundle exec rspec spec/models/user_spec.rb bundle exec rspec spec/models/user_spec.rb
# Run tests matching a pattern # Run tests matching a pattern
bin/rails test -n /creates_user/ bin/rails test -n /creates_user/
bundle exec rspec -e "creates user" bundle exec rspec -e "creates user"
# Run system tests (browser tests) # Run system tests (browser tests)
bin/rails test:system bin/rails test:system
# Run with coverage (SimpleCov) # Run with coverage (SimpleCov)
COVERAGE=true bin/rails test COVERAGE=true bin/rails test
\`\`\` \`\`\`
@@ -511,6 +535,7 @@ RSpec.describe User, type: :model do
expect(user).not_to be_valid expect(user).not_to be_valid
expect(user.errors[:email]).to include("can't be blank") expect(user.errors[:email]).to include("can't be blank")
end end
end end
end end
\`\`\` \`\`\`
@@ -548,19 +573,25 @@ Tailor this to detected platform (look for Dockerfile, fly.toml, render.yaml, ka
If using Kamal for deployment: If using Kamal for deployment:
\`\`\`bash \`\`\`bash
# Setup Kamal (first time) # Setup Kamal (first time)
kamal setup kamal setup
# Deploy # Deploy
kamal deploy kamal deploy
# Rollback to previous version # Rollback to previous version
kamal rollback kamal rollback
# View logs # View logs
kamal app logs kamal app logs
# Run console on production # Run console on production
kamal app exec --interactive 'bin/rails console' kamal app exec --interactive 'bin/rails console'
\`\`\` \`\`\`
@@ -571,10 +602,13 @@ Configuration lives in `config/deploy.yml`.
Build and run: Build and run:
\`\`\`bash \`\`\`bash
# Build image # Build image
docker build -t myapp . docker build -t myapp .
# Run with environment variables # Run with environment variables
docker run -p 3000:3000 \ docker run -p 3000:3000 \
-e DATABASE_URL=postgresql://... \ -e DATABASE_URL=postgresql://... \
-e SECRET_KEY_BASE=... \ -e SECRET_KEY_BASE=... \
@@ -585,36 +619,47 @@ docker run -p 3000:3000 \
### Heroku ### Heroku
\`\`\`bash \`\`\`bash
# Create app # Create app
heroku create myapp heroku create myapp
# Add PostgreSQL # Add PostgreSQL
heroku addons:create heroku-postgresql:mini heroku addons:create heroku-postgresql:mini
# Set environment variables # Set environment variables
heroku config:set SECRET_KEY_BASE=$(bin/rails secret) heroku config:set SECRET_KEY_BASE=$(bin/rails secret)
heroku config:set RAILS_MASTER_KEY=$(cat config/master.key) heroku config:set RAILS_MASTER_KEY=$(cat config/master.key)
# Deploy # Deploy
git push heroku main git push heroku main
# Run migrations # Run migrations
heroku run bin/rails db:migrate heroku run bin/rails db:migrate
\`\`\` \`\`\`
### Fly.io ### Fly.io
\`\`\`bash \`\`\`bash
# Launch (first time) # Launch (first time)
fly launch fly launch
# Deploy # Deploy
fly deploy fly deploy
# Run migrations # Run migrations
fly ssh console -C "bin/rails db:migrate" fly ssh console -C "bin/rails db:migrate"
# Open console # Open console
fly ssh console -C "bin/rails console" fly ssh console -C "bin/rails console"
\`\`\` \`\`\`
@@ -623,6 +668,7 @@ fly ssh console -C "bin/rails console"
If `render.yaml` exists, connect your repo to Render and it will auto-deploy. If `render.yaml` exists, connect your repo to Render and it will auto-deploy.
Manual setup: Manual setup:
1. Create new Web Service 1. Create new Web Service
2. Connect GitHub repository 2. Connect GitHub repository
3. Set build command: `bundle install && bin/rails assets:precompile` 3. Set build command: `bundle install && bin/rails assets:precompile`
@@ -632,21 +678,27 @@ Manual setup:
### Manual/VPS Deployment ### Manual/VPS Deployment
\`\`\`bash \`\`\`bash
# On the server: # On the server:
# Pull latest code # Pull latest code
git pull origin main git pull origin main
# Install dependencies # Install dependencies
bundle install --deployment bundle install --deployment
# Compile assets # Compile assets
RAILS_ENV=production bin/rails assets:precompile RAILS_ENV=production bin/rails assets:precompile
# Run migrations # Run migrations
RAILS_ENV=production bin/rails db:migrate RAILS_ENV=production bin/rails db:migrate
# Restart application server (e.g., Puma via systemd) # Restart application server (e.g., Puma via systemd)
sudo systemctl restart myapp sudo systemctl restart myapp
\`\`\` \`\`\`
``` ```
@@ -661,6 +713,7 @@ sudo systemctl restart myapp
**Error:** `could not connect to server: Connection refused` **Error:** `could not connect to server: Connection refused`
**Solution:** **Solution:**
1. Verify PostgreSQL is running: `pg_isready` or `docker ps` 1. Verify PostgreSQL is running: `pg_isready` or `docker ps`
2. Check `DATABASE_URL` format: `postgresql://USER:PASSWORD@HOST:PORT/DATABASE` 2. Check `DATABASE_URL` format: `postgresql://USER:PASSWORD@HOST:PORT/DATABASE`
3. Ensure database exists: `bin/rails db:create` 3. Ensure database exists: `bin/rails db:create`
@@ -680,7 +733,9 @@ bin/rails db:migrate
**Solution:** **Solution:**
\`\`\`bash \`\`\`bash
# Clear and recompile assets # Clear and recompile assets
bin/rails assets:clobber bin/rails assets:clobber
bin/rails assets:precompile bin/rails assets:precompile
\`\`\` \`\`\`
@@ -690,14 +745,19 @@ bin/rails assets:precompile
**Error:** Native extension build failures **Error:** Native extension build failures
**Solution:** **Solution:**
1. Ensure system dependencies are installed: 1. Ensure system dependencies are installed:
\`\`\`bash \`\`\`bash
# macOS # macOS
brew install postgresql libpq brew install postgresql libpq
# Ubuntu # Ubuntu
sudo apt-get install libpq-dev sudo apt-get install libpq-dev
\`\`\` \`\`\`
2. Try again: `bundle install` 2. Try again: `bundle install`
### Credentials Issues ### Credentials Issues
@@ -706,6 +766,7 @@ bin/rails assets:precompile
**Solution:** **Solution:**
The master key doesn't match the credentials file. Either: The master key doesn't match the credentials file. Either:
1. Get the correct `config/master.key` from another team member 1. Get the correct `config/master.key` from another team member
2. Or regenerate credentials: `rm config/credentials.yml.enc && bin/rails credentials:edit` 2. Or regenerate credentials: `rm config/credentials.yml.enc && bin/rails credentials:edit`
@@ -715,10 +776,13 @@ The master key doesn't match the credentials file. Either:
**Solution:** **Solution:**
\`\`\`bash \`\`\`bash
# Clear Vite cache # Clear Vite cache
rm -rf node_modules/.vite rm -rf node_modules/.vite
# Reinstall JS dependencies # Reinstall JS dependencies
rm -rf node_modules && yarn install rm -rf node_modules && yarn install
\`\`\` \`\`\`
@@ -730,7 +794,9 @@ rm -rf node_modules && yarn install
Ensure the queue worker is running: Ensure the queue worker is running:
\`\`\`bash \`\`\`bash
bin/jobs bin/jobs
# or # or
bin/rails solid_queue:start bin/rails solid_queue:start
\`\`\` \`\`\`
``` ```
@@ -766,8 +832,9 @@ Include if open source or team project.
## Output Format ## Output Format
Generate a complete README.md file with: Generate a complete README.md file with:
- Proper markdown formatting - Proper markdown formatting
- Code blocks with language hints (```bash, ```typescript, etc.) - Code blocks with language hints (`bash, `typescript, etc.)
- Tables where appropriate - Tables where appropriate
- Clear section hierarchy - Clear section hierarchy
- Linked table of contents for long documents - Linked table of contents for long documents

View File

@@ -1,6 +1,6 @@
--- ---
name: vercel-deploy-claimable name: vercel-deploy-claimable
description: "Deploy applications and websites to Vercel. Use this skill when the user requests deployment actions such as "Deploy my app", "Deploy this to production", "Create a preview deployment", "Deploy and give me the link", or "Push this live". No authentication required - returns preview URL and claimable deployment link." description: "Deploy applications and websites to Vercel. Use this skill when the user requests deployment actions such as 'Deploy my app', 'Deploy this to production', 'Create a preview deployment', 'Deploy and give me the link', or 'Push this live'. No authentication required - returns preview URL and claimable deployment link."
source: "https://github.com/vercel-labs/agent-skills/tree/main/skills/claude.ai/vercel-deploy-claimable" source: "https://github.com/vercel-labs/agent-skills/tree/main/skills/claude.ai/vercel-deploy-claimable"
risk: safe risk: safe
--- ---
@@ -12,6 +12,7 @@ Deploy any project to Vercel instantly. No authentication required.
## When to Use This Skill ## When to Use This Skill
Use this skill when: Use this skill when:
- User requests deployment actions like "Deploy my app" - User requests deployment actions like "Deploy my app"
- Deploying to production - Deploying to production
- Creating preview deployments - Creating preview deployments
@@ -32,6 +33,7 @@ bash /mnt/skills/user/vercel-deploy/scripts/deploy.sh [path]
``` ```
**Arguments:** **Arguments:**
- `path` - Directory to deploy, or a `.tgz` file (defaults to current directory) - `path` - Directory to deploy, or a `.tgz` file (defaults to current directory)
**Examples:** **Examples:**
@@ -88,6 +90,7 @@ For static HTML projects (no `package.json`), framework is set to `null`.
## Static HTML Projects ## Static HTML Projects
For projects without a `package.json`: For projects without a `package.json`:
- If there's a single `.html` file not named `index.html`, it gets renamed automatically - If there's a single `.html` file not named `index.html`, it gets renamed automatically
- This ensures the page is served at the root URL (`/`) - This ensures the page is served at the root URL (`/`)