@codyswann/lisa 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +867 -0
- package/all/copy-overwrite/.claude/README.md +205 -0
- package/all/copy-overwrite/.claude/agents/agent-architect.md +311 -0
- package/all/copy-overwrite/.claude/agents/codebase-analyzer.md +146 -0
- package/all/copy-overwrite/.claude/agents/codebase-locator.md +125 -0
- package/all/copy-overwrite/.claude/agents/codebase-pattern-finder.md +237 -0
- package/all/copy-overwrite/.claude/agents/git-history-analyzer.md +183 -0
- package/all/copy-overwrite/.claude/agents/hooks-expert.md +74 -0
- package/all/copy-overwrite/.claude/agents/skill-evaluator.md +246 -0
- package/all/copy-overwrite/.claude/agents/slash-command-architect.md +87 -0
- package/all/copy-overwrite/.claude/agents/web-search-researcher.md +112 -0
- package/all/copy-overwrite/.claude/commands/git/commit-and-submit-pr.md +8 -0
- package/all/copy-overwrite/.claude/commands/git/commit.md +44 -0
- package/all/copy-overwrite/.claude/commands/git/prune.md +34 -0
- package/all/copy-overwrite/.claude/commands/git/submit-pr.md +50 -0
- package/all/copy-overwrite/.claude/commands/jira/create.md +50 -0
- package/all/copy-overwrite/.claude/commands/jira/verify.md +34 -0
- package/all/copy-overwrite/.claude/commands/project/archive.md +8 -0
- package/all/copy-overwrite/.claude/commands/project/bootstrap.md +49 -0
- package/all/copy-overwrite/.claude/commands/project/complete-task.md +7 -0
- package/all/copy-overwrite/.claude/commands/project/debrief.md +65 -0
- package/all/copy-overwrite/.claude/commands/project/execute.md +94 -0
- package/all/copy-overwrite/.claude/commands/project/implement.md +42 -0
- package/all/copy-overwrite/.claude/commands/project/local-code-review.md +88 -0
- package/all/copy-overwrite/.claude/commands/project/lower-code-complexity.md +74 -0
- package/all/copy-overwrite/.claude/commands/project/plan.md +314 -0
- package/all/copy-overwrite/.claude/commands/project/research.md +248 -0
- package/all/copy-overwrite/.claude/commands/project/review.md +63 -0
- package/all/copy-overwrite/.claude/commands/project/setup.md +19 -0
- package/all/copy-overwrite/.claude/commands/project/verify.md +38 -0
- package/all/copy-overwrite/.claude/commands/pull-request/review.md +12 -0
- package/all/copy-overwrite/.claude/commands/rules/format-md.md +72 -0
- package/all/copy-overwrite/.claude/commands/sonarqube/check.md +6 -0
- package/all/copy-overwrite/.claude/commands/sonarqube/fix.md +3 -0
- package/all/copy-overwrite/.claude/hooks/README.md +301 -0
- package/all/copy-overwrite/.claude/hooks/notify-ntfy.sh +181 -0
- package/all/copy-overwrite/.claude/settings.json +41 -0
- package/all/copy-overwrite/.claude/settings.local.json.example +14 -0
- package/all/copy-overwrite/.claude/skills/coding-philosophy/SKILL.md +405 -0
- package/all/copy-overwrite/.claude/skills/coding-philosophy/references/function-structure.md +416 -0
- package/all/copy-overwrite/.claude/skills/coding-philosophy/references/immutable-patterns.md +316 -0
- package/all/copy-overwrite/.claude/skills/prompt-complexity-scorer/SKILL.md +118 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/LICENSE.txt +202 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/SKILL.md +210 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/scripts/__pycache__/quick_validate.cpython-312.pyc +0 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/scripts/init_skill.py +303 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/scripts/package_skill.py +110 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/scripts/quick_validate.py +65 -0
- package/all/copy-overwrite/CLAUDE.md +77 -0
- package/all/copy-overwrite/HUMAN.md +17 -0
- package/all/copy-overwrite/specs/.keep +0 -0
- package/all/create-only/PROJECT_RULES.md +0 -0
- package/cdk/merge/package.json +20 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +107 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/prompts.d.ts +45 -0
- package/dist/cli/prompts.d.ts.map +1 -0
- package/dist/cli/prompts.js +58 -0
- package/dist/cli/prompts.js.map +1 -0
- package/dist/core/config.d.ts +73 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +36 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +4 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/lisa.d.ts +81 -0
- package/dist/core/lisa.d.ts.map +1 -0
- package/dist/core/lisa.js +459 -0
- package/dist/core/lisa.js.map +1 -0
- package/dist/core/manifest.d.ts +58 -0
- package/dist/core/manifest.d.ts.map +1 -0
- package/dist/core/manifest.js +104 -0
- package/dist/core/manifest.js.map +1 -0
- package/dist/detection/detector.interface.d.ts +15 -0
- package/dist/detection/detector.interface.d.ts.map +1 -0
- package/dist/detection/detector.interface.js +2 -0
- package/dist/detection/detector.interface.js.map +1 -0
- package/dist/detection/detectors/cdk.d.ts +10 -0
- package/dist/detection/detectors/cdk.d.ts.map +1 -0
- package/dist/detection/detectors/cdk.js +34 -0
- package/dist/detection/detectors/cdk.js.map +1 -0
- package/dist/detection/detectors/expo.d.ts +10 -0
- package/dist/detection/detectors/expo.d.ts.map +1 -0
- package/dist/detection/detectors/expo.js +30 -0
- package/dist/detection/detectors/expo.js.map +1 -0
- package/dist/detection/detectors/nestjs.d.ts +10 -0
- package/dist/detection/detectors/nestjs.d.ts.map +1 -0
- package/dist/detection/detectors/nestjs.js +34 -0
- package/dist/detection/detectors/nestjs.js.map +1 -0
- package/dist/detection/detectors/npm-package.d.ts +13 -0
- package/dist/detection/detectors/npm-package.d.ts.map +1 -0
- package/dist/detection/detectors/npm-package.js +30 -0
- package/dist/detection/detectors/npm-package.js.map +1 -0
- package/dist/detection/detectors/typescript.d.ts +10 -0
- package/dist/detection/detectors/typescript.d.ts.map +1 -0
- package/dist/detection/detectors/typescript.js +25 -0
- package/dist/detection/detectors/typescript.js.map +1 -0
- package/dist/detection/index.d.ts +24 -0
- package/dist/detection/index.d.ts.map +1 -0
- package/dist/detection/index.js +57 -0
- package/dist/detection/index.js.map +1 -0
- package/dist/errors/index.d.ts +69 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +110 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/logging/console-logger.d.ts +12 -0
- package/dist/logging/console-logger.d.ts.map +1 -0
- package/dist/logging/console-logger.js +22 -0
- package/dist/logging/console-logger.js.map +1 -0
- package/dist/logging/index.d.ts +4 -0
- package/dist/logging/index.d.ts.map +1 -0
- package/dist/logging/index.js +3 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/logging/logger.interface.d.ts +20 -0
- package/dist/logging/logger.interface.d.ts.map +1 -0
- package/dist/logging/logger.interface.js +2 -0
- package/dist/logging/logger.interface.js.map +1 -0
- package/dist/logging/silent-logger.d.ts +12 -0
- package/dist/logging/silent-logger.d.ts.map +1 -0
- package/dist/logging/silent-logger.js +21 -0
- package/dist/logging/silent-logger.js.map +1 -0
- package/dist/strategies/copy-contents.d.ts +14 -0
- package/dist/strategies/copy-contents.d.ts.map +1 -0
- package/dist/strategies/copy-contents.js +69 -0
- package/dist/strategies/copy-contents.js.map +1 -0
- package/dist/strategies/copy-overwrite.d.ts +14 -0
- package/dist/strategies/copy-overwrite.d.ts.map +1 -0
- package/dist/strategies/copy-overwrite.js +47 -0
- package/dist/strategies/copy-overwrite.js.map +1 -0
- package/dist/strategies/create-only.d.ts +13 -0
- package/dist/strategies/create-only.d.ts.map +1 -0
- package/dist/strategies/create-only.js +30 -0
- package/dist/strategies/create-only.js.map +1 -0
- package/dist/strategies/index.d.ts +31 -0
- package/dist/strategies/index.d.ts.map +1 -0
- package/dist/strategies/index.js +52 -0
- package/dist/strategies/index.js.map +1 -0
- package/dist/strategies/merge.d.ts +13 -0
- package/dist/strategies/merge.d.ts.map +1 -0
- package/dist/strategies/merge.js +60 -0
- package/dist/strategies/merge.js.map +1 -0
- package/dist/strategies/strategy.interface.d.ts +31 -0
- package/dist/strategies/strategy.interface.d.ts.map +1 -0
- package/dist/strategies/strategy.interface.js +2 -0
- package/dist/strategies/strategy.interface.js.map +1 -0
- package/dist/transaction/backup.d.ts +38 -0
- package/dist/transaction/backup.d.ts.map +1 -0
- package/dist/transaction/backup.js +97 -0
- package/dist/transaction/backup.js.map +1 -0
- package/dist/transaction/index.d.ts +4 -0
- package/dist/transaction/index.d.ts.map +1 -0
- package/dist/transaction/index.js +3 -0
- package/dist/transaction/index.js.map +1 -0
- package/dist/transaction/transaction.d.ts +34 -0
- package/dist/transaction/transaction.d.ts.map +1 -0
- package/dist/transaction/transaction.js +68 -0
- package/dist/transaction/transaction.js.map +1 -0
- package/dist/utils/file-operations.d.ts +29 -0
- package/dist/utils/file-operations.d.ts.map +1 -0
- package/dist/utils/file-operations.js +84 -0
- package/dist/utils/file-operations.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/json-utils.d.ts +22 -0
- package/dist/utils/json-utils.d.ts.map +1 -0
- package/dist/utils/json-utils.js +57 -0
- package/dist/utils/json-utils.js.map +1 -0
- package/dist/utils/path-utils.d.ts +21 -0
- package/dist/utils/path-utils.d.ts.map +1 -0
- package/dist/utils/path-utils.js +35 -0
- package/dist/utils/path-utils.js.map +1 -0
- package/eslint-plugin-code-organization/README.md +149 -0
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +468 -0
- package/eslint-plugin-code-organization/index.js +23 -0
- package/eslint-plugin-code-organization/package.json +10 -0
- package/eslint-plugin-code-organization/rules/enforce-statement-order.js +157 -0
- package/expo/copy-overwrite/.claude/skills/apollo-client/SKILL.md +238 -0
- package/expo/copy-overwrite/.claude/skills/apollo-client/references/mutation-patterns.md +360 -0
- package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/SKILL.md +360 -0
- package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/references/atomic-levels.md +417 -0
- package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/references/folder-structure.md +257 -0
- package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/references/gluestack-mapping.md +233 -0
- package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/scripts/validate_atomic_structure.py +327 -0
- package/expo/copy-overwrite/.claude/skills/container-view-pattern/SKILL.md +299 -0
- package/expo/copy-overwrite/.claude/skills/container-view-pattern/references/examples.md +749 -0
- package/expo/copy-overwrite/.claude/skills/container-view-pattern/references/patterns.md +318 -0
- package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/create_component.py +198 -0
- package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/validate_component.py +207 -0
- package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/SKILL.md +268 -0
- package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/references/common-issues.md +619 -0
- package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/references/file-extensions.md +340 -0
- package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/references/platform-api.md +276 -0
- package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/scripts/validate_cross_platform.py +414 -0
- package/expo/copy-overwrite/.claude/skills/directory-structure/SKILL.md +202 -0
- package/expo/copy-overwrite/.claude/skills/directory-structure/scripts/validate_structure.py +443 -0
- package/expo/copy-overwrite/.claude/skills/expo-env-config/SKILL.md +309 -0
- package/expo/copy-overwrite/.claude/skills/expo-env-config/references/validation-patterns.md +417 -0
- package/expo/copy-overwrite/.claude/skills/expo-router-best-practices/SKILL.md +431 -0
- package/expo/copy-overwrite/.claude/skills/expo-router-best-practices/references/official-docs.md +290 -0
- package/expo/copy-overwrite/.claude/skills/expo-router-best-practices/scripts/generate-route.py +169 -0
- package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/SKILL.md +411 -0
- package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/references/color-tokens.md +343 -0
- package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/references/component-mapping.md +307 -0
- package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/references/spacing-scale.md +300 -0
- package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/scripts/validate_styling.py +354 -0
- package/expo/copy-overwrite/.claude/skills/local-state/SKILL.md +362 -0
- package/expo/copy-overwrite/.claude/skills/local-state/references/async-storage.md +505 -0
- package/expo/copy-overwrite/.claude/skills/local-state/references/persistence-patterns.md +711 -0
- package/expo/copy-overwrite/.claude/skills/local-state/references/reactive-variables.md +446 -0
- package/expo/copy-overwrite/.claude/skills/playwright-selectors/SKILL.md +223 -0
- package/expo/copy-overwrite/.claude/skills/testing-library/SKILL.md +319 -0
- package/expo/copy-overwrite/.claude/skills/testing-library/references/async-patterns.md +420 -0
- package/expo/copy-overwrite/.claude/skills/testing-library/references/expo-router-testing.md +556 -0
- package/expo/copy-overwrite/.claude/skills/testing-library/references/mocking-patterns.md +590 -0
- package/expo/copy-overwrite/.claude/skills/testing-library/references/query-priority.md +291 -0
- package/expo/copy-overwrite/.easignore.extra +2 -0
- package/expo/copy-overwrite/.mcp.json +33 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/README.md +234 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/plugin-index.test.js +84 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/require-memo-in-view.test.js +196 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/single-component-per-file.test.js +289 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/index.js +32 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/package.json +10 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/enforce-component-structure.js +230 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/no-return-in-view.js +91 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/require-memo-in-view.js +178 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/single-component-per-file.js +238 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/README.md +260 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/index.js +29 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/package.json +10 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-classname-outside-ui.js +51 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-direct-rn-imports.js +55 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-inline-styles.js +73 -0
- package/expo/copy-overwrite/eslint.config.mjs +560 -0
- package/expo/copy-overwrite/lighthouserc.js +194 -0
- package/expo/create-only/lighthouserc-config.json +28 -0
- package/expo/merge/package.json +132 -0
- package/lisa.sh +35 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/SKILL.md +176 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/advanced-features.md +527 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/project-patterns.md +483 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/quick-start.md +257 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/resolvers-mutations.md +413 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/types-scalars.md +513 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-rules/SKILL.md +536 -0
- package/nestjs/copy-overwrite/.claude/skills/typeorm-patterns/SKILL.md +275 -0
- package/nestjs/copy-overwrite/.claude/skills/typeorm-patterns/references/configuration-patterns.md +487 -0
- package/nestjs/copy-overwrite/.claude/skills/typeorm-patterns/references/entity-patterns.md +450 -0
- package/nestjs/copy-overwrite/.claude/skills/typeorm-patterns/references/observability-patterns.md +536 -0
- package/nestjs/merge/package.json +75 -0
- package/package.json +124 -0
- package/typescript/copy-contents/.husky/commit-msg +91 -0
- package/typescript/copy-contents/.husky/pre-commit +96 -0
- package/typescript/copy-contents/.husky/pre-push +211 -0
- package/typescript/copy-overwrite/.claude/hooks/format-on-edit.sh +74 -0
- package/typescript/copy-overwrite/.claude/hooks/install_pkgs.sh +59 -0
- package/typescript/copy-overwrite/.claude/hooks/lint-on-edit.sh +103 -0
- package/typescript/copy-overwrite/.claude/skills/jsdoc-best-practices/SKILL.md +388 -0
- package/typescript/copy-overwrite/.github/README.md +455 -0
- package/typescript/copy-overwrite/.github/dependabot.yml +40 -0
- package/typescript/copy-overwrite/.github/k6/BROWSER_TESTING_NOTE.md +129 -0
- package/typescript/copy-overwrite/.github/k6/INTEGRATION_GUIDE.md +354 -0
- package/typescript/copy-overwrite/.github/k6/README.md +386 -0
- package/typescript/copy-overwrite/.github/k6/SCENARIO_SELECTION_GUIDE.md +264 -0
- package/typescript/copy-overwrite/.github/k6/examples/customer-deploy-integration.yml +115 -0
- package/typescript/copy-overwrite/.github/k6/examples/data-driven-test.js +268 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/load.js +142 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/load.json +27 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/smoke.js +26 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/smoke.json +20 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/soak.js +244 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/soak.json +29 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/spike.js +180 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/spike.json +32 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/stress.js +206 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/stress.json +38 -0
- package/typescript/copy-overwrite/.github/k6/scripts/api-test.js +452 -0
- package/typescript/copy-overwrite/.github/k6/scripts/default-test.js +185 -0
- package/typescript/copy-overwrite/.github/k6/thresholds/normal.json +30 -0
- package/typescript/copy-overwrite/.github/k6/thresholds/relaxed.json +21 -0
- package/typescript/copy-overwrite/.github/k6/thresholds/strict.json +29 -0
- package/typescript/copy-overwrite/.github/workflows/build.yml +72 -0
- package/typescript/copy-overwrite/.github/workflows/ci.yml +49 -0
- package/typescript/copy-overwrite/.github/workflows/claude.yml +51 -0
- package/typescript/copy-overwrite/.github/workflows/create-github-issue-on-failure.yml +113 -0
- package/typescript/copy-overwrite/.github/workflows/create-jira-issue-on-failure.yml +195 -0
- package/typescript/copy-overwrite/.github/workflows/create-sentry-issue-on-failure.yml +267 -0
- package/typescript/copy-overwrite/.github/workflows/deploy.yml +228 -0
- package/typescript/copy-overwrite/.github/workflows/k6-load-test-README.md +230 -0
- package/typescript/copy-overwrite/.github/workflows/lighthouse.yml +68 -0
- package/typescript/copy-overwrite/.github/workflows/load-test.yml +282 -0
- package/typescript/copy-overwrite/.github/workflows/quality.yml +1737 -0
- package/typescript/copy-overwrite/.github/workflows/release.yml +1599 -0
- package/typescript/copy-overwrite/.gitleaksignore +28 -0
- package/typescript/copy-overwrite/.nvmrc +1 -0
- package/typescript/copy-overwrite/.prettierignore +23 -0
- package/typescript/copy-overwrite/.prettierrc.json +22 -0
- package/typescript/copy-overwrite/.versionrc +42 -0
- package/typescript/copy-overwrite/.yamllint +20 -0
- package/typescript/copy-overwrite/commitlint.config.js +11 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/README.md +149 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +468 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/index.js +23 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/package.json +10 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/rules/enforce-statement-order.js +157 -0
- package/typescript/copy-overwrite/eslint.config.mjs +390 -0
- package/typescript/copy-overwrite/eslint.ignore.config.json +57 -0
- package/typescript/copy-overwrite/eslint.thresholds.config.json +5 -0
- package/typescript/github-rulesets/base.json +106 -0
- package/typescript/merge/.claude/settings.json +28 -0
- package/typescript/merge/package.json +71 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Checks for code review comments on a PR and implements them if required.
|
|
3
|
+
argument-hint: <github-pr-link>
|
|
4
|
+
allowed-tools: Read, Write, Bash(git*), Glob, Grep, Task, TodoWrite. Bash(gh*)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
1. Use the github cli to find all the code review comments on $ARGUMENTS
|
|
8
|
+
2. Create a task list for each unresolved code review comment
|
|
9
|
+
3. Review the code reviews one by one and determine if they are correct and should be implemented
|
|
10
|
+
4. The ones that aren't valid or you're not implementing, use the github cli to comment why you're not and resolve the code review comment
|
|
11
|
+
5. For the rest, implement the changes and then use the github cli to mark the comment why it's resolved.
|
|
12
|
+
6. Once all the code review comments have been resolved, run /git:commit
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Format any markdown file according to brief.md standard template"
|
|
3
|
+
argument-hint: "[markdown-file-path]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Format Markdown File
|
|
7
|
+
|
|
8
|
+
Format any markdown file according to the brief.md standard template structure. Provide the markdown file path as argument.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
/format-md path/to/file.md
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Standard Template Format
|
|
17
|
+
|
|
18
|
+
The command will reorganize markdown content into this standard structure:
|
|
19
|
+
|
|
20
|
+
```markdown
|
|
21
|
+
# [Document Title]
|
|
22
|
+
|
|
23
|
+
## Context
|
|
24
|
+
|
|
25
|
+
[Brief description of the problem or situation]
|
|
26
|
+
|
|
27
|
+
## Goal
|
|
28
|
+
|
|
29
|
+
[What needs to be achieved]
|
|
30
|
+
|
|
31
|
+
## Changes
|
|
32
|
+
|
|
33
|
+
[List of specific changes needed]
|
|
34
|
+
|
|
35
|
+
## Implementation
|
|
36
|
+
|
|
37
|
+
[Detailed steps or technical implementation details]
|
|
38
|
+
|
|
39
|
+
## Notes
|
|
40
|
+
|
|
41
|
+
[Additional information, constraints, or special considerations]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Instructions
|
|
45
|
+
|
|
46
|
+
1. **Read the file**: Read the markdown file provided in $ARGUMENTS
|
|
47
|
+
2. **Extract title**:
|
|
48
|
+
- Use the first # heading as title
|
|
49
|
+
- If no # title found, create one that fits the content
|
|
50
|
+
3. **Categorize content**:
|
|
51
|
+
- **Context**: Problem/Background/Issue/Current state descriptions
|
|
52
|
+
- **Goal**: Solution/Objective/Purpose/Target statements
|
|
53
|
+
- **Changes**: Requirements/Features/Scope/What's needed items
|
|
54
|
+
- **Implementation**: Steps/Technical details/How to do it/Code blocks
|
|
55
|
+
- **Notes**: Additional info/Warnings/Considerations/Important notes
|
|
56
|
+
4. **Reformat**:
|
|
57
|
+
- Move all content into appropriate standard sections
|
|
58
|
+
- Unify language like English
|
|
59
|
+
- Keep code blocks, lists, and formatting intact
|
|
60
|
+
5. **Write back**: Save the formatted content to the same file
|
|
61
|
+
|
|
62
|
+
## Content Mapping Rules
|
|
63
|
+
|
|
64
|
+
### Headers that map to sections:
|
|
65
|
+
|
|
66
|
+
- **Context**: Context, Problem, Background, Issue, Current State, Description
|
|
67
|
+
- **Goal**: Goal, Objective, Solution, Purpose, Target, What, Solution Overview
|
|
68
|
+
- **Changes**: Changes, Requirements, Features, Scope, Deliverables, What's Needed
|
|
69
|
+
- **Implementation**: Implementation, Steps, Technical Details, How, Approach, Process
|
|
70
|
+
- **Notes**: Notes, Considerations, Constraints, Additional Information, Warnings, Important
|
|
71
|
+
|
|
72
|
+
Execute this formatting process on the markdown file specified in $ARGUMENTS.
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
# Claude Code Hooks
|
|
2
|
+
|
|
3
|
+
This directory contains hook scripts that enhance Claude Code's behavior during development.
|
|
4
|
+
|
|
5
|
+
## Available Hooks
|
|
6
|
+
|
|
7
|
+
### install_pkgs.sh
|
|
8
|
+
|
|
9
|
+
**Type**: SessionStart hook
|
|
10
|
+
**Trigger**: At the start of each Claude Code session (remote/web only)
|
|
11
|
+
**Purpose**: Installs project dependencies and development tools needed for the session
|
|
12
|
+
|
|
13
|
+
#### How it works
|
|
14
|
+
|
|
15
|
+
1. The hook only runs in remote/web environments (`CLAUDE_CODE_REMOTE=true`)
|
|
16
|
+
2. Detects the package manager from lock files (bun, pnpm, yarn, npm)
|
|
17
|
+
3. Runs package installation
|
|
18
|
+
4. Installs Gitleaks for secret detection (used by pre-commit hook)
|
|
19
|
+
5. Installs Playwright's bundled Chromium for Lighthouse CI
|
|
20
|
+
6. Exports `CHROME_PATH` to `.claude/env.local` and `~/.bashrc`
|
|
21
|
+
|
|
22
|
+
#### Tools Installed
|
|
23
|
+
|
|
24
|
+
| Tool | Purpose | Used By |
|
|
25
|
+
|------|---------|---------|
|
|
26
|
+
| Gitleaks | Secret detection in commits | pre-commit hook |
|
|
27
|
+
| Chromium | Headless browser for Lighthouse | `bun run lighthouse:check` |
|
|
28
|
+
|
|
29
|
+
#### Environment Variables Set
|
|
30
|
+
|
|
31
|
+
- `CHROME_PATH`: Path to Playwright's Chromium binary, required for Lighthouse CI
|
|
32
|
+
|
|
33
|
+
#### Configuration
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"hooks": {
|
|
38
|
+
"SessionStart": [
|
|
39
|
+
{
|
|
40
|
+
"matcher": "startup",
|
|
41
|
+
"hooks": [
|
|
42
|
+
{
|
|
43
|
+
"type": "command",
|
|
44
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/install_pkgs.sh",
|
|
45
|
+
"timeout": 480
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
#### Running Lighthouse Check
|
|
55
|
+
|
|
56
|
+
After the session starts, you can run Lighthouse:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Source env.local if CHROME_PATH not in current shell
|
|
60
|
+
source .claude/env.local 2>/dev/null || true
|
|
61
|
+
bun run lighthouse:check
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
### lint-on-edit.sh
|
|
67
|
+
|
|
68
|
+
**Type**: PostToolUse hook
|
|
69
|
+
**Trigger**: After Claude uses the Edit tool
|
|
70
|
+
**Purpose**: Automatically runs ESLint with --fix on TypeScript files after Claude edits them to fix linting issues
|
|
71
|
+
|
|
72
|
+
#### How it works
|
|
73
|
+
|
|
74
|
+
1. The hook is triggered whenever Claude successfully uses the Edit tool
|
|
75
|
+
2. It extracts the file path from the Edit tool's input
|
|
76
|
+
3. Checks if the file is a TypeScript file (`.ts`, `.tsx`)
|
|
77
|
+
4. Checks if the file is in a lintable directory (`src/`, `apps/`, `libs/`, or `test/`)
|
|
78
|
+
5. Detects the project's package manager from lock files (bun, pnpm, yarn, npm)
|
|
79
|
+
6. Runs ESLint with --fix on the specific file using the detected package manager
|
|
80
|
+
7. Provides feedback about linting results and auto-fixes applied
|
|
81
|
+
|
|
82
|
+
#### Features
|
|
83
|
+
|
|
84
|
+
- **Auto-fixing**: Automatically fixes ESLint issues that can be fixed programmatically
|
|
85
|
+
- **Targeted linting**: Only lints the specific edited file, not the entire codebase
|
|
86
|
+
- **Directory filtering**: Only lints files in configured directories (src, apps, libs, test)
|
|
87
|
+
- **Graceful error handling**: Never interrupts Claude's workflow, even if linting fails
|
|
88
|
+
- **Clear feedback**: Distinguishes between "no issues", "fixed issues", and "unfixable issues"
|
|
89
|
+
|
|
90
|
+
#### Supported File Types
|
|
91
|
+
|
|
92
|
+
- TypeScript (`.ts`, `.tsx`)
|
|
93
|
+
|
|
94
|
+
### format-on-edit.sh
|
|
95
|
+
|
|
96
|
+
**Type**: PostToolUse hook
|
|
97
|
+
**Trigger**: After Claude uses the Edit tool
|
|
98
|
+
**Purpose**: Automatically formats TypeScript, JavaScript, and JSON files with Prettier after Claude edits them
|
|
99
|
+
|
|
100
|
+
#### How it works
|
|
101
|
+
|
|
102
|
+
1. The hook is triggered whenever Claude successfully uses the Edit tool
|
|
103
|
+
2. It extracts the file path from the Edit tool's input
|
|
104
|
+
3. Checks if the file is a supported type (`.ts`, `.tsx`, `.js`, `.jsx`, `.json`)
|
|
105
|
+
4. Detects the project's package manager from lock files (bun, pnpm, yarn, npm)
|
|
106
|
+
5. Runs Prettier on the specific file using the detected package manager
|
|
107
|
+
6. Provides feedback about the formatting result
|
|
108
|
+
|
|
109
|
+
#### Configuration
|
|
110
|
+
|
|
111
|
+
Both hooks are configured in `.claude/settings.json`:
|
|
112
|
+
|
|
113
|
+
```json
|
|
114
|
+
{
|
|
115
|
+
"hooks": {
|
|
116
|
+
"PostToolUse": [
|
|
117
|
+
{
|
|
118
|
+
"matcher": "Edit",
|
|
119
|
+
"hooks": [
|
|
120
|
+
{
|
|
121
|
+
"type": "command",
|
|
122
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/lint-on-edit.sh",
|
|
123
|
+
"timeout": 15
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"type": "command",
|
|
127
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/format-on-edit.sh",
|
|
128
|
+
"timeout": 10
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Note: The hooks run in order. ESLint runs first to fix linting issues, then Prettier runs to format the code.
|
|
138
|
+
|
|
139
|
+
#### Features
|
|
140
|
+
|
|
141
|
+
- **Graceful error handling**: Never interrupts Claude's workflow, even if formatting fails
|
|
142
|
+
- **File type filtering**: Only formats supported file types
|
|
143
|
+
- **Clear feedback**: Provides informative messages about what's happening
|
|
144
|
+
- **Performance**: Only formats the specific edited file, not the entire codebase
|
|
145
|
+
|
|
146
|
+
#### Supported File Types
|
|
147
|
+
|
|
148
|
+
- TypeScript (`.ts`, `.tsx`)
|
|
149
|
+
- JavaScript (`.js`, `.jsx`)
|
|
150
|
+
- JSON (`.json`)
|
|
151
|
+
|
|
152
|
+
#### References
|
|
153
|
+
|
|
154
|
+
- [Claude Code Hooks Guide](https://docs.claude.com/en/docs/claude-code/hooks-guide)
|
|
155
|
+
- [Hooks Reference](https://docs.claude.com/en/docs/claude-code/hooks)
|
|
156
|
+
|
|
157
|
+
### notify-ntfy.sh
|
|
158
|
+
|
|
159
|
+
**Type**: Notification and Stop hooks
|
|
160
|
+
**Trigger**: When Claude needs permission, is idle 60+ seconds, or finishes a task
|
|
161
|
+
**Purpose**: Sends desktop and mobile push notifications via ntfy.sh with rich context
|
|
162
|
+
|
|
163
|
+
#### How it works
|
|
164
|
+
|
|
165
|
+
1. The hook reads JSON input from Claude Code containing event details
|
|
166
|
+
2. Extracts the hook event name, notification type, session ID, and transcript path
|
|
167
|
+
3. Detects the source environment (Web vs Local) via `CLAUDE_CODE_REMOTE`
|
|
168
|
+
4. For Stop events, parses the transcript to extract a task summary
|
|
169
|
+
5. Determines appropriate title, message, and priority based on the event
|
|
170
|
+
6. Sends a push notification to your ntfy.sh topic with full context
|
|
171
|
+
7. Silently exits if NTFY_TOPIC is not configured
|
|
172
|
+
|
|
173
|
+
#### Notification Content
|
|
174
|
+
|
|
175
|
+
Notifications include:
|
|
176
|
+
- **Source indicator** - `[Web]` or `[Local]` in the title to identify where Claude is running
|
|
177
|
+
- **Session ID** - First 8 characters for correlating notifications with sessions
|
|
178
|
+
- **Project name** - Which project the task was in
|
|
179
|
+
- **Task summary** - For Stop events, the last assistant message (truncated to 100 chars)
|
|
180
|
+
|
|
181
|
+
Example notification:
|
|
182
|
+
```text
|
|
183
|
+
Title: Claude [Web] - Finished
|
|
184
|
+
Body: Session: eb5b0174 | thumbwar-backend
|
|
185
|
+
Enhanced ntfy hooks to include session ID, source, and task summary
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
#### Setup Instructions
|
|
189
|
+
|
|
190
|
+
1. **Install ntfy app on your mobile device:**
|
|
191
|
+
- iOS: [App Store](https://apps.apple.com/app/ntfy/id1625396347)
|
|
192
|
+
- Android: [Google Play](https://play.google.com/store/apps/details?id=io.heckel.ntfy) or [F-Droid](https://f-droid.org/packages/io.heckel.ntfy/)
|
|
193
|
+
|
|
194
|
+
2. **Subscribe to a unique topic in the app:**
|
|
195
|
+
- Open the ntfy app
|
|
196
|
+
- Tap "+" to subscribe to a topic
|
|
197
|
+
- Enter a unique topic name (e.g., `my-claude-alerts-abc123`)
|
|
198
|
+
- Use something random/unique - topics are public by default
|
|
199
|
+
|
|
200
|
+
3. **Set the NTFY_TOPIC environment variable** (choose one):
|
|
201
|
+
|
|
202
|
+
**Option A - Project-local config (recommended for Claude Code web):**
|
|
203
|
+
```bash
|
|
204
|
+
cp .claude/env.local.template .claude/env.local
|
|
205
|
+
# Edit .claude/env.local and set your topic
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**Option B - User-global config (applies to all projects):**
|
|
209
|
+
```bash
|
|
210
|
+
mkdir -p ~/.claude
|
|
211
|
+
echo 'export NTFY_TOPIC="my-claude-alerts-abc123"' >> ~/.claude/env.local
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**Option C - Shell profile (traditional):**
|
|
215
|
+
Add to `~/.bashrc` or `~/.zshrc`:
|
|
216
|
+
```bash
|
|
217
|
+
export NTFY_TOPIC="my-claude-alerts-abc123"
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
4. **Test the setup:**
|
|
221
|
+
```bash
|
|
222
|
+
curl -d "Test notification" ntfy.sh/$NTFY_TOPIC
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
#### Notification Types
|
|
226
|
+
|
|
227
|
+
| Event | Trigger | Priority | Title Format | Body Format |
|
|
228
|
+
|-------|---------|----------|--------------|-------------|
|
|
229
|
+
| `permission_prompt` | Claude needs tool permission | High | `Claude [Source] - Permission Required` | Session ID + message |
|
|
230
|
+
| `idle_prompt` | Claude idle 60+ seconds | Default | `Claude [Source] - Waiting` | Session ID + message |
|
|
231
|
+
| `Stop` | Claude finishes responding | Default | `Claude [Source] - Finished` | Session ID + project + task summary |
|
|
232
|
+
| `SubagentStop` | Background agent finishes | Low | `Claude [Source] - Subagent Done` | Session ID + project + task summary |
|
|
233
|
+
|
|
234
|
+
#### Features
|
|
235
|
+
|
|
236
|
+
- **Cross-platform**: Works on iOS, Android, and desktop (via ntfy web/app)
|
|
237
|
+
- **Source detection**: Shows `[Web]` or `[Local]` so you know where Claude is running
|
|
238
|
+
- **Session tracking**: Includes session ID for correlating notifications
|
|
239
|
+
- **Task summaries**: Stop events include a summary of what Claude accomplished
|
|
240
|
+
- **Priority levels**: Permission requests are high priority for immediate attention
|
|
241
|
+
- **Emoji tags**: Visual indicators in notifications (warning, hourglass, checkmark)
|
|
242
|
+
- **Graceful degradation**: Silently skips if NTFY_TOPIC not configured
|
|
243
|
+
- **No account required**: ntfy.sh works without registration
|
|
244
|
+
|
|
245
|
+
#### Configuration
|
|
246
|
+
|
|
247
|
+
The hook is configured in `.claude/settings.json`:
|
|
248
|
+
|
|
249
|
+
```json
|
|
250
|
+
{
|
|
251
|
+
"hooks": {
|
|
252
|
+
"Notification": [
|
|
253
|
+
{
|
|
254
|
+
"matcher": "permission_prompt|idle_prompt",
|
|
255
|
+
"hooks": [
|
|
256
|
+
{
|
|
257
|
+
"type": "command",
|
|
258
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/notify-ntfy.sh",
|
|
259
|
+
"timeout": 5
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
"Stop": [
|
|
265
|
+
{
|
|
266
|
+
"matcher": "",
|
|
267
|
+
"hooks": [
|
|
268
|
+
{
|
|
269
|
+
"type": "command",
|
|
270
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/notify-ntfy.sh",
|
|
271
|
+
"timeout": 5
|
|
272
|
+
}
|
|
273
|
+
]
|
|
274
|
+
}
|
|
275
|
+
]
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
#### Privacy Note
|
|
281
|
+
|
|
282
|
+
ntfy.sh topics are public by default. Use a unique, hard-to-guess topic name. For private notifications, you can [self-host ntfy](https://docs.ntfy.sh/install/) or use [ntfy.sh access control](https://docs.ntfy.sh/publish/#access-control).
|
|
283
|
+
|
|
284
|
+
## Adding New Hooks
|
|
285
|
+
|
|
286
|
+
To add a new hook:
|
|
287
|
+
|
|
288
|
+
1. Create a new shell script in this directory
|
|
289
|
+
2. Make it executable: `chmod +x your-hook.sh`
|
|
290
|
+
3. Add the hook configuration to `.claude/settings.json`
|
|
291
|
+
4. Test the hook by triggering the appropriate action
|
|
292
|
+
5. Document the hook in this README
|
|
293
|
+
|
|
294
|
+
## Troubleshooting
|
|
295
|
+
|
|
296
|
+
If a hook isn't working:
|
|
297
|
+
|
|
298
|
+
1. Check that the script is executable
|
|
299
|
+
2. Verify the path in `settings.json` is correct
|
|
300
|
+
3. Test the script manually with sample JSON input
|
|
301
|
+
4. Check Claude Code logs for error messages
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# =============================================================================
|
|
3
|
+
# ntfy.sh Notification Hook for Claude Code
|
|
4
|
+
# =============================================================================
|
|
5
|
+
# Sends desktop and mobile notifications via ntfy.sh when Claude needs
|
|
6
|
+
# attention or finishes a task.
|
|
7
|
+
#
|
|
8
|
+
# Setup:
|
|
9
|
+
# 1. Install ntfy app on mobile (iOS App Store / Android Play Store)
|
|
10
|
+
# 2. Subscribe to your unique topic in the app
|
|
11
|
+
# 3. Set NTFY_TOPIC environment variable (e.g., in ~/.bashrc or ~/.zshrc):
|
|
12
|
+
# export NTFY_TOPIC="my-claude-alerts-xyz123"
|
|
13
|
+
#
|
|
14
|
+
# @see https://ntfy.sh
|
|
15
|
+
# =============================================================================
|
|
16
|
+
|
|
17
|
+
# Read JSON input from stdin
|
|
18
|
+
INPUT=$(cat)
|
|
19
|
+
|
|
20
|
+
# Extract hook event name
|
|
21
|
+
HOOK_EVENT=$(echo "$INPUT" | grep -o '"hook_event_name"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*: *"//' | sed 's/"$//')
|
|
22
|
+
|
|
23
|
+
# Extract notification type (for Notification hooks)
|
|
24
|
+
NOTIFICATION_TYPE=$(echo "$INPUT" | grep -o '"notification_type"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*: *"//' | sed 's/"$//')
|
|
25
|
+
|
|
26
|
+
# Extract message if available
|
|
27
|
+
MESSAGE=$(echo "$INPUT" | grep -o '"message"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*: *"//' | sed 's/"$//')
|
|
28
|
+
|
|
29
|
+
# Extract session ID (first 8 chars for brevity)
|
|
30
|
+
FULL_SESSION_ID=$(echo "$INPUT" | grep -o '"session_id"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*: *"//' | sed 's/"$//')
|
|
31
|
+
SESSION_ID="${FULL_SESSION_ID:0:8}"
|
|
32
|
+
|
|
33
|
+
# Extract transcript path for task summary
|
|
34
|
+
TRANSCRIPT_PATH=$(echo "$INPUT" | grep -o '"transcript_path"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*: *"//' | sed 's/"$//')
|
|
35
|
+
|
|
36
|
+
# Determine source (Web vs Local)
|
|
37
|
+
if [ "$CLAUDE_CODE_REMOTE" = "true" ]; then
|
|
38
|
+
SOURCE="Web"
|
|
39
|
+
else
|
|
40
|
+
SOURCE="Local"
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
# Get project name from current directory
|
|
44
|
+
PROJECT_NAME=$(basename "$CLAUDE_PROJECT_DIR" 2>/dev/null || basename "$(pwd)")
|
|
45
|
+
|
|
46
|
+
# Load NTFY_TOPIC from local config if not already set
|
|
47
|
+
if [ -z "$NTFY_TOPIC" ]; then
|
|
48
|
+
# Check for project-local config (gitignored)
|
|
49
|
+
if [ -f "$CLAUDE_PROJECT_DIR/.claude/env.local" ]; then
|
|
50
|
+
# shellcheck source=/dev/null
|
|
51
|
+
source "$CLAUDE_PROJECT_DIR/.claude/env.local"
|
|
52
|
+
fi
|
|
53
|
+
# Check for user-global config
|
|
54
|
+
if [ -z "$NTFY_TOPIC" ] && [ -f "$HOME/.claude/env.local" ]; then
|
|
55
|
+
# shellcheck source=/dev/null
|
|
56
|
+
source "$HOME/.claude/env.local"
|
|
57
|
+
fi
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
# Exit silently if still not configured
|
|
61
|
+
if [ -z "$NTFY_TOPIC" ]; then
|
|
62
|
+
exit 0
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
# Extract task summary from transcript (last assistant message, truncated)
|
|
66
|
+
TASK_SUMMARY=""
|
|
67
|
+
if [ -n "$TRANSCRIPT_PATH" ] && [ -f "$TRANSCRIPT_PATH" ]; then
|
|
68
|
+
# Get the last assistant message from the JSONL transcript
|
|
69
|
+
# The transcript contains lines with "type":"assistant" and "message" content
|
|
70
|
+
# Use awk for cross-platform compatibility (tac is not available on macOS)
|
|
71
|
+
LAST_ASSISTANT=$(awk '/"type"[[:space:]]*:[[:space:]]*"assistant"/{line=$0} END{if(line) print line}' "$TRANSCRIPT_PATH" 2>/dev/null)
|
|
72
|
+
if [ -n "$LAST_ASSISTANT" ]; then
|
|
73
|
+
# Extract the message content - look for text content in the message
|
|
74
|
+
# Format: {"message":{"content":[{"type":"text","text":"..."}]}}
|
|
75
|
+
# Use jq for robust JSON parsing when available, fallback to grep/sed
|
|
76
|
+
if command -v jq >/dev/null 2>&1; then
|
|
77
|
+
RAW_SUMMARY=$(echo "$LAST_ASSISTANT" | jq -r '.message.content[] | select(.type == "text") | .text' 2>/dev/null | head -1)
|
|
78
|
+
else
|
|
79
|
+
# Fallback: simple regex extraction (may fail on escaped quotes)
|
|
80
|
+
RAW_SUMMARY=$(echo "$LAST_ASSISTANT" | grep -o '"text"[[:space:]]*:[[:space:]]*"[^"]*"' | head -1 | sed 's/.*: *"//' | sed 's/"$//')
|
|
81
|
+
fi
|
|
82
|
+
if [ -n "$RAW_SUMMARY" ]; then
|
|
83
|
+
# Truncate to 100 chars and clean up newlines
|
|
84
|
+
TASK_SUMMARY=$(echo "$RAW_SUMMARY" | tr '\n' ' ' | cut -c1-100)
|
|
85
|
+
# Add ellipsis if truncated
|
|
86
|
+
if [ ${#RAW_SUMMARY} -gt 100 ]; then
|
|
87
|
+
TASK_SUMMARY="${TASK_SUMMARY}..."
|
|
88
|
+
fi
|
|
89
|
+
fi
|
|
90
|
+
fi
|
|
91
|
+
fi
|
|
92
|
+
|
|
93
|
+
# Build session info string (shown in body)
|
|
94
|
+
SESSION_INFO=""
|
|
95
|
+
if [ -n "$SESSION_ID" ]; then
|
|
96
|
+
SESSION_INFO="Session: $SESSION_ID"
|
|
97
|
+
fi
|
|
98
|
+
|
|
99
|
+
# Determine notification title and body based on hook type
|
|
100
|
+
case "$HOOK_EVENT" in
|
|
101
|
+
"Notification")
|
|
102
|
+
case "$NOTIFICATION_TYPE" in
|
|
103
|
+
"permission_prompt")
|
|
104
|
+
TITLE="Claude [$SOURCE] - Permission Required"
|
|
105
|
+
BODY="${MESSAGE:-Claude needs your permission to continue}"
|
|
106
|
+
if [ -n "$SESSION_INFO" ]; then
|
|
107
|
+
BODY="$SESSION_INFO
|
|
108
|
+
$BODY"
|
|
109
|
+
fi
|
|
110
|
+
PRIORITY="high"
|
|
111
|
+
TAGS="warning"
|
|
112
|
+
;;
|
|
113
|
+
"idle_prompt")
|
|
114
|
+
TITLE="Claude [$SOURCE] - Waiting"
|
|
115
|
+
BODY="${MESSAGE:-Claude is waiting for your input}"
|
|
116
|
+
if [ -n "$SESSION_INFO" ]; then
|
|
117
|
+
BODY="$SESSION_INFO
|
|
118
|
+
$BODY"
|
|
119
|
+
fi
|
|
120
|
+
PRIORITY="default"
|
|
121
|
+
TAGS="hourglass"
|
|
122
|
+
;;
|
|
123
|
+
*)
|
|
124
|
+
TITLE="Claude [$SOURCE] - Attention"
|
|
125
|
+
BODY="${MESSAGE:-Claude needs your attention}"
|
|
126
|
+
if [ -n "$SESSION_INFO" ]; then
|
|
127
|
+
BODY="$SESSION_INFO
|
|
128
|
+
$BODY"
|
|
129
|
+
fi
|
|
130
|
+
PRIORITY="default"
|
|
131
|
+
TAGS="bell"
|
|
132
|
+
;;
|
|
133
|
+
esac
|
|
134
|
+
;;
|
|
135
|
+
"Stop")
|
|
136
|
+
TITLE="Claude [$SOURCE] - Finished"
|
|
137
|
+
BODY="$PROJECT_NAME"
|
|
138
|
+
if [ -n "$SESSION_INFO" ]; then
|
|
139
|
+
BODY="$SESSION_INFO | $BODY"
|
|
140
|
+
fi
|
|
141
|
+
if [ -n "$TASK_SUMMARY" ]; then
|
|
142
|
+
BODY="$BODY
|
|
143
|
+
$TASK_SUMMARY"
|
|
144
|
+
fi
|
|
145
|
+
PRIORITY="default"
|
|
146
|
+
TAGS="white_check_mark"
|
|
147
|
+
;;
|
|
148
|
+
"SubagentStop")
|
|
149
|
+
TITLE="Claude [$SOURCE] - Subagent Done"
|
|
150
|
+
BODY="$PROJECT_NAME"
|
|
151
|
+
if [ -n "$SESSION_INFO" ]; then
|
|
152
|
+
BODY="$SESSION_INFO | $BODY"
|
|
153
|
+
fi
|
|
154
|
+
if [ -n "$TASK_SUMMARY" ]; then
|
|
155
|
+
BODY="$BODY
|
|
156
|
+
$TASK_SUMMARY"
|
|
157
|
+
fi
|
|
158
|
+
PRIORITY="low"
|
|
159
|
+
TAGS="checkered_flag"
|
|
160
|
+
;;
|
|
161
|
+
*)
|
|
162
|
+
TITLE="Claude [$SOURCE]"
|
|
163
|
+
BODY="${MESSAGE:-Event: $HOOK_EVENT}"
|
|
164
|
+
if [ -n "$SESSION_INFO" ]; then
|
|
165
|
+
BODY="$SESSION_INFO
|
|
166
|
+
$BODY"
|
|
167
|
+
fi
|
|
168
|
+
PRIORITY="default"
|
|
169
|
+
TAGS="robot"
|
|
170
|
+
;;
|
|
171
|
+
esac
|
|
172
|
+
|
|
173
|
+
# Send notification via ntfy.sh
|
|
174
|
+
curl -s \
|
|
175
|
+
-H "Title: $TITLE" \
|
|
176
|
+
-H "Priority: $PRIORITY" \
|
|
177
|
+
-H "Tags: $TAGS" \
|
|
178
|
+
-d "$BODY" \
|
|
179
|
+
"https://ntfy.sh/$NTFY_TOPIC" > /dev/null 2>&1
|
|
180
|
+
|
|
181
|
+
exit 0
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"BASH_DEFAULT_TIMEOUT_MS": "1800000",
|
|
4
|
+
"BASH_MAX_TIMEOUT_MS": "7200000"
|
|
5
|
+
},
|
|
6
|
+
"includeCoAuthoredBy": true,
|
|
7
|
+
"hooks": {
|
|
8
|
+
"Notification": [
|
|
9
|
+
{
|
|
10
|
+
"matcher": "permission_prompt|idle_prompt",
|
|
11
|
+
"hooks": [
|
|
12
|
+
{
|
|
13
|
+
"type": "command",
|
|
14
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/notify-ntfy.sh",
|
|
15
|
+
"timeout": 5
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"Stop": [
|
|
21
|
+
{
|
|
22
|
+
"matcher": "",
|
|
23
|
+
"hooks": [
|
|
24
|
+
{
|
|
25
|
+
"type": "command",
|
|
26
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/notify-ntfy.sh",
|
|
27
|
+
"timeout": 5
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"enabledPlugins": {
|
|
34
|
+
"typescript-lsp@claude-plugins-official": true,
|
|
35
|
+
"safety-net@cc-marketplace": true,
|
|
36
|
+
"code-simplifier@claude-plugins-official": true,
|
|
37
|
+
"code-review@claude-plugins-official": true,
|
|
38
|
+
"beads@beads-marketplace": true,
|
|
39
|
+
"playwright@claude-plugins-official": true
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"BRAVE_API_KEY": "xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
|
4
|
+
"FIRECRAWL_API_KEY": "xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
|
5
|
+
"GITHUB_PERSONAL_ACCESS_TOKEN": "xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
|
6
|
+
"CONTEXT7_API_KEY": "xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
|
7
|
+
"MEMORY_PATH": ".ai/memory.jsonl"
|
|
8
|
+
},
|
|
9
|
+
"permissions": {
|
|
10
|
+
"allow": ["Bash(git add:*)"],
|
|
11
|
+
"deny": []
|
|
12
|
+
},
|
|
13
|
+
"enableAllProjectMcpServers": true
|
|
14
|
+
}
|