template-usage
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "template-usage":https://skillpi.com/zh/skills/deepskill-f5dcd8ae0986421880b0e181ad1653528c9b55437f0459db6a3067e62b3ddb89。安装前核对上游来源和版本:https://github.com/harness/harness-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
通过 MCP v2 工具跟踪模板的依赖关系、使用情况与采用情况。查找引用指定模板的流水线或模板、分析更新影响、识别未使用模板并比较版本采用率。用于查询模板使用、模板引用、依赖关系或更新前影响分析;不用于创建或更新模板(请使用 create-template)。
介绍来源: third_party · harness · 1.0.0 参考来源
SkillPi 解读
- 能完成的任务
- 来源文档未说明。
- 适合谁
- 来源文档未说明。
- 输入和输出
- 来源文档未说明。
- 软件、账号及付费要求
- 来源文档未说明。
- 限制与区别
- 来源文档未说明。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: template-usage
description: >-
Track Harness template dependencies, usage, and adoption via MCP v2 tools. Find which pipelines
or other templates reference a given template, analyze update impact, identify unused templates,
and compare version adoption. Use when asked about template usage, template references, template
dependencies, impact analysis before updating a template, finding unused templates, or tracking
template adoption across projects. Trigger phrases: template usage, who uses template, template
references, template dependencies, template impact, unused templates, template adoption. Do NOT use
for creating or updating templates (use create-template instead).
metadata:
author: Harness
version: 1.0.0
mcp-server: harness-mcp-v2
license: Apache-2.0
compatibility: Requires Harness MCP v2 server (harness-mcp-v2)Template Usage Skill
Track template dependencies and usage across Harness via MCP v2 tools.
MCP v2 Tools Used
| Tool | Resource Type | Purpose |
|---|---|---|
harness_search |
template |
Find templates by keyword across orgs/projects |
harness_list |
template |
List templates, filter by scope |
harness_get |
template |
Get template details, versions, and usage references |
harness_describe |
template |
Discover template resource schema and fields |
Templates are managed via harness_list and harness_get only. For creating or updating templates, use the /create-template skill.
Template Types
| Type | Description |
|---|---|
Step |
Single step definition (build, test, deploy actions) |
Stage |
Complete stage with steps (CI stage, CD stage, approval) |
Pipeline |
Full pipeline definition |
StepGroup |
Group of related steps bundled together |
Template Scopes
| Scope | Visibility | Query Parameters |
|---|---|---|
| Account | All orgs and projects | No org_id, no project_id |
| Organization | All projects in the org | org_id only |
| Project | Only within the project | org_id + project_id |
Instructions
Step 1: Find the Template
Search by name or keyword:
harness_search(
query="docker-build-push",
resource_types=["template"],
max_per_type=10,
compact=true
)
Or list templates in a specific scope:
harness_list(
resource_type="template",
org_id="<org>",
project_id="<project>",
search_term="docker"
)
Step 2: Get Template Details
harness_get(
resource_type="template",
resource_id="<template_identifier>",
org_id="<org>",
project_id="<project>"
)
This returns the template definition, version history, and metadata.
Step 3: Check Usage References
harness_get(
resource_type="template",
resource_id="<template_identifier>",
org_id="<org>",
project_id="<project>"
)
Parse the response for referredEntities or usage data. The response includes which pipelines and other templates reference this template.
Step 4: Analyze and Present
Organize findings into a report.
For report templates (Usage Report, Impact Analysis, Unused Templates), consult references/report-templates.md.
Examples
Check who uses a template
/template-usage
Which pipelines are using the docker-build-push template?
Impact analysis before update
/template-usage
I want to make a breaking change to the k8s-deploy template. Show me what will be affected.
Find unused templates
/template-usage
Which templates in our account have no references? I want to clean up.
Track version adoption
/template-usage
Which version of the ci-stage template are different projects using?
Cross-project usage
/template-usage
Show me all usages of account-level templates across all projects
Dependency chain
/template-usage
Show me the full dependency chain for the release-pipeline template --
what does it reference and what references it?
Error Handling
| Error | Cause | Solution |
|---|---|---|
| Template not found | Wrong identifier or scope | Verify identifier and use correct org_id/project_id for the template's scope |
| No usage data | Template genuinely unused or scope mismatch | Search at broader scope; account templates may be used in any project |
| Empty search results | No templates match query | Try broader search terms or list all templates |
Performance Notes
- Paginate through all usage results before generating the impact report. Large templates may have many references.
- Check usage across all scopes (account, org, project) for complete impact analysis.
- Verify version information to distinguish between teams using current vs. outdated template versions.
Troubleshooting
No Usage Data Returned
- Template may genuinely have no references
- Query scope must match template scope -- an account-level template needs no org_id/project_id
- Use
harness_searchwith broader terms to find the template first
Incomplete Usage List
- Paginate through results -- increment
pageuntil all results are retrieved - Account-level templates can be referenced from any org/project -- check all scopes
- Check for both pipeline and template references (templates can nest)
Template Not Found
- Verify the exact identifier (case-sensitive, underscores not hyphens)
- Identifiers must match pattern:
^[a-zA-Z_][0-9a-zA-Z_]{0,127}$ - Check the correct scope -- project templates require org_id + project_id
当前收录版本
1.0.0
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供模板依赖关系跟踪、使用情况分析和影响评估,解决 DevOps 团队核心痛点
- 支持跨项目、跨作用域模板采用情况追踪,实用价值高
亮点
- 触发词覆盖全面且边界清晰,明确区分了查询与创建/更新场景
待提升项
-
缺少 When to Use 显式章节 原报告严重程度:轻微
文档结构良好,但未设置显式的 When to Use 章节,使用场景说明融入在 description 中
改进建议:建议添加显式的 When to Use 章节以提升可读性
亮点
- 步骤划分清晰,包含完整的端到端示例和错误处理指南
亮点
- 工具来源明确,参数规范,覆盖主要异常场景,并提供性能优化建议
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
来源文档未说明。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。