Skip to content

Commit ba4f395

Browse files
authored
feat: Claude Code (#749)
* docs: CLAUDE.md * feat: devcontainer claude-code * docs: update * docs: agent hooks update * feat: sync-readme-versions * docs: AGENTS.md learnings * feat: sync-readme-versions run locally * chore: build * feat: agent stop review update agents.md * chore: skills cli * feat: claude skill github-actions-docs * feat: skill typescript-advances-types * chore: ignore folders from formatting * feat: sync-readme-version support workflow_dispatch * refactor: stricter tsconfig * chore: tooling ignore agent folders * chore: build * tooling * docs: skill create pull request * delete skill
1 parent 68556ed commit ba4f395

37 files changed

Lines changed: 1340 additions & 214 deletions

.agents/skills/typescript-advanced-types/SKILL.md

Lines changed: 717 additions & 0 deletions
Large diffs are not rendered by default.

.claude/skills/github-actions-docs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../.agents/skills/github-actions-docs
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../.agents/skills/typescript-advanced-types

.devcontainer/devcontainer-lock.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"features": {
3+
"ghcr.io/anthropics/devcontainer-features/claude-code:1.0": {
4+
"version": "1.0.5",
5+
"resolved": "ghcr.io/anthropics/devcontainer-features/claude-code@sha256:cfc2e7d3e9fd3b9b01f8d5cb158508a884c8c0ede2e23ed10f32dea5d4ffe69a",
6+
"integrity": "sha256:cfc2e7d3e9fd3b9b01f8d5cb158508a884c8c0ede2e23ed10f32dea5d4ffe69a"
7+
},
38
"ghcr.io/devcontainers-extra/features/act:1": {
49
"version": "1.0.15",
510
"resolved": "ghcr.io/devcontainers-extra/features/act@sha256:db4a2194930d1f7ec62822d4f600dd2fa4aff3c33b98cdb0b578b64ffb10924c",

.devcontainer/devcontainer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@
2727
"pnpmVersion": "11.0.8"
2828
},
2929
"ghcr.io/devcontainers/features/github-cli:1": {},
30-
"ghcr.io/devcontainers-extra/features/pre-commit:2": {}
31-
}
32-
30+
"ghcr.io/devcontainers-extra/features/pre-commit:2": {},
31+
"ghcr.io/anthropics/devcontainer-features/claude-code:1.0": {}
32+
},
33+
"mounts": [
34+
"source=claude-code-config-${devcontainerId},target=/home/node/.claude,type=volume"
35+
]
3336
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
3437
// "remoteUser": "root"
3538
}

.github/HOOKS.md

Lines changed: 0 additions & 141 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"hooks": {
3+
"Stop": [
4+
{
5+
"type": "command",
6+
"command": "bash ./.github/hooks/scripts/stop-review-agents.sh",
7+
"timeout": 10
8+
}
9+
]
10+
}
11+
}

.github/hooks/scripts/pre-commit-oxc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -euo pipefail
33

44
# Shared formatter/linter entrypoint used by:
55
# - .pre-commit-config.yaml (local hook: oxc-format-and-lint)
6-
# - .github/hooks/format-and-lint-after-edit.json (Copilot PostToolUse)
6+
# - .github/hooks/format-and-lint-after-edit.json (PostToolUse)
77
# AI agents: keep both wiring points and this usage list in sync when behavior or paths change.
88

99
# pre-commit passes staged file paths as positional arguments.
@@ -14,7 +14,7 @@ fi
1414

1515
# Step 1: Format every matched file first.
1616
# If formatting fails, the script exits immediately because of `set -e`.
17-
pnpm exec oxfmt --write "$@"
17+
pnpm exec oxfmt --write --no-error-on-unmatched-pattern "$@"
1818

1919
# Step 2: Build a list of files oxlint can analyze.
2020
# We intentionally keep this separate from formatting so unsupported

.github/hooks/scripts/session-start-docs.sh

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Stop hook: prompts the agent to review AGENTS.md for any learnings from this session.
5+
# Only triggers when there are uncommitted changes — skips read-only sessions.
6+
#
7+
# Used by:
8+
# - .github/hooks/review-agents-at-stop.json (Stop)
9+
10+
if ! command -v git >/dev/null 2>&1; then
11+
exit 0
12+
fi
13+
14+
# Skip if no working-tree changes (read-only session or everything already committed).
15+
if git diff --quiet 2>/dev/null && git diff --cached --quiet 2>/dev/null; then
16+
exit 0
17+
fi
18+
19+
cat <<'EOF'
20+
{
21+
"hookSpecificOutput": {
22+
"hookEventName": "Stop",
23+
"decision": "block",
24+
"reason": "Before finishing: review AGENTS.md for any learnings from this session worth capturing.\n\nConsider:\n- New patterns, conventions, or gotchas discovered\n- Corrections to stale or inaccurate information\n- Non-obvious constraints or workflow steps that needed clarification\n- Anything that would have saved time if it had been documented at the start\n\nIf AGENTS.md is already up to date, output a brief confirmation and the session can end."
25+
}
26+
}
27+
EOF
28+
29+
exit 0

0 commit comments

Comments
 (0)