template-usage
Skill2 starsChanged 7 months agoApache-2.0Archived repositoryView on GitHub
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).
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 55
Search by name or keyword:
- Distinctive: line 165
Check usage across all scopes (account, org, project) for complete impact analysis.
- Distinctive: line 166
Verify version information to distinguish between teams using current vs.
- Very specific: line 174
Use harness_search with broader terms to find the template first
- Distinctive: line 180
Check for both pipeline and template references (templates can nest)
- Distinctive: line 184
Verify the exact identifier (case-sensitive, underscores not hyphens)
- Distinctive: line 186
Check the correct scope -- project templates require org_id + project_id
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 projectsDependency 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
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- harness/harness-skills★ 12798% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/harness.mdcCursor rule
- analyze-costsSkill
- audit-reportSkill
- chaos-experimentSkill
- create-agentSkill
- create-agent-templateSkill
- create-connectorSkill
- create-environmentSkill
- create-infrastructureSkill
- create-pipelineSkill
- create-pipeline-v1Skill
- create-policySkill
- create-secretSkill
- create-serviceSkill
- create-templateSkill
- create-triggerSkill
- debug-pipelineSkill
- dora-metricsSkill
- gitops-statusSkill
- manage-delegatesSkill
- manage-feature-flagsSkill
- manage-rolesSkill
- manage-usersSkill
- migrate-pipelineSkill
- run-pipelineSkill
- scorecard-reviewSkill
- security-reportSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

