[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KR38KX34TS3NY61THH3EEP":3,"skill-same:01M6KR38KX34TS3NY61THH3EEP":68},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":51,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M6KR38KX34TS3NY61THH3EEP","bluex-ops",null,"Operate Bluex Next in production: create GitHub issues, inspect Bluex API state, monitor ubuntu-blue over SSH, and query the live production PostgreSQL database. Use when the user asks to operate, monitor, debug, triage, or create work for bluex-next\u002FBluex.","getbluex\u002Fbluex","getbluex","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F292048264?v=4","01M6KR22DTVGYX7RHYAEZBFGYM","Bluex","01M6KR22J01MCYMPDNB1QPGH00",3,"MIT","https:\u002F\u002Fgithub.com\u002Fgetbluex\u002Fbluex\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbluex-ops\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"bluex ops","ops","api","for","inspect","operate","next","query","use","work","github","ssh","Ubuntu","postgresql","database","issues","state","create","monitor","debug","2026-11-10 10:12:30",false,"---\nname: bluex-ops\ndescription: \"Operate Bluex Next in production: create GitHub issues, inspect Bluex API state, monitor ubuntu-blue over SSH, and query the live production PostgreSQL database. Use when the user asks to operate, monitor, debug, triage, or create work for bluex-next\u002FBluex.\"\n---\n\n# Bluex Ops\n\nThis skill is for operating Bluex Next, especially the production instance on `root@ubuntu-blue`.\n\nDefault posture: **observe first, do not mutate production unless the user explicitly asks.**\n\nAlways establish time context before any operational check or action:\n\n- Run local `date '+%Y-%m-%dT%H:%M:%S%z'` first.\n- When connecting to production, include remote `date -Is` before status\u002FAPI\u002FDB queries.\n- Compare timestamps against the current time and say how recent\u002Fstale observations are.\n\n## Production facts\n\n- SSH host: `root@ubuntu-blue`\n- App service: `bluex-app-api.service`\n- App user\u002Fgroup: `bluex-app:bluex-app`\n- Current app symlink: `\u002Fsrv\u002Fbluex-app\u002Fcurrent`\n- Config env file: `\u002Fetc\u002Fbluex-app\u002Fbluex.env`\n- Production config: `\u002Fetc\u002Fbluex-app\u002Fbluex.config.ts`\n- API bind: `127.0.0.1:3300`\n- Public app is proxied by Caddy.\n- Database: PostgreSQL, resolved from `runtime.databaseUrl` after sourcing `\u002Fetc\u002Fbluex-app\u002Fbluex.env` and loading `\u002Fetc\u002Fbluex-app\u002Fbluex.config.ts`.\n- Env source for the live database: `BLUEX_DATABASE_URL`.\n- Workspace root: `\u002Fsrv\u002Fbluex-app\u002Fworkspaces`\n- Default repository: `awaaate\u002Fbluex-next`\n\nProduction no longer uses the historical SQLite file as the source of truth. If `\u002Fsrv\u002Fbluex-app\u002Fdata\u002Fbluex-next.sqlite` still exists, treat it as a legacy\u002Fstale migration artifact unless the user explicitly asks to inspect old data. Do not use SQLite counts to describe live production state.\n\nUse read-only PostgreSQL access unless explicitly asked to repair or mutate state.\n\n## First checks\n\nWhen asked for status or monitoring, start with:\n\n```bash\nssh root@ubuntu-blue 'hostname; date -Is; uptime; systemctl is-active bluex-app-api.service bluex-app-worker.service bluex-app-realtime.service caddy.service actions.runner.awaaate-bluex-next.ubuntu-blue.service; systemctl --failed --no-pager'\n```\n\nThen check the local API:\n\n```bash\nssh root@ubuntu-blue 'for p in \u002Fruntime\u002Fhealth \u002Fruntime\u002Fstatus \u002Fopenapi.json \u002Fissues \u002Fworks \u002Fsessions \u002Fpull-requests \u002Fevents \u002Fagents \u002Fexecution-sites; do printf \"%s \" \"$p\"; curl -sS -o \u002Ftmp\u002Fbluex_probe -w \"%{http_code} %{content_type} %{size_download}\\n\" -m 5 \"http:\u002F\u002F127.0.0.1:3300$p\"; done'\n```\n\n`\u002Fruntime\u002Fhealth` is the runtime health signal. Use `\u002Fopenapi.json` only as a secondary liveness\u002Fdocumentation probe.\n\n## Resolve runtime paths from code\u002Fconfig\n\nIf paths are uncertain, derive them from the app config instead of searching blindly:\n\n```bash\nssh root@ubuntu-blue 'bash -s' \u003C\u003C'REMOTE'\nset -euo pipefail\ncd \u002Fsrv\u002Fbluex-app\u002Fcurrent\nset -a\n. \u002Fetc\u002Fbluex-app\u002Fbluex.env\nset +a\nbun --eval '\nimport { loadBluexConfig } from \".\u002Fapps\u002Fapi\u002Fsrc\u002Fbootstrap\u002Fconfig-file\";\nimport { resolveRuntimeConfig } from \".\u002Fapps\u002Fapi\u002Fsrc\u002Fbootstrap\u002Fruntime-config\";\n\nfunction redactUrl(value) {\n  try {\n    const url = new URL(value);\n    if (url.username) url.username = \"***\";\n    if (url.password) url.password = \"***\";\n    return url.toString();\n  } catch {\n    return \"\u003Cunparseable>\";\n  }\n}\n\nconst config = await loadBluexConfig(process.cwd());\nconst runtime = resolveRuntimeConfig(config, process.cwd(), process.env.NODE_ENV);\nconsole.log(JSON.stringify({\n  databaseUrl: redactUrl(runtime.databaseUrl),\n  databaseAdapter: runtime.databaseConfig.adapter,\n  databaseSource: runtime.databaseConfig.source,\n  workspaceRoot: runtime.workspaceRoot,\n  port: runtime.port,\n  defaultRepository: runtime.defaultRepository,\n}, null, 2));\n'\nREMOTE\n```\n\n## Database inspection\n\nAlways derive the live DB URL from runtime config. Do not paste or print database credentials in reports. Keep `psql` in read-only mode with a statement timeout.\n\n```bash\nssh root@ubuntu-blue 'bash -s' \u003C\u003C'REMOTE'\nset -euo pipefail\nset -a\n. \u002Fetc\u002Fbluex-app\u002Fbluex.env\nset +a\nDATABASE_URL=\"${BLUEX_DATABASE_URL:-}\"\ncase \"$DATABASE_URL\" in\n  postgres:\u002F\u002F*|postgresql:\u002F\u002F*) ;;\n  *) echo \"Refusing non-PostgreSQL live DB URL: ${DATABASE_URL%%:*}\" >&2; exit 1 ;;\nesac\n\nPGOPTIONS=\"-c default_transaction_read_only=on -c statement_timeout=5000\" \\\n  psql \"$DATABASE_URL\" -v ON_ERROR_STOP=1 \u003C\u003C'SQL'\nBEGIN READ ONLY;\nSELECT current_database() AS database, current_user AS user_name, now() AS checked_at;\nSELECT table_name\nFROM information_schema.tables\nWHERE table_schema = 'public'\nORDER BY table_name;\nROLLBACK;\nSQL\nREMOTE\n```\n\nUseful summary query:\n\n```bash\nssh root@ubuntu-blue 'bash -s' \u003C\u003C'REMOTE'\nset -euo pipefail\nset -a\n. \u002Fetc\u002Fbluex-app\u002Fbluex.env\nset +a\nDATABASE_URL=\"${BLUEX_DATABASE_URL:-}\"\ncase \"$DATABASE_URL\" in\n  postgres:\u002F\u002F*|postgresql:\u002F\u002F*) ;;\n  *) echo \"Refusing non-PostgreSQL live DB URL: ${DATABASE_URL%%:*}\" >&2; exit 1 ;;\nesac\nPGOPTIONS=\"-c default_transaction_read_only=on -c statement_timeout=5000\" \\\n  psql \"$DATABASE_URL\" -v ON_ERROR_STOP=1 \u003C\u003C'SQL'\nBEGIN READ ONLY;\nSELECT 'issues' AS table_name, count(*) AS n FROM issues\nUNION ALL SELECT 'works', count(*) FROM works\nUNION ALL SELECT 'sessions', count(*) FROM sessions\nUNION ALL SELECT 'events', count(*) FROM events\nUNION ALL SELECT 'pull_requests', count(*) FROM pull_requests\nUNION ALL SELECT 'workspaces', count(*) FROM workspaces\nUNION ALL SELECT 'tracked_repositories', count(*) FROM tracked_repositories;\nSELECT status, count(*) n FROM issues GROUP BY status ORDER BY n DESC;\nSELECT status, count(*) n FROM works GROUP BY status ORDER BY n DESC;\nSELECT status, count(*) n FROM sessions GROUP BY status ORDER BY n DESC;\nSELECT status, count(*) n FROM pull_requests GROUP BY status ORDER BY n DESC;\nROLLBACK;\nSQL\nREMOTE\n```\n\nUseful triage query:\n\n```bash\nssh root@ubuntu-blue 'bash -s' \u003C\u003C'REMOTE'\nset -euo pipefail\nset -a\n. \u002Fetc\u002Fbluex-app\u002Fbluex.env\nset +a\nDATABASE_URL=\"${BLUEX_DATABASE_URL:-}\"\ncase \"$DATABASE_URL\" in\n  postgres:\u002F\u002F*|postgresql:\u002F\u002F*) ;;\n  *) echo \"Refusing non-PostgreSQL live DB URL: ${DATABASE_URL%%:*}\" >&2; exit 1 ;;\nesac\nPGOPTIONS=\"-c default_transaction_read_only=on -c statement_timeout=5000\" \\\n  psql \"$DATABASE_URL\" -v ON_ERROR_STOP=1 \u003C\u003C'SQL'\nBEGIN READ ONLY;\nSELECT id, status, tracker_ref_json->>'project' AS repo, tracker_ref_json->>'displayId' AS num, left(title,70) AS title, updated_at\nFROM issues\nWHERE status \u003C> 'done'\nORDER BY updated_at DESC\nLIMIT 25;\nSELECT w.id, w.status, w.agent, w.harness, w.issue_id, left(i.title,55) AS issue_title, w.updated_at\nFROM works w LEFT JOIN issues i ON i.id=w.issue_id\nWHERE w.status IN ('failed','waiting')\nORDER BY w.updated_at DESC\nLIMIT 25;\nSELECT s.id, s.status, s.agent, s.harness, s.issue_id, left(s.progress_label,45) AS progress, s.updated_at, s.heartbeat_at\nFROM sessions s\nWHERE s.status IN ('idle','failed')\nORDER BY s.updated_at DESC\nLIMIT 25;\nSELECT p.id, p.status, p.review_status, p.checks_status, p.issue_id, p.tracker_ref_json->>'project' AS repo, p.tracker_ref_json->>'displayId' AS num, p.updated_at\nFROM pull_requests p\nWHERE p.status='open'\nORDER BY p.updated_at DESC;\nROLLBACK;\nSQL\nREMOTE\n```\n\nFor one issue, inspect current pointers and recent events:\n\n```bash\nssh root@ubuntu-blue 'ISSUE=issue_awaaate_bluex_next_671 bash -s' \u003C\u003C'REMOTE'\nset -euo pipefail\nset -a\n. \u002Fetc\u002Fbluex-app\u002Fbluex.env\nset +a\nDATABASE_URL=\"${BLUEX_DATABASE_URL:-}\"\ncase \"$DATABASE_URL\" in\n  postgres:\u002F\u002F*|postgresql:\u002F\u002F*) ;;\n  *) echo \"Refusing non-PostgreSQL live DB URL: ${DATABASE_URL%%:*}\" >&2; exit 1 ;;\nesac\nPGOPTIONS=\"-c default_transaction_read_only=on -c statement_timeout=5000\" \\\n  psql \"$DATABASE_URL\" -v ON_ERROR_STOP=1 -v issue_id=\"$ISSUE\" \u003C\u003C'SQL'\nBEGIN READ ONLY;\nSELECT id,status,current_work_id,current_session_id,current_pull_request_id,left(meta_json::text,2000) AS meta,left(signals_json::text,1000) AS signals,updated_at,title\nFROM issues\nWHERE id = :'issue_id';\nSELECT sequence,type,source,work_id,session_id,pull_request_id,summary,left(payload_json::text,1200) AS payload,created_at\nFROM events\nWHERE issue_id = :'issue_id'\nORDER BY sequence DESC\nLIMIT 20;\nROLLBACK;\nSQL\nREMOTE\n```\n\n## API inspection\n\nUse API for contract-shaped records:\n\n```bash\nssh root@ubuntu-blue 'curl -fsS http:\u002F\u002F127.0.0.1:3300\u002Fissues | jq \"{count:(.items|length), items:[.items[:10][] | {id,status,title,trackerRef}]}\"'\n```\n\nOpenAPI paths:\n\n```bash\nssh root@ubuntu-blue 'curl -fsS http:\u002F\u002F127.0.0.1:3300\u002Fopenapi.json | jq -r \".paths | keys[]\"'\n```\n\nKnown important paths:\n\n- `\u002Fissues`\n- `\u002Fissues\u002F{issueId}`\n- `\u002Fissues\u002F{issueId}\u002Fexecution-context`\n- `\u002Fissues\u002F{issueId}\u002Fwork-runnability`\n- `\u002Fissues\u002F{issueId}\u002Fworkspace\u002Fprepare`\n- `\u002Fworks`\n- `\u002Fworks\u002F{workId}`\n- `\u002Fworks\u002F{workId}\u002Frunnability`\n- `\u002Fsessions`\n- `\u002Fevents`\n- `\u002Fevents\u002Ftimeline`\n- `\u002Fpull-requests`\n- `\u002Fpull-requests\u002F{pullRequestId}\u002Fcheck-runs`\n- `\u002Fpull-requests\u002F{pullRequestId}\u002Fvalidation-runs`\n- `\u002Fagents`\n- `\u002Fruntime\u002Fhealth`\n- `\u002Fruntime\u002Fstatus`\n- `\u002Fexecution-sites`\n\n## Logs\n\nApp logs:\n\n```bash\nssh root@ubuntu-blue 'journalctl -u bluex-app-api.service -n 200 --no-pager'\n```\n\nCaddy logs:\n\n```bash\nssh root@ubuntu-blue 'journalctl -u caddy.service -n 100 --no-pager'\n```\n\nGitHub Actions runner logs:\n\n```bash\nssh root@ubuntu-blue 'journalctl -u actions.runner.awaaate-bluex-next.ubuntu-blue.service -n 120 --no-pager'\n```\n\nNote: `openclaw-gateway` may log WhatsApp `401 Unauthorized` messages. Treat as separate noise unless the user asks about it.\n\n## Creating GitHub issues\n\nDefault repo is `awaaate\u002Fbluex-next`.\n\nBluex issues are **work briefs**, not implementation tickets. They should describe:\n\n- the problem\n- the intention\n- the expected observable outcome\n- useful context\n\nThey should **not** prescribe the solution. Bluex should investigate, design, and decide how to fix it.\n\nAvoid writing issue bodies that say things like:\n\n- create file X\n- add function Y\n- use library\u002Fendpoint\u002Fschema Z\n- implement this exact algorithm\n- modify this exact module\n\nOnly mention concrete files\u002Fendpoints\u002Fmodules when they are part of the observed problem or necessary context.\n\nPreferred issue body template:\n\n```md\n## Problema\n\nQué está pasando, qué falla, qué falta o qué fricción existe.\n\n## Intención\n\nQué queremos conseguir a nivel de producto, sistema u operación.\n\n## Resultado esperado\n\nQué debería poder observarse cuando Bluex lo resuelva.\n\n## Contexto\n\nDatos útiles, enlaces, ejemplos, síntomas o restricciones.\nNo incluir una solución propuesta salvo que sea estrictamente contexto.\n```\n\nBefore creating an issue, clarify the problem, intention, expected outcome, and context if they are missing. Prefer small, actionable briefs.\n\nGood example:\n\n```md\n## Problema\n\nAl monitorizar Bluex en producción, no existe una forma simple y estable de saber si la API está viva. Actualmente hay que usar `\u002Fopenapi.json` como proxy de salud, lo que mezcla liveness con documentación.\n\n## Intención\n\nPoder comprobar rápidamente desde operaciones, scripts o Caddy que la API está levantada y responde.\n\n## Resultado esperado\n\nExiste una señal simple de salud de la API que permite distinguir entre servicio caído, servicio vivo y problemas básicos de runtime.\n\n## Contexto\n\nEn producción la API corre en `127.0.0.1:3300`. El endpoint `\u002Fhealth` actualmente devuelve 404.\n```\n\nBad example:\n\n```md\nCrear endpoint GET \u002Fhealthz en apps\u002Fapi\u002Fsrc\u002Fapp.ts que devuelva `{ ok: true }`.\n```\n\nCommand pattern:\n\n```bash\ngh issue create --repo awaaate\u002Fbluex-next --title \"...\" --body-file \u002Ftmp\u002Fissue-body.md\n```\n\nAfter creating a GitHub issue, if the user wants Bluex to see it immediately, use the Bluex tracked-repo import\u002Fsync endpoints from prod after checking OpenAPI\u002Frequest schema. Do not guess write payloads.\n\n## Comments and projection\n\nDo **not** duplicate the same operator handoff\u002Fcomment in both GitHub and Bluex.\n\nBluex has comment projection\u002Fsync, so use one canonical channel and let projection propagate it. Prefer GitHub comments when the target is a GitHub issue\u002FPR or when the comment is an operator-facing handoff. Use Bluex comments only when the target exists only inside Bluex or the user explicitly asks for an internal Bluex-only comment.\n\nIf projection is stale or broken, report that as a sync\u002Fprojection issue instead of posting duplicate comments by default.\n\n## Production mutation rules\n\nDo **not** do these without explicit user permission:\n\n- Restart services.\n- Edit `\u002Fetc\u002Fbluex-app\u002F*`.\n- Run `INSERT`, `UPDATE`, `DELETE`, DDL, or maintenance commands against production PostgreSQL.\n- Use `\u002Fsrv\u002Fbluex-app\u002Fdata\u002Fbluex-next.sqlite` as live production data.\n- Delete workspaces\u002Freleases.\n- Trigger new work\u002Fruns.\n- Merge\u002Fclose PRs or issues.\n\nSafe by default:\n\n- `systemctl status\u002Fis-active`\n- `journalctl` reads\n- `curl` GETs\n- `psql` `BEGIN READ ONLY` SELECTs against the runtime-derived PostgreSQL URL\n- `gh issue\u002Fpr list\u002Fview`\n\n## Reporting format\n\nWhen reporting status, keep it operational:\n\n1. Overall health: API, service, runner, DB reachable.\n2. Counts: issues by status, works by status, sessions by status, PRs by status.\n3. Current blockers: recent blocked issues, failed works, failed\u002Fidle sessions, open PRs with failing checks\u002Freviews.\n4. Recommended next action.\n\nPrefer Spanish if the user writes Spanish.\n","# Bluex Ops\n\nThis skill is for operating Bluex Next, especially the production instance on `root@ubuntu-blue`.\n\nDefault posture: **observe first, do not mutate production unless the user explicitly asks.**\n\nAlways establish time context before any operational check or action:\n\n- Run local `date '+%Y-%m-%dT%H:%M:%S%z'` first.\n- When connecting to production, include remote `date -Is` before status\u002FAPI\u002FDB queries.\n- Compare timestamps against the current time and say how recent\u002Fstale observations are.\n\n## Production facts\n\n- SSH host: `root@ubuntu-blue`\n- App service: `bluex-app-api.service`\n- App user\u002Fgroup: `bluex-app:bluex-app`\n- Current app symlink: `\u002Fsrv\u002Fbluex-app\u002Fcurrent`\n- Config env file: `\u002Fetc\u002Fbluex-app\u002Fbluex.env`\n- Production config: `\u002Fetc\u002Fbluex-app\u002Fbluex.config.ts`\n- API bind: `127.0.0.1:3300`\n- Public app is proxied by Caddy.\n- Database: PostgreSQL, resolved from `runtime.databaseUrl` after sourcing `\u002Fetc\u002Fbluex-app\u002Fbluex.env` and loading `\u002Fetc\u002Fbluex-app\u002Fbluex.config.ts`.\n- Env source for the live database: `BLUEX_DATABASE_URL`.\n- Workspace root: `\u002Fsrv\u002Fbluex-app\u002Fworkspaces`\n- Default repository: `awaaate\u002Fbluex-next`\n\nProduction no longer uses the historical SQLite file as the source of truth. If `\u002Fsrv\u002Fbluex-app\u002Fdata\u002Fbluex-next.sqlite` still exists, treat it as a legacy\u002Fstale migration artifact unless the user explicitly asks to inspect old data. Do not use SQLite counts to describe live production state.\n\nUse read-only PostgreSQL access unless explicitly asked to repair or mutate state.\n\n## First checks\n\nWhen asked for status or monitoring, start with:\n\n```bash\nssh root@ubuntu-blue 'hostname; date -Is; uptime; systemctl is-active bluex-app-api.service bluex-app-worker.service bluex-app-realtime.service caddy.service actions.runner.awaaate-bluex-next.ubuntu-blue.service; systemctl --failed --no-pager'\n```\n\nThen check the local API:\n\n```bash\nssh root@ubuntu-blue 'for p in \u002Fruntime\u002Fhealth \u002Fruntime\u002Fstatus \u002Fopenapi.json \u002Fissues \u002Fworks \u002Fsessions \u002Fpull-requests \u002Fevents \u002Fagents \u002Fexecution-sites; do printf \"%s \" \"$p\"; curl -sS -o \u002Ftmp\u002Fbluex_probe -w \"%{http_code} %{content_type} %{size_download}\\n\" -m 5 \"http:\u002F\u002F127.0.0.1:3300$p\"; done'\n```\n\n`\u002Fruntime\u002Fhealth` is the runtime health signal. Use `\u002Fopenapi.json` only as a secondary liveness\u002Fdocumentation probe.\n\n## Resolve runtime paths from code\u002Fconfig\n\nIf paths are uncertain, derive them from the app config instead of searching blindly:\n\n```bash\nssh root@ubuntu-blue 'bash -s' \u003C\u003C'REMOTE'\nset -euo pipefail\ncd \u002Fsrv\u002Fbluex-app\u002Fcurrent\nset -a\n. \u002Fetc\u002Fbluex-app\u002Fbluex.env\nset +a\nbun --eval '\nimport { loadBluexConfig } from \".\u002Fapps\u002Fapi\u002Fsrc\u002Fbootstrap\u002Fconfig-file\";\nimport { resolveRuntimeConfig } from \".\u002Fapps\u002Fapi\u002Fsrc\u002Fbootstrap\u002Fruntime-config\";\n\nfunction redactUrl(value) {\n  try {\n    const url = new URL(value);\n    if (url.username) url.username = \"***\";\n    if (url.password) url.password = \"***\";\n    return url.toString();\n  } catch {\n    return \"\u003Cunparseable>\";\n  }\n}\n\nconst config = await loadBluexConfig(process.cwd());\nconst runtime = resolveRuntimeConfig(config, process.cwd(), process.env.NODE_ENV);\nconsole.log(JSON.stringify({\n  databaseUrl: redactUrl(runtime.databaseUrl),\n  databaseAdapter: runtime.databaseConfig.adapter,\n  databaseSource: runtime.databaseConfig.source,\n  workspaceRoot: runtime.workspaceRoot,\n  port: runtime.port,\n  defaultRepository: runtime.defaultRepository,\n}, null, 2));\n'\nREMOTE\n```\n\n## Database inspection\n\nAlways derive the live DB URL from runtime config. Do not paste or print database credentials in reports. Keep `psql` in read-only mode with a statement timeout.\n\n```bash\nssh root@ubuntu-blue 'bash -s' \u003C\u003C'REMOTE'\nset -euo pipefail\nset -a\n. \u002Fetc\u002Fbluex-app\u002Fbluex.env\nset +a\nDATABASE_URL=\"${BLUEX_DATABASE_URL:-}\"\ncase \"$DATABASE_URL\" in\n  postgres:\u002F\u002F*|postgresql:\u002F\u002F*) ;;\n  *) echo \"Refusing non-PostgreSQL live DB URL: ${DATABASE_URL%%:*}\" >&2; exit 1 ;;\nesac\n\nPGOPTIONS=\"-c default_transaction_read_only=on -c statement_timeout=5000\" \\\n  psql \"$DATABASE_URL\" -v ON_ERROR_STOP=1 \u003C\u003C'SQL'\nBEGIN READ ONLY;\nSELECT current_database() AS database, current_user AS user_name, now() AS checked_at;\nSELECT table_name\nFROM information_schema.tables\nWHERE table_schema = 'public'\nORDER BY table_name;\nROLLBACK;\nSQL\nREMOTE\n```\n\nUseful summary query:\n\n```bash\nssh root@ubuntu-blue 'bash -s' \u003C\u003C'REMOTE'\nset -euo pipefail\nset -a\n. \u002Fetc\u002Fbluex-app\u002Fbluex.env\nset +a\nDATABASE_URL=\"${BLUEX_DATABASE_URL:-}\"\ncase \"$DATABASE_URL\" in\n  postgres:\u002F\u002F*|postgresql:\u002F\u002F*) ;;\n  *) echo \"Refusing non-PostgreSQL live DB URL: ${DATABASE_URL%%:*}\" >&2; exit 1 ;;\nesac\nPGOPTIONS=\"-c default_transaction_read_only=on -c statement_timeout=5000\" \\\n  psql \"$DATABASE_URL\" -v ON_ERROR_STOP=1 \u003C\u003C'SQL'\nBEGIN READ ONLY;\nSELECT 'issues' AS table_name, count(*) AS n FROM issues\nUNION ALL SELECT 'works', count(*) FROM works\nUNION ALL SELECT 'sessions', count(*) FROM sessions\nUNION ALL SELECT 'events', count(*) FROM events\nUNION ALL SELECT 'pull_requests', count(*) FROM pull_requests\nUNION ALL SELECT 'workspaces', count(*) FROM workspaces\nUNION ALL SELECT 'tracked_repositories', count(*) FROM tracked_repositories;\nSELECT status, count(*) n FROM issues GROUP BY status ORDER BY n DESC;\nSELECT status, count(*) n FROM works GROUP BY status ORDER BY n DESC;\nSELECT status, count(*) n FROM sessions GROUP BY status ORDER BY n DESC;\nSELECT status, count(*) n FROM pull_requests GROUP BY status ORDER BY n DESC;\nROLLBACK;\nSQL\nREMOTE\n```\n\nUseful triage query:\n\n```bash\nssh root@ubuntu-blue 'bash -s' \u003C\u003C'REMOTE'\nset -euo pipefail\nset -a\n. \u002Fetc\u002Fbluex-app\u002Fbluex.env\nset +a\nDATABASE_URL=\"${BLUEX_DATABASE_URL:-}\"\ncase \"$DATABASE_URL\" in\n  postgres:\u002F\u002F*|postgresql:\u002F\u002F*) ;;\n  *) echo \"Refusing non-PostgreSQL live DB URL: ${DATABASE_URL%%:*}\" >&2; exit 1 ;;\nesac\nPGOPTIONS=\"-c default_transaction_read_only=on -c statement_timeout=5000\" \\\n  psql \"$DATABASE_URL\" -v ON_ERROR_STOP=1 \u003C\u003C'SQL'\nBEGIN READ ONLY;\nSELECT id, status, tracker_ref_json->>'project' AS repo, tracker_ref_json->>'displayId' AS num, left(title,70) AS title, updated_at\nFROM issues\nWHERE status \u003C> 'done'\nORDER BY updated_at DESC\nLIMIT 25;\nSELECT w.id, w.status, w.agent, w.harness, w.issue_id, left(i.title,55) AS issue_title, w.updated_at\nFROM works w LEFT JOIN issues i ON i.id=w.issue_id\nWHERE w.status IN ('failed','waiting')\nORDER BY w.updated_at DESC\nLIMIT 25;\nSELECT s.id, s.status, s.agent, s.harness, s.issue_id, left(s.progress_label,45) AS progress, s.updated_at, s.heartbeat_at\nFROM sessions s\nWHERE s.status IN ('idle','failed')\nORDER BY s.updated_at DESC\nLIMIT 25;\nSELECT p.id, p.status, p.review_status, p.checks_status, p.issue_id, p.tracker_ref_json->>'project' AS repo, p.tracker_ref_json->>'displayId' AS num, p.updated_at\nFROM pull_requests p\nWHERE p.status='open'\nORDER BY p.updated_at DESC;\nROLLBACK;\nSQL\nREMOTE\n```\n\nFor one issue, inspect current pointers and recent events:\n\n```bash\nssh root@ubuntu-blue 'ISSUE=issue_awaaate_bluex_next_671 bash -s' \u003C\u003C'REMOTE'\nset -euo pipefail\nset -a\n. \u002Fetc\u002Fbluex-app\u002Fbluex.env\nset +a\nDATABASE_URL=\"${BLUEX_DATABASE_URL:-}\"\ncase \"$DATABASE_URL\" in\n  postgres:\u002F\u002F*|postgresql:\u002F\u002F*) ;;\n  *) echo \"Refusing non-PostgreSQL live DB URL: ${DATABASE_URL%%:*}\" >&2; exit 1 ;;\nesac\nPGOPTIONS=\"-c default_transaction_read_only=on -c statement_timeout=5000\" \\\n  psql \"$DATABASE_URL\" -v ON_ERROR_STOP=1 -v issue_id=\"$ISSUE\" \u003C\u003C'SQL'\nBEGIN READ ONLY;\nSELECT id,status,current_work_id,current_session_id,current_pull_request_id,left(meta_json::text,2000) AS meta,left(signals_json::text,1000) AS signals,updated_at,title\nFROM issues\nWHERE id = :'issue_id';\nSELECT sequence,type,source,work_id,session_id,pull_request_id,summary,left(payload_json::text,1200) AS payload,created_at\nFROM events\nWHERE issue_id = :'issue_id'\nORDER BY sequence DESC\nLIMIT 20;\nROLLBACK;\nSQL\nREMOTE\n```\n\n## API inspection\n\nUse API for contract-shaped records:\n\n```bash\nssh root@ubuntu-blue 'curl -fsS http:\u002F\u002F127.0.0.1:3300\u002Fissues | jq \"{count:(.items|length), items:[.items[:10][] | {id,status,title,trackerRef}]}\"'\n```\n\nOpenAPI paths:\n\n```bash\nssh root@ubuntu-blue 'curl -fsS http:\u002F\u002F127.0.0.1:3300\u002Fopenapi.json | jq -r \".paths | keys[]\"'\n```\n\nKnown important paths:\n\n- `\u002Fissues`\n- `\u002Fissues\u002F{issueId}`\n- `\u002Fissues\u002F{issueId}\u002Fexecution-context`\n- `\u002Fissues\u002F{issueId}\u002Fwork-runnability`\n- `\u002Fissues\u002F{issueId}\u002Fworkspace\u002Fprepare`\n- `\u002Fworks`\n- `\u002Fworks\u002F{workId}`\n- `\u002Fworks\u002F{workId}\u002Frunnability`\n- `\u002Fsessions`\n- `\u002Fevents`\n- `\u002Fevents\u002Ftimeline`\n- `\u002Fpull-requests`\n- `\u002Fpull-requests\u002F{pullRequestId}\u002Fcheck-runs`\n- `\u002Fpull-requests\u002F{pullRequestId}\u002Fvalidation-runs`\n- `\u002Fagents`\n- `\u002Fruntime\u002Fhealth`\n- `\u002Fruntime\u002Fstatus`\n- `\u002Fexecution-sites`\n\n## Logs\n\nApp logs:\n\n```bash\nssh root@ubuntu-blue 'journalctl -u bluex-app-api.service -n 200 --no-pager'\n```\n\nCaddy logs:\n\n```bash\nssh root@ubuntu-blue 'journalctl -u caddy.service -n 100 --no-pager'\n```\n\nGitHub Actions runner logs:\n\n```bash\nssh root@ubuntu-blue 'journalctl -u actions.runner.awaaate-bluex-next.ubuntu-blue.service -n 120 --no-pager'\n```\n\nNote: `openclaw-gateway` may log WhatsApp `401 Unauthorized` messages. Treat as separate noise unless the user asks about it.\n\n## Creating GitHub issues\n\nDefault repo is `awaaate\u002Fbluex-next`.\n\nBluex issues are **work briefs**, not implementation tickets. They should describe:\n\n- the problem\n- the intention\n- the expected observable outcome\n- useful context\n\nThey should **not** prescribe the solution. Bluex should investigate, design, and decide how to fix it.\n\nAvoid writing issue bodies that say things like:\n\n- create file X\n- add function Y\n- use library\u002Fendpoint\u002Fschema Z\n- implement this exact algorithm\n- modify this exact module\n\nOnly mention concrete files\u002Fendpoints\u002Fmodules when they are part of the observed problem or necessary context.\n\nPreferred issue body template:\n\n```md\n## Problema\n\nQué está pasando, qué falla, qué falta o qué fricción existe.\n\n## Intención\n\nQué queremos conseguir a nivel de producto, sistema u operación.\n\n## Resultado esperado\n\nQué debería poder observarse cuando Bluex lo resuelva.\n\n## Contexto\n\nDatos útiles, enlaces, ejemplos, síntomas o restricciones.\nNo incluir una solución propuesta salvo que sea estrictamente contexto.\n```\n\nBefore creating an issue, clarify the problem, intention, expected outcome, and context if they are missing. Prefer small, actionable briefs.\n\nGood example:\n\n```md\n## Problema\n\nAl monitorizar Bluex en producción, no existe una forma simple y estable de saber si la API está viva. Actualmente hay que usar `\u002Fopenapi.json` como proxy de salud, lo que mezcla liveness con documentación.\n\n## Intención\n\nPoder comprobar rápidamente desde operaciones, scripts o Caddy que la API está levantada y responde.\n\n## Resultado esperado\n\nExiste una señal simple de salud de la API que permite distinguir entre servicio caído, servicio vivo y problemas básicos de runtime.\n\n## Contexto\n\nEn producción la API corre en `127.0.0.1:3300`. El endpoint `\u002Fhealth` actualmente devuelve 404.\n```\n\nBad example:\n\n```md\nCrear endpoint GET \u002Fhealthz en apps\u002Fapi\u002Fsrc\u002Fapp.ts que devuelva `{ ok: true }`.\n```\n\nCommand pattern:\n\n```bash\ngh issue create --repo awaaate\u002Fbluex-next --title \"...\" --body-file \u002Ftmp\u002Fissue-body.md\n```\n\nAfter creating a GitHub issue, if the user wants Bluex to see it immediately, use the Bluex tracked-repo import\u002Fsync endpoints from prod after checking OpenAPI\u002Frequest schema. Do not guess write payloads.\n\n## Comments and projection\n\nDo **not** duplicate the same operator handoff\u002Fcomment in both GitHub and Bluex.\n\nBluex has comment projection\u002Fsync, so use one canonical channel and let projection propagate it. Prefer GitHub comments when the target is a GitHub issue\u002FPR or when the comment is an operator-facing handoff. Use Bluex comments only when the target exists only inside Bluex or the user explicitly asks for an internal Bluex-only comment.\n\nIf projection is stale or broken, report that as a sync\u002Fprojection issue instead of posting duplicate comments by default.\n\n## Production mutation rules\n\nDo **not** do these without explicit user permission:\n\n- Restart services.\n- Edit `\u002Fetc\u002Fbluex-app\u002F*`.\n- Run `INSERT`, `UPDATE`, `DELETE`, DDL, or maintenance commands against production PostgreSQL.\n- Use `\u002Fsrv\u002Fbluex-app\u002Fdata\u002Fbluex-next.sqlite` as live production data.\n- Delete workspaces\u002Freleases.\n- Trigger new work\u002Fruns.\n- Merge\u002Fclose PRs or issues.\n\nSafe by default:\n\n- `systemctl status\u002Fis-active`\n- `journalctl` reads\n- `curl` GETs\n- `psql` `BEGIN READ ONLY` SELECTs against the runtime-derived PostgreSQL URL\n- `gh issue\u002Fpr list\u002Fview`\n\n## Reporting format\n\nWhen reporting status, keep it operational:\n\n1. Overall health: API, service, runner, DB reachable.\n2. Counts: issues by status, works by status, sessions by status, PRs by status.\n3. Current blockers: recent blocked issues, failed works, failed\u002Fidle sessions, open PRs with failing checks\u002Freviews.\n4. Recommended next action.\n\nPrefer Spanish if the user writes Spanish.\n",{"name":5,"description":7},"main","2e94c321a368a0c3154b72811fcce4d56f383e47",".agents\u002Fskills\u002Fbluex-ops",0,"https:\u002F\u002Fgithub.com\u002Fgetbluex\u002Fbluex","https:\u002F\u002Fgetbluex.com","https:\u002F\u002Fgithub.com\u002Fgetbluex","https:\u002F\u002Fgetbluex.com\u002F","The open-source agentic execution layer. Ship from issues, not from chat.","2026-06-29 03:08:31",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add getbluex\u002Fbluex --skill bluex-ops",{"tool":60,"command":61},"bunx","bunx skills add getbluex\u002Fbluex --skill bluex-ops",{"tool":63,"command":64},"pnpm","pnpm dlx skills add getbluex\u002Fbluex --skill bluex-ops","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgetbluex\u002Fbluex\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbluex-ops\u002FSKILL.md",true,[],[69,75,85,90,98,103],{"skillNo":70,"name":71,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":39},"01M6KR6EW893TX7A0AJ5E2AXGN","example","https:\u002F\u002Fgithub.com\u002Fgetbluex\u002Fbluex\u002Fblob\u002Fmain\u002Fpackages\u002Fagents-runtime\u002Ftest-fixtures\u002Ffolder-agent\u002Fskills\u002Fexample\u002FSKILL.md",[],[71],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":39},"01M6KR6AWRWBMB4KS8WWKFK5JJ","ui","Explore, build, and refine UI.","https:\u002F\u002Fgithub.com\u002Fgetbluex\u002Fbluex\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Fui\u002FSKILL.md",[],[77,82,83,84],"explore","build","refine",{"skillNo":86,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":39},"01M6KR66D1EGS7B4J2E5PJ3HE0","https:\u002F\u002Fgithub.com\u002Fgetbluex\u002Fbluex\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002Fui\u002FSKILL.md",[],[77,82,83,84],{"skillNo":91,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":39},"01M6KR624AB5M8PBXDRRF23ARV","https:\u002F\u002Fgithub.com\u002Fgetbluex\u002Fbluex\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fui\u002FSKILL.md",[],[77,95,82,96,97,83,84],"MCP","fetch","webfetch",{"skillNo":99,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":39},"01M6KR5ZSMRR1YGC3TKAGGG46H","https:\u002F\u002Fgithub.com\u002Fgetbluex\u002Fbluex\u002Fblob\u002Fmain\u002F.bluex\u002Fagents\u002Fui-implementer\u002Fskills\u002Fui\u002FSKILL.md",[],[77,83,84,82],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":39},"01M6KR5T99GDE0H1THB40GF9HP","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", or \"switch to --preset\".","https:\u002F\u002Fgithub.com\u002Fgetbluex\u002Fbluex\u002Fblob\u002Fmain\u002F.bluex\u002Fagents\u002Fui-implementer\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[105,110,36,111,112,113,114,77,115,116,117,118,119,120,121,122,123,124,22,125],"debugging","init","component","app","file","projects","context","styling","switch","project","triggers","false","component docs","codes","usage","components"]