Operations - deployment pipeline, CI/CD, git workflow, dependency management, code formatting, Vite build, and cross-package migrations. Use for deploying, CI configuration, git operations, branch strategy, dependency upgrades, formatting, build tooling, and release management.
日本語に翻訳
name: ops
user-invocable: false
description: Operations - deployment pipeline, CI/CD, git workflow, dependency management, code formatting, Vite build, and cross-package migrations. Use for deploying, CI configuration, git operations, branch strategy, dependency upgrades, formatting, build tooling, and release management.
version: "1.1.0"
status: active
packages: ["all"]
dependencies: ["contracts"]
last_updated: "2026-04-12"
last_verified: "2026-04-12"
Ops Skill
Unified operations guide covering deployment, CI/CD, git workflow, dependency management, and code formatting for the Green Goods monorepo.
Activation
Signal Domain Sub-File Deploy, release, broadcast, mainnet, testnet, Vercel, indexer deploy Deployment deployment.md CI, GitHub Actions, workflow, pipeline, caching, status checks CI/CD ci-cd.md Branch, commit, merge, rebase, PR, release tag, changelog Git git-workflow.md Dependencies, lockfile, bun install, audit, upgrade, workspace Dependencies dependency-management.md Format, Biome, import sorting, Prettier migration Formatting biome.md Vite, build config, HMR, env vars, plugins, bundle Build Tool vite.md Migration, breaking change, upgrade, blast radius Migration migration.md
Part 1: Quick Reference
Everyday Commands
bun format # Format workspace (Biome)
bun lint # Lint workspace (oxlint + forge fmt)
bun run test # Run all tests (CRITICAL: not `bun test`)
bun build # Build everything (respects dependency order)
bun dev # Start all services via PM2
bun dev:stop # Stop all services
# Full validation (run before committing or pushing)
bun format && bun lint && bun run test && bun build
Deployment Commands
# Contract deployment (ALWAYS use deploy.ts, never forge script)
bun script/deploy.ts core --network sepolia # Dry run
bun script/deploy.ts core --network sepolia --broadcast # Deploy
bun script/deploy.ts core --network sepolia --broadcast --update-schemas # Deploy + schemas
# Production readiness
bun run verify:contracts # Full: build + lint + tests + E2E + dry runs
bun run verify:contracts:fast # Quick: skip E2E and dry runs
# Indexer
cd packages/indexer && bun run dev:docker # Local Docker
docker compose -f docker-compose.indexer.yaml up -d # Production
# Frontend
cd packages/client && bun build && vercel --prod
cd packages/admin && bun build && vercel --prod
Git Conventions
# Branch naming: type/description (kebab-case)
feature/hats-protocol-v2 feat/passkey-login bug/admin-build-fix
# Commit format: type(scope): description
# Types: feat, fix, refactor, chore, docs, test, perf, ci
# Scopes: contracts, indexer, shared, client, admin, agent, claude
feat(contracts): add Hats Protocol v2 module
fix(client): resolve offline sync race condition
Dependency Commands
bun outdated # Check for outdated packages
bun update wagmi # Update specific package
bun install --frozen-lockfile # CI validation (catches drift)
bun audit # Security vulnerability scan
Migration Rule
For cross-package breaking changes, plan the work and create or update the owning feature hub first, then follow migration.md . Migration notes belong in that hub's reports/ directory, not in a separate global migrations folder.
Part 2: Deployment Pipeline
Deployment Order (MANDATORY)
1. contracts --> Generates ABIs + deployment artifacts
2. indexer --> Needs contract addresses + ABIs
3. shared --> Needs contract artifacts (build only, not deployed)
4. client --> Needs shared + indexer endpoint
5. admin --> Needs shared + indexer endpoint
Cross-Package Dependency Map
contracts --> deployments/{chainId}-latest.json --> shared (ABIs)
\-> indexer (addresses)
shared --> hooks, types, utils --> client
\-> admin
indexer --> GraphQL endpoint --> client (queries)
\-> admin (queries)
deploy.ts CLI
Command Purpose bun script/deploy.ts core --network <net>Deploy core contracts bun script/deploy.ts garden <config.json> --network <net>Deploy garden config bun script/deploy.ts hats-tree --network <net>Deploy Hats Protocol tree bun script/deploy.ts status [network]Check deployment status
Flag Purpose --networkTarget chain (localhost, baseSepolia, arbitrum, celo, sepolia) --broadcastActually send transactions --update-schemasUpdate EAS schemas only --forceForce fresh deployment (skip cache) --dry-runValidate + simulate without broadcasting (may still call RPC) --pure-simulationCompile + preflight only, no RPC/network calls
Network Configuration
Network Chain ID RPC Variable Usage Localhost (Anvil) 31337 Local Development Sepolia 11155111 SEPOLIA_RPC_URLDefault testnet Base Sepolia 84532 BASE_SEPOLIA_RPC_URLLegacy testnet Arbitrum One 42161 ARBITRUM_RPC_URLProduction Celo 42220 CELO_RPC_URLProduction
Deployment Artifacts
packages/contracts/deployments/
11155111-latest.json # Sepolia
42161-latest.json # Arbitrum
42220-latest.json # Celo
31337-latest.json # Localhost
networks.json # Network registry
Imported by @green-goods/shared for contract address resolution.
Reference Files
Sub-File Contents deployment.md Rollback procedures, environment promotion, Vercel config, local dev, pre-deployment checklist, indexer deployment ci-cd.md GitHub Actions workflows (11), path-filtering, caching strategy, PR status gates, secrets management, local CI simulation git-workflow.md Branch strategy, conventional commits, conflict resolution, release tagging, PR best practices dependency-management.md Bun workspace protocol, lockfile handling, update workflow, phantom dependencies, security audit, version pinning biome.md Biome configuration, import organization, editor setup, Prettier migration, contracts exception (forge fmt) vite.md Vite 7.x build tool, plugin configuration, environment variables, HMR, PWA setup, bundle optimization migration.md Cross-package breaking changes, blast radius mapping, feature-hub reporting, execution order, rollback planning
Anti-Patterns
Deployment
Never use forge script directly -- always use deploy.ts
Never deploy to mainnet without dry run -- always validate first
Never skip the deployment order -- contracts must deploy before indexer
Never create package-specific .env files -- single root .env only
Never modify config/schemas.json -- it defines production EAS schemas
CI/CD & Git
Never run all tests without path filters -- wastes CI minutes on unchanged packages
Never skip --frozen-lockfile in CI -- causes dependency drift
Never force push shared branches -- rewrites history others depend on
Never merge without CI passing -- required status checks exist for a reason
Never commit secrets -- check for .env, credentials, API keys
Dependencies & Formatting
Never install root deps for package-specific needs -- install in the correct package
Never update all deps at once without testing -- isolate changes
Never manually edit bun.lockb -- binary format, always regenerate
Never use Prettier alongside Biome -- they conflict; remove Prettier if found
Never manually sort imports -- Biome's organizeImports handles it
Decision Tree
What ops work?
|
+-- Deploying something? -----------> deployment.md
| contracts / indexer / frontend
|
+-- CI/CD pipeline work? -----------> ci-cd.md
| workflows / caching / gates
|
+-- Git operations? ----------------> git-workflow.md
| branch / commit / merge / PR
|
+-- Dependency issues? -------------> dependency-management.md
| install / update / lockfile
|
+-- Formatting / imports? ----------> biome.md
| bun format / editor setup
|
+-- Breaking change / multi-package rollout?
| --> migration.md
| --> create or update the owning plan hub first
|
+-- Pre-commit validation? ---------> Quick Reference (Part 1)
bun format && bun lint && bun run test && bun build
Related Skills
contracts -- Solidity development patterns, testing, and build system
testing -- TDD workflow, Vitest patterns, E2E with Playwright
indexer -- Event handler development, schema design, Docker setup
contracts -- ABI/storage/deployment implications for migrations
plan -- Migration plan lifecycle and team coordination