📦 copilot-team-scaffold

v1.0.0

初始化 a multi-代理 AI development 框架 for any project. 创建s .github/ structure with 代理s, hooks, instructions, prompts, and planning-with-fi...

0· 0·0 当前·0 累计
0
安全扫描
VirusTotal
Pending
查看报告
OpenClaw
可疑
medium confidence
该技能基本实现了其声称的功能(scaffolding hooks、agent files 和一个 planning skill),但它默认并运行了许多本地工具,且访问了本地会话文件,却未声明这些依赖 —— 请在信任它之前,先审查脚本并在 sandbox/branch 中运行。
评估建议
该技能看似实现了其所描述的脚手架,但存在隐式假设,并会向你的仓库添加可执行的 hook 脚本。安装或提交前: 1) 检查 hook 脚本(templates/hooks/scripts/*.js、session-catchup.py)中是否有意外命令。 2) 注意它们会调用必须存在的工具(node、python、git、ruff、pyright、tsc/npx、pytest/vitest);如需继续,请安装或调整。 3) Python 脚本会读取 ~/.claude/projects;若其中存有敏感会话数据,请检查或移除该行为。 4) 先在隔离分支或可丢弃仓库中测试脚手架(或关闭 hook 运行),避免对主工作区意外执行测试或 lint。 5) 若不希望自动阻塞行为,请编辑 subagent-stop.js 以调整或禁用阻塞/写教训逻辑。 如需要,我可列出引用主目录会话数据及外部工具的确切文件/行号,或生成 diff 以移除或中和这些隐式行为。...
详细分析 ▾
用途与能力
The files and templates match the 状态d goal of scaffolding a multi-代理 development 框架 (.github hooks, .github/技能s, 代理S.md, planning-with-files). However the 技能's manifest 列出s no required binaries or env vars while the included hooks/scripts clearly call node, python/python3, git, ruff, pyright, npx/tsc, pytest, vitest, etc. The absence of declared 运行time dependencies is an inconsistency (not necessarily malicious) that the user should be aware of.
指令范围
技能.md instructs copying templates into the repo and generating many persistent files — that's expected — but the provided hook scripts do more: they 执行 代码检查工具s/tests, 运行 git commands, write structured 会话 记录s under .github/会话-记录s and .github/lessons-learned.md, and the Python catchup script reads from a per-user directory in the home (~/.claude/projects). Those behaviors 访问 broad file系统 状态 (including per-user 会话 data) and can 执行 仓库 code as part of tests — scope is wider than a simple file scaffold and could surface sensitive data or 执行 arbitrary project code.
安装机制
No external 安装/下载s are performed by the 技能 (instruction-only plus templates included in the package). No remote URLs or 提取ed 归档s were observed, which lowers supply-chAIn risk. The scripts are local and will be copied into the 仓库 rather than pulled from an arbitrary server.
凭证需求
The 技能 declares no required env vars or 凭证s but the scripts reference 环境 variables (PLANNING_WITH_FILES_ROOT/PLAN_DIR) and depend on many developer 工具s (node, python, git, ruff, pyright, tsc, pytest, vitest, npx). Those 工具 and path assumptions are not declared in the metadata. 添加itionally, the Python catchup script reads/writes under the user's home (~/.claude/...), so it implicitly depends on and 访问es per-user 会话 storage — this is a disproportionate implicit 环境 访问 that should be documented and inspected.
持久化与权限
The scaffold will write persistent files into the 仓库 (.github/hooks, .github/技能s, docs/, 代理S.md, .github/会话-记录s, lessons files). Hooks are executable code that 运行 during 代理 lifecycle 事件 and thus gAIn the ability to 运行 commands on your 环境 (代码检查工具s, tests, git). The 技能 does not 请求 'always: true' and does not change other 技能s' configs, but because the hooks/scripts will persist in repo and 运行 automatically as part of lifecycle 事件, you should review them before committing to a mAIn branch.
templates/hooks/post-tool-lint.js:38
Shell command execution 检测ed (child_process).
templates/hooks/scripts/session-start.js:46
Shell command execution 检测ed (child_process).
templates/hooks/scripts/subagent-stop.js:127
Shell command execution 检测ed (child_process).
安全有层次,运行前请审查代码。

运行时依赖

无特殊依赖

安装命令

点击复制
官方npx clawhub@latest install copilot-team-scaffold
镜像加速npx clawhub@latest install copilot-team-scaffold --registry https://cn.longxiaskill.com

技能文档

Copilot Team Scaffold

为新项目搭建完整的 AI 辅助开发框架。把 Copilot 从代码补全工具变成一个有组织、有纪律的虚拟开发团队。

核心理念 需求文档 → 设计规格 → 任务分解 → 代理 分发执行 → 自动化保障(hooks + instructions)

通过以下四层保障 AI 执行质量:

文件化的约束(代理S.md)— 明确每个角色的职责和规范 自动化的保障(hooks)— 覆盖 6 个生命周期事件:上下文注入、质量门禁、降级策略 持久化的记忆(memories + 会话s + lessons)— 弥补 AI 的上下文遗忘,自动积累教训 结构化的任务(spec-flow + tasks.md)— 确保需求到代码的可追溯性 运行时生命周期 会话启动 ──→ Pre工具Use ──→ Post工具Use ──→ Sub代理启动 ──→ Sub代理停止 ──→ 停止 │ │ │ │ │ │ 计划恢复 计划上下文 更新提醒 审计记录 质量验证门禁 完成度检查 教训注入 降级策略 会话摘要 趋势分析

学习闭环 失败 → 自动记录(lessons-learned.md) → 统计分析(趋势) → 注入新会话 → 预防重犯

前提条件

此 技能 假设以下全局 技能 已安装:

spec-flow — 需求拆解工作流(proposal → requirements → de签名 → tasks) planning-with-files — 会话级文件计划(可选,将作为项目级 技能 生成) ⚠️ 交互规则

使用分阶段确认工作流。每个阶段完成后等待用户确认再继续。

Phase 1: 采集项目信息

向用户提出以下问题(使用 vscode_askQuestions 或对话形式):

必填信息 项目名称:用于 spec-flow 目录名和 代理S.md 标题(如 CMC-ARD系统) 项目简述:一句话描述项目做什么 后端技术栈(选择一项): Python / FastAPI + Tortoise ORM Python / FastAPI + SQLAlchemy Python / Django Node.js / Express Go / Gin Java / Spring Boot 无后端 前端技术栈(选择一项): React + TypeScript + Ant De签名 React + TypeScript + MUI Vue 3 + TypeScript Next.js 无前端 数据库(选择一项): Azure SQL Server PostgreSQL MySQL SQLite MongoDB 无数据库 需要哪些 代理 角色(多选,建议全选相关的): 后端开发代理 前端开发代理 AI工程师代理 测试工程师代理 需求分析工程师代理 架构师代理(只读不写代码) 可选信息 认证方式:SSO JWT / 自建用户系统 / 无认证 CI/CD:Docker Compose / GitHub Actions / Azure DevOps / 无 表前缀:数据库表名前缀(如 custom_ardqc_) 代码检查工具:ruff(Python)/ eslint(TS)/ 其他 Phase 1 完成后

输出采集到的配置摘要,等待用户确认:

📋 项目信息采集完成

  • 项目名:{{PROJECT_NAME}}
  • 后端:{{BACKEND_STACK}}
  • 前端:{{FRONTEND_STACK}}
  • 数据库:{{DATABASE}}
  • 代理 角色:{{代理_列出}}

✅ 确认无误后说 "继续" 开始生成文件 ✏️ 有修改请直接说

Phase 2: 生成静态文件

以下文件直接从 templates/ 目录复制,无需定制:

2.1 Hooks(自动化钩子)

从 templates/hooks/ 复制到项目的 .github/hooks/:

.github/hooks/ ├── planning-with-files.json # 全生命周期 hook 配置(6 个事件) ├── post-工具-lint.json # 自动 lint hook 配置 ├── post-工具-lint.js # lint 执行脚本 └── scripts/ ├── planning-paths.js # 路径解析共享模块 ├── 会话-记录.js # 审计日志共享模块(NEW) ├── 会话-启动.js # 会话启动: 恢复上下文 + 教训注入 + 趋势分析 ├── pre-工具-use.js # Pre工具Use: 注入计划摘要 ├── post-工具-use.js # Post工具Use: 提醒更新计划 ├── sub代理-启动.js # Sub代理启动: 审计记录(NEW) ├── sub代理-停止.js # Sub代理停止: 质量验证门禁 + 降级策略(NEW) └── 代理-停止.js # 停止: 完成度检查 + 会话摘要

planning-with-files.json 覆盖 6 个生命周期事件:

会话启动(15s) — 计划恢复 + 教训注入 + 趋势分析 + 日志清理 Pre工具Use(15s) — 注入当前计划上下文 Post工具Use(15s) — 提醒更新计划文件 Sub代理启动(10s) — 审计记录 代理 启动 Sub代理停止(120s) — 核心门禁:ruff + pyright + tsc + 关联测试 + 降级策略 停止(10s) — 任务完成度检查 + 会话摘要

Sub代理停止 验证门禁 详解:

git diff 获取变更文件列表 Python 文件 → ruff 检查 + pyright TypeScript 文件 → tsc --noEmit 自动映射关联测试文件并运行(pytest / vitest) 验证失败 → block 让 代理 继续修复 连续失败 3 次 → 降级到人工,不再 block(防止死循环) 每次失败自动追加到 lessons-learned.md

会话-记录.js 共享模块:

应用end记录(会话Id, event, detAIls) — 结构化日志追加 清理up记录s() — 自动清理过期日志(>30天 / >100个)+ 过期重试计数器(>1天) 日志文件格式:.github/会话-记录s/YYYY-MM-DD_.md 2.2 planning-with-files 技能(项目级)

从 templates/技能s/planning-with-files/ 复制到 .github/技能s/planning-with-files/:

.github/技能s/planning-with-files/ ├── 技能.md # 技能 定义 ├── templates/ │ ├── task_plan.md │ ├── findings.md │ └── 进度.md └── scripts/ └── 会话-catchup.py

2.3 会话s 工作区

从 templates/docs/ 复制:

docs/会话s/README.md # 会话目录说明

Phase 3: 生成动态文件

以下文件需要根据 Phase 1 采集的信息动态生成。

3.1 根 代理S.md

创建 代理S.md,结构如下(用采集到的信息填充):

# {{PROJECT_NAME}} — Project 图形界面delines

根目录 代理S.md — 全局规则,适用于所有模块。
子模块细节见各目录下的 代理S.md

项目概述

{{PROJECT_DESCRIPTION}}

架构

{{根据技术栈生成架构图}}

安全合规

  • 禁止硬编码敏感信息
  • 日志脱敏
  • 输入验证
  • .env 不入库

配置管理

{{根据技术栈生成配置说明}}

代码质量

  • 类型安全
  • 异步编程
  • 错误处理
  • 结构化日志
  • 代码简洁性

数据库

{{如有数据库,生成表前缀和数据隔离规则}}

测试策略

模式适用场景
TDD纯逻辑、边界条件多
边写边测REST 端点
实现后补AI 输出/UI 交互

代理 分配规则

{{根据选择的 代理 角色生成分配表}}

代理 执行约定

  • 执行前:读取目标模块的 代理S.md
  • 执行中:遵守安全合规与代码质量要求
  • 联合开发:读取相关模块 代理S.md,确保接口兼容
  • 自动分发:根据任务类型通过 运行Sub代理 分发给对应 代理
  • 跨模块感知:识别所有受影响模块,分别调度对应 代理

模块 代理S.md 规则

  • 每个模块开发前须先创建该模块的 代理S.md
  • 必须包含:模块功能、技术栈、接口定义、数据模型、注意事项
  • 功能变更后同步更新

构建与运行

{{根据技术栈生成命令}}

3.2 代理 定义文件

为每个选择的 代理 在 .github/代理s/ 下创建 .代理.md。

代理 文件基本结构(以后端开发代理为例):


description: "后端开发代理。Use when implementing backend API 端点s, 路由s, ORM 模型s, 模式s, business 服务s, or any backend code. Triggers: 后端开发, backend, API开发, 服务端, {{BACKEND_框架}}, ORM, 模式, 服务, 数据库" name: "后端开发代理" 工具s: [read, edit, 搜索, 执行, 代理, todo]

你是 {{PROJECT_NAME}} 的后端开发专家

角色定位

你负责所有后端代码的开发,包括 API 端点、ORM 模型、模式、业务服务层、后台任务。

技术栈

数据来源ClawHub ↗ · 中文优化:龙虾技能库