仓库上下文
sodejm2026-10-25查看 391复制 1956
扫描和分析仓库结构以识别语言、框架、IaC、CI/CD 管道和凭据。
📘如何使用这个技能
- 1复制技能内容·点击上方「Copy SKILL.md」复制全部内容,或 Download 下载到本地
- 2打开你的 AI 客户端·支持 Claude Code、Trae、Cursor、ChatGPT、DeepSeek、Kimi 等任意 AI 助手
- 3粘贴为系统提示/知识文件·Claude Code:放入 .claude/skills/ 目录;普通对话:作为首条消息发送并说「请严格按这份技能文档执行」
- 4直接提出你的需求·AI 会按技能定义的工作流、格式和约束来处理,无需再解释背景
💡 提示:技能生效后,每次对话只需一句需求,AI 会按 SKILL.md 的流程执行。
SKILL.md1428 chars
--- name: repository-context description: Scan and analyze repository structure to identify languages, frameworks, IaC, CI/CD pipelines, and credentials. --- # Repository Context Collector Skill This skill allows the agent to analyze a workspace or repository and gather critical architecture signals needed to customize security logging recommendations. ## Trigger Instructions Run this skill during the initial stage of workspace analysis. ## Core Capabilities 1. **Deterministic Scan**: Invoke `scripts/collect-repository-context.py` to examine files in the workspace. 2. **Metadata Discovery**: Parse configuration manifests and package descriptors to identify: - Languages and frameworks (e.g., Node.js, Python, Go, Java) - Datastores (e.g., PostgreSQL, MongoDB, Redis) - Cloud providers (AWS, GCP, Azure) via IaC and configuration files - Identity & Authentication systems (JWT, OAuth, Keycloak, Auth0) - CI/CD pipelines (GitHub Actions, GitLab CI, Jenkins) 3. **Data Classification**: Identify sensitive entrypoints, public endpoints, and data flows to map data zones. 4. **Secrets Detection**: Check for credential patterns (e.g., API keys, passwords, database URLs). Report locations for technology context, but **never** copy or display the secret value. ## Output Generation Save the output of this scan as a JSON/markdown payload matching the schema defined in `assets/repository-context.md`.