用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ChonSong/riptide --skill riptide-development命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | riptide-development |
| description | Use when working on the Riptide auto-review bot codebase. |
Development principles and patterns for the Riptide codebase.
Never delete deterministic Python code and replace it with LLM generation. When consolidating or refactoring, wire Python processes together: pre-generate data/rendering in Python, then have the LLM reference it.
When editing config-bearing code (URLs, paths), preserve the os.environ.get() pattern with sensible defaults. Never hardcode values that main branch keeps configurable.
GitHub push protection blocks commits containing strings that look like secrets. In test fixtures that need to trigger secret-detection patterns, construct values at runtime via string concatenation with split fragments.
When the user asks for a review-and-fix pass on a PR:
python -m py_compile + python -m pytest -qpython3 -c "import re; print(re.compile(r'...').search('eval('))"git stash, run the failing file on the clean tree, confirm it still fails, then git stash popWhen PRs are stacked on old main and conflict with current main:
git checkout -b <name> origin/maingit checkout origin/<pr> -- files...python -m py_compile + python -m pytestWhen the base was REBUILT (squash + force-push) instead of old-main, the cherry-pick rebuild is the reliable pattern — git rebase --onto replays stale commits from the old base and --skip can silently drop the real feature commits.
This repo requires 1 approving review. GitHub won't let the PR author approve their own PR — so self-owned PRs can NEVER pass review. The only merge path is the admin bypass:
gh pr merge <N> --squash --delete-branch --admin
Squash-merge breaks every PR stacked on top — each stacked branch still contains the lower PR's commits un-squashed, so GitHub reports "merge conflicts" / DIRTY against main (same content, different SHA). Fix:
git fetch origin main && git checkout <stacked-branch>
git rebase origin/main # applies cleanly for squash-stack cases
git diff origin/main --stat # verify ONLY this PR's files remain
git push --force-with-lease origin <stacked-branch>
When adding schema migrations to StateStore:
schema_version — if migration fails, the version must remain at the old valueALTER TABLE in try/except sqlite3.OperationalError for idempotent re-runsNever touch real user data in tests. Patch riptide.state.POLLER_DB_PATH to a temp path and create legacy schemas programmatically.
set -euo pipefail is active — every command must handle its exit code. Use || true for commands that legitimately return non-zeropgrep -Ef (extended regex), not pgrep -f (basic regex where () are literal)--collect from systemd-run — it creates a race condition with start_new_session=Truesystemctl --user is-active riptide.service
systemctl --user status riptide.service --no-pager
curl -s -o /dev/null -w "%{http_code}\n" http://localhost:8477/health
App logs are NOT in journald in --prod — server.py adds a RotatingFileHandler at RIPTIDE_DATA_DIR/riptide.log. journalctl --user -u riptide.service shows ONLY uvicorn/gunicorn access lines.
After deploying behavior-changing bot code, verify the LIVE artifact (real comment on a real PR) reflects the new behavior, not just health + tests. The repo's own PRs are free live-test fixtures.
Detection recipe:
gh api "repos/ChonSong/riptide/issues/<N>/comments" \
--jq '.[] | select(.user.login=="riptide-review[bot]") | .body'
_Reviewed by Riptide T0 + giphy + "reviewing..." = LEGACY path ranGrep for production callers of the method under test BEFORE shipping — if the only hits are the definition and tests, the entry path is missing.
When @riptide-bot review posts confirmation but no review ever appears:
# Get job ID from logs
grep "Created job\|Spawned deep-think" riptide.log | tail
# Read error from cron output
tail -20 ~/.hermes/cron/output/<job_id>/*.md
Common errors: HTTP 401 (billing), HTTP 404 (model), HTTP 504 (timeout), context_length_exceeded (PR too big).
Key facts:
hermes cron list after completion — output dir persistsOllama on this host runs on the standard port 11434, NOT 43311. A wrong port is a SILENT failure.
# Probe the real endpoint
curl -s localhost:11434/api/tags
# Check .env matches
grep OLLAMA_BASE_URL /home/sc/workspace/riptide/.env
When auditing for wrong default port, grep ALL of these:
companion.py — os.environ.get("OLLAMA_BASE_URL", "http://localhost:43311")labeler.py — TWO placesriptide/resources/label-definitions.json — resource JSON overrides code defaultgraphify-out/YYYY-MM-DD/Current orchestrator prompt sizes:
Plus loaded skills (deep-think: 20k chars, github-pr-lifecycle: 53k chars). Total context for a large PR: ~90k chars ≈ 22k tokens.
feat:/fix: commit. Bundle tests with code changes in the same commitwrite_file a "new" test file blindly — if the path already exists it silently REPLACES a tracked file. Check git show HEAD:<path> | head firstpatch for targeted edits, not sed/awkpython -m py_compile + python -m pytest, not just claims of workingtempfile.mkdtemp() and patch module-level path constantsreferences/unified-pipeline-design.md — WS-3 architecture, 5-stage modelreferences/state-heuristics-centralization.md — StateStore and dedupreferences/cron-output-debugging.md — Bot 2 stall diagnosis and recoveryreferences/ollama-port-silent-failure.md — Wrong default port detectionreferences/stacked-pr-rebuild.md — Squash-merge rebuild recipereferences/context-bundle-design.md — Deterministic context bundlereferences/two-tier-response.md — Tier 1 + Tier 2 comment architecture