{"id":50354179,"url":"https://github.com/52lu/claude-code-extend","last_synced_at":"2026-05-29T22:00:52.141Z","repository":{"id":353318852,"uuid":"1218101272","full_name":"52lu/claude-code-extend","owner":"52lu","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-23T04:13:06.000Z","size":199,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-23T06:26:17.284Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/52lu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-22T14:32:15.000Z","updated_at":"2026-05-23T04:13:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/52lu/claude-code-extend","commit_stats":null,"previous_names":["52lu/claude-code-extend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/52lu/claude-code-extend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/52lu%2Fclaude-code-extend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/52lu%2Fclaude-code-extend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/52lu%2Fclaude-code-extend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/52lu%2Fclaude-code-extend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/52lu","download_url":"https://codeload.github.com/52lu/claude-code-extend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/52lu%2Fclaude-code-extend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33672125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-29T22:00:51.351Z","updated_at":"2026-05-29T22:00:52.123Z","avatar_url":"https://github.com/52lu.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# claude-code-extend\n\nClaude Code hooks、agents 和工具脚本管理器。每个脚本独立安装，支持元数据驱动的发现和配置。\n\n## 快速安装\n\n```bash\n# 一键安装所有脚本（符号链接方式，git pull 即更新）\ngit clone https://github.com/52lu/claude-code-extend.git\ncd claude-code-extend\n./scripts/install.sh\n```\n\n或通过 curl：\n```bash\ncurl -fsSL https://raw.githubusercontent.com/52lu/claude-code-extend/main/scripts/install.sh | bash -s -- --repo /path/to/claude-code-extend\n```\n\n## 单脚本安装（npm）\n\n```bash\nnpx claude-extend install task-completed-notify\n```\n\n## CLI 命令\n\n```bash\nclaude-extend list                    # 列出可用脚本\nclaude-extend list --type hook        # 只列出 hooks\nclaude-extend install \u003cname\u003e          # 安装脚本\nclaude-extend uninstall \u003cname\u003e        # 卸载脚本\nclaude-extend installed               # 列出已安装脚本\nclaude-extend info \u003cname\u003e             # 查看脚本详情\n```\n\n## 可用脚本\n\n| 名称 | 类型 | 事件 | 说明 |\n|------|------|------|------|\n| session-guard | hook | Notification, Stop | 会话守护：空闲时检查/创建会话文件，结束时更新记录 |\n| task-completed-notify | hook | Stop | 任务完成时发送系统通知 |\n\n## 添加新脚本\n\n1. 在 `packages/\u003ctype\u003e/\u003cname\u003e/` 下创建脚本文件\n2. 在文件头部添加元数据注释：\n\n```bash\n#!/bin/bash\n# @claude-extend\n# @name my-new-hook\n# @type hook\n# @event PreToolUse\n# @description 我的新 hook\n# @version 0.1.0\n```\n\n3. 创建 `package.json`：\n```json\n{\n  \"name\": \"@claude-extend/hook-my-new-hook\",\n  \"version\": \"0.1.0\",\n  \"description\": \"My new hook\"\n}\n```\n\n4. 运行 `npm install` 注册到 workspaces\n5. 提交代码\n\n## 元数据字段\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| `@claude-extend` | 是 | 标记为 claude-extend 脚本 |\n| `@name` | 是 | 唯一标识符 |\n| `@type` | 是 | hook / agent / tool |\n| `@event` | hook 必填 | 事件类型，逗号分隔多事件（如 `Notification,Stop`） |\n| `@matcher` | 否 | 事件匹配器（如 `idle_prompt`），仅对首个事件生效 |\n| `@description` | 是 | 描述 |\n| `@dependencies` | 否 | 依赖的系统命令，逗号分隔 |\n| `@version` | 是 | 语义化版本 |\n\n## 安装目录\n\n脚本安装到 `~/.claude-extend/`，不污染 `~/.claude/`：\n\n```\n~/.claude-extend/\n├── hooks/\n│   └── task-completed-notify/ -\u003e /path/to/repo/packages/hooks/task-completed-notify/\n├── agents/\n└── tools/\n```\n\n## 开发\n\n```bash\nnpm install          # 安装依赖\nnpm run build        # 构建 CLI\nnpm test             # 运行测试\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F52lu%2Fclaude-code-extend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F52lu%2Fclaude-code-extend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F52lu%2Fclaude-code-extend/lists"}