diff --git a/.claude/hooks/block-cargo-lock.sh b/.claude/hooks/block-cargo-lock.sh new file mode 100755 index 0000000..3032612 --- /dev/null +++ b/.claude/hooks/block-cargo-lock.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Block direct edits to Cargo.lock — it should only change via cargo +INPUT=$(cat) +FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // empty') + +if [[ "$FILE_PATH" == *"Cargo.lock" ]]; then + echo '{ + "hookSpecificOutput": { + "hookEventName": "PreToolUse", + "permissionDecision": "deny", + "permissionDecisionReason": "Cargo.lock is auto-generated. Use cargo to update dependencies." + } + }' +else + exit 0 +fi diff --git a/.claude/hooks/format-rs.sh b/.claude/hooks/format-rs.sh new file mode 100755 index 0000000..7ae91f4 --- /dev/null +++ b/.claude/hooks/format-rs.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Auto-format Rust files after Edit/Write +INPUT=$(cat) +FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // empty') + +if [[ "$FILE_PATH" == *.rs ]]; then + rustfmt --edition 2021 "$FILE_PATH" 2>/dev/null || true +fi diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 0000000..ee99580 --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,27 @@ +{ + "hooks": { + "PostToolUse": [ + { + "matcher": "Edit|Write", + "hooks": [ + { + "type": "command", + "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/format-rs.sh", + "statusMessage": "Formatting Rust code..." + } + ] + } + ], + "PreToolUse": [ + { + "matcher": "Edit|Write", + "hooks": [ + { + "type": "command", + "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/block-cargo-lock.sh" + } + ] + } + ] + } +} diff --git a/.claude/skills/release/SKILL.md b/.claude/skills/release/SKILL.md new file mode 100644 index 0000000..77b7b11 --- /dev/null +++ b/.claude/skills/release/SKILL.md @@ -0,0 +1,17 @@ +--- +name: release +description: Build claudify .deb package and show build info +disable-model-invocation: true +--- + +# Release + +Build the claudify .deb package and verify the output. + +## Steps + +1. Run `cargo tauri build` from the project root +2. Show the build output path and file size +3. Inspect the .deb package metadata with `dpkg-deb --info` +4. List the .deb package contents with `dpkg-deb --contents` +5. Report the package name, version, architecture, and installed size