-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Claude Code web-readiness (dev bootstrap + run-checks skill) #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #!/bin/sh | ||
| # Idempotent dev-tooling bootstrap for Makefile-based (shell/python) repos. | ||
| # Installs the pip-installable lint tools `make check` needs so it works in a cloud session. | ||
| # (ShellCheck itself is usually pre-installed in the web sandbox.) No-op once ruff is present. | ||
| dir="${CLAUDE_PROJECT_DIR:-$(cd "$(dirname "$0")/.." && pwd)}" | ||
| cd "$dir" || exit 0 | ||
|
|
||
| if [ -f Makefile ] && ! command -v ruff >/dev/null 2>&1; then | ||
| pip install --quiet ruff codespell 2>/dev/null || true | ||
|
Comment on lines
+8
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In environments where Useful? React with 👍 / 👎. |
||
| fi | ||
|
|
||
| exit 0 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| { | ||
| "hooks": { | ||
| "SessionStart": [ | ||
| { | ||
| "matcher": "startup|resume", | ||
| "hooks": [ | ||
| { | ||
| "type": "command", | ||
| "command": "sh \"$CLAUDE_PROJECT_DIR/.claude/bootstrap.sh\"" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| name: run-checks | ||
| description: Run agmsg-kit's checks (smoke roundtrip, safety, shell lint). Use when asked to test, lint, verify, or check the installer/patches. | ||
| --- | ||
|
|
||
| Run the repo checks and report results concisely. | ||
|
|
||
| 1. Ensure lint tools are present (SessionStart bootstrap pip-installs `ruff`+`codespell`; `shellcheck` is usually pre-installed on web). | ||
| 2. Targets: `make test` (smoke roundtrip + patch regressions), `make safety` (secret_redact + SQL-escaping/suggest regressions), `make check` (= lint + test + safety). Patch integrity: `make verify-patches`. | ||
| 3. Summarize: which target passed/failed and the first failing assertion/file per failure. | ||
| 4. Do not edit scripts or patches unless asked; the upstream pin + patch set are load-bearing. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,3 +68,12 @@ the chain. See `docs/GOVERNANCE.md` and `SECURITY.md`. | |
|
|
||
| MIT. Upstream agmsg (MIT) is fetched at install time at the pinned commit in | ||
| `VENDORED.md`, not redistributed here. | ||
|
|
||
| ## Claude Code で使う (web / cloud 対応) | ||
|
|
||
| このリポジトリは **Claude Code on the web** に対応しています。 | ||
|
|
||
| - lint ツール(ruff/codespell)は `.claude/bootstrap.sh`(SessionStart)が pip で自動インストール。`make test`(smoke roundtrip)は追加依存なし。 | ||
| - クラウドセッションは `AGENTS.md` と `.claude/skills/`(例: `run-checks`)を自動ロード。 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In Claude Code cloud sessions this line won't actually load the repo instructions: the current Claude Code memory docs state that Claude Code reads Useful? React with 👍 / 👎. |
||
| - MCP は本リポジトリではローカル専用。詳細は | ||
| [`.github/docs/claude-code-web-readiness.md`](https://github.com/thinkyou0714/.github/blob/main/docs/claude-code-web-readiness.md)。 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This committed SessionStart hook also runs when someone opens the repo in a local Claude Code session, not just in Claude Code on the web. In a local checkout that has a Makefile but no
ruff, this line silently runspip install ruff codespellagainst whateverpippoints at, mutating the developer's machine even though the new README frames the bootstrap as web/cloud readiness; add aCLAUDE_CODE_REMOTE=trueguard or move this install to cloud setup.Useful? React with 👍 / 👎.