template-usage

Track template dependencies, usage, and adoption via MCP v2 tools. Find pipelines or other templates that reference a given template, analyze update impact, identify unused templates, and compare version adoption. Use for template usage queries, template references, dependency analysis, or pre-update impact assessment; not for creating or updating templates (use create-template).

Last repository push
GitHub Stars
138
Forks
30
Issues / PRs
4

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "template-usage" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-f5dcd8ae0986421880b0e181ad1653528c9b55437f0459db6a3067e62b3ddb89. Verify the upstream source and version against https://github.com/harness/harness-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Track template dependencies, usage, and adoption via MCP v2 tools. Find pipelines or other templates that reference a given template, analyze update impact, identify unused templates, and compare version adoption. Use for template usage queries, template references, dependency analysis, or pre-update impact assessment; not for creating or updating templates (use create-template).

0 Downloads

Introduction source: third_party · harness · 1.0.0 Reference

SkillPi interpretation

Tasks
Not specified in the source documentation.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
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

  1. Template may genuinely have no references
  2. Query scope must match template scope -- an account-level template needs no org_id/project_id
  3. Use harness_search with broader terms to find the template first

Incomplete Usage List

  1. Paginate through results -- increment page until all results are retrieved
  2. Account-level templates can be referenced from any org/project -- check all scopes
  3. Check for both pipeline and template references (templates can nest)

Template Not Found

  1. Verify the exact identifier (case-sensitive, underscores not hyphens)
  2. Identifiers must match pattern: ^[a-zA-Z_][0-9a-zA-Z_]{0,127}$
  3. Check the correct scope -- project templates require org_id + project_id

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 提供模板依赖关系跟踪、使用情况分析和影响评估,解决 DevOps 团队核心痛点
  • 支持跨项目、跨作用域模板采用情况追踪,实用价值高
Trigger Precision95/100

Highlights

  • 触发词覆盖全面且边界清晰,明确区分了查询与创建/更新场景
Structure and Standards80/100

Areas to improve

  • 缺少 When to Use 显式章节 Reported severity: Minor

    文档结构良好,但未设置显式的 When to Use 章节,使用场景说明融入在 description 中

    Recommendation: 建议添加显式的 When to Use 章节以提升可读性

Highlights

  • 步骤划分清晰,包含完整的端到端示例和错误处理指南
Execution Reliability90/100

Highlights

  • 工具来源明确,参数规范,覆盖主要异常场景,并提供性能优化建议
Evidence Verifiability (mean of the first four)88/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.