{"id":"9f266b07-2cbb-48d6-8d4e-051fd7503d5e","shortId":"p3UHJc","kind":"skill","title":"template-usage","tagline":">-","description":"# Template Usage Skill\n\nTrack template dependencies and usage across Harness via MCP v2 tools.\n\n## MCP v2 Tools Used\n\n| Tool | Resource Type | Purpose |\n|------|--------------|---------|\n| `harness_search` | `template` | Find templates by keyword across orgs/projects |\n| `harness_list` | `template` | List templates, filter by scope |\n| `harness_get` | `template` | Get template details, versions, and usage references |\n| `harness_describe` | `template` | Discover template resource schema and fields |\n\nTemplates are managed via `harness_list` and `harness_get` only. For creating or updating templates, use the `/create-template` skill.\n\n## Template Types\n\n| Type | Description |\n|------|-------------|\n| `Step` | Single step definition (build, test, deploy actions) |\n| `Stage` | Complete stage with steps (CI stage, CD stage, approval) |\n| `Pipeline` | Full pipeline definition |\n| `StepGroup` | Group of related steps bundled together |\n\n## Template Scopes\n\n| Scope | Visibility | Query Parameters |\n|-------|-----------|-----------------|\n| Account | All orgs and projects | No org_id, no project_id |\n| Organization | All projects in the org | org_id only |\n| Project | Only within the project | org_id + project_id |\n\n## Instructions\n\n### Step 1: Find the Template\n\nSearch by name or keyword:\n\n```\nharness_search(\n  query=\"docker-build-push\",\n  resource_types=[\"template\"],\n  max_per_type=10,\n  compact=true\n)\n```\n\nOr list templates in a specific scope:\n\n```\nharness_list(\n  resource_type=\"template\",\n  org_id=\"<org>\",\n  project_id=\"<project>\",\n  search_term=\"docker\"\n)\n```\n\n### Step 2: Get Template Details\n\n```\nharness_get(\n  resource_type=\"template\",\n  resource_id=\"<template_identifier>\",\n  org_id=\"<org>\",\n  project_id=\"<project>\"\n)\n```\n\nThis returns the template definition, version history, and metadata.\n\n### Step 3: Check Usage References\n\n```\nharness_get(\n  resource_type=\"template\",\n  resource_id=\"<template_identifier>\",\n  org_id=\"<org>\",\n  project_id=\"<project>\"\n)\n```\n\nParse the response for `referredEntities` or usage data. The response includes which pipelines and other templates reference this template.\n\n### Step 4: Analyze and Present\n\nOrganize findings into a report.\n\nFor report templates (Usage Report, Impact Analysis, Unused Templates), consult references/report-templates.md.\n\n## Examples\n\n### Check who uses a template\n\n```\n/template-usage\nWhich pipelines are using the docker-build-push template?\n```\n\n### Impact analysis before update\n\n```\n/template-usage\nI want to make a breaking change to the k8s-deploy template. Show me what will be affected.\n```\n\n### Find unused templates\n\n```\n/template-usage\nWhich templates in our account have no references? I want to clean up.\n```\n\n### Track version adoption\n\n```\n/template-usage\nWhich version of the ci-stage template are different projects using?\n```\n\n### Cross-project usage\n\n```\n/template-usage\nShow me all usages of account-level templates across all projects\n```\n\n### Dependency chain\n\n```\n/template-usage\nShow me the full dependency chain for the release-pipeline template --\nwhat does it reference and what references it?\n```\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| Template not found | Wrong identifier or scope | Verify identifier and use correct org_id/project_id for the template's scope |\n| No usage data | Template genuinely unused or scope mismatch | Search at broader scope; account templates may be used in any project |\n| Empty search results | No templates match query | Try broader search terms or list all templates |\n\n## Performance Notes\n\n- Paginate through all usage results before generating the impact report. Large templates may have many references.\n- Check usage across all scopes (account, org, project) for complete impact analysis.\n- Verify version information to distinguish between teams using current vs. outdated template versions.\n\n## Troubleshooting\n\n### No Usage Data Returned\n\n1. Template may genuinely have no references\n2. Query scope must match template scope -- an account-level template needs no org_id/project_id\n3. Use `harness_search` with broader terms to find the template first\n\n### Incomplete Usage List\n\n1. Paginate through results -- increment `page` until all results are retrieved\n2. Account-level templates can be referenced from any org/project -- check all scopes\n3. Check for both pipeline and template references (templates can nest)\n\n### Template Not Found\n\n1. Verify the exact identifier (case-sensitive, underscores not hyphens)\n2. Identifiers must match pattern: `^[a-zA-Z_][0-9a-zA-Z_]{0,127}$`\n3. Check the correct scope -- project templates require org_id + project_id","tags":["template","usage","harness","skills","agent-skills","agents"],"capabilities":["skill","source-harness","skill-template-usage","topic-agent-skills","topic-agents"],"categories":["harness-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/harness/harness-skills/template-usage","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add harness/harness-skills","source_repo":"https://github.com/harness/harness-skills","install_from":"skills.sh"}},"qualityScore":"0.457","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 15 github stars · SKILL.md body (4,660 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:06:31.365Z","embedding":null,"createdAt":"2026-05-09T01:05:30.006Z","updatedAt":"2026-05-18T19:06:31.365Z","lastSeenAt":"2026-05-18T19:06:31.365Z","tsv":"'-9':596 '/create-template':79 '/template-usage':282,297,320,337,354,369 '0':595,601 '1':151,498,536,575 '10':173 '127':602 '2':196,505,547,586 '3':221,521,561,603 '4':256 'a-za-z':591,597 'account':120,325,361,427,473,514,549 'account-level':360,513,548 'across':12,33,364,470 'action':92 'adopt':336 'affect':316 'analysi':271,294,479 'analyz':257 'approv':102 'break':303 'broader':425,443,526 'build':89,165,290 'bundl':112 'case':581 'case-sensit':580 'caus':393 'cd':100 'chain':368,375 'chang':304 'check':222,277,468,558,562,604 'ci':98,343 'ci-stag':342 'clean':332 'compact':174 'complet':94,477 'consult':274 'correct':406,606 'creat':73 'cross':351 'cross-project':350 'current':488 'data':243,416,496 'definit':88,106,215 'depend':9,367,374 'deploy':91,309 'describ':54 'descript':84 'detail':48,199 'differ':347 'discov':56 'distinguish':484 'docker':164,194,289 'docker-build-push':163,288 'empti':435 'error':390,392 'exact':578 'exampl':276 'field':61 'filter':40 'find':29,152,261,317,529 'first':532 'found':397,574 'full':104,373 'generat':458 'genuin':418,501 'get':44,46,70,197,201,226 'group':108 'handl':391 'har':13,26,35,43,53,66,69,160,183,200,225,523 'histori':217 'hyphen':585 'id':127,130,138,146,148,189,191,206,208,210,231,233,235,612,614 'id/project_id':408,520 'identifi':399,403,579,587 'impact':270,293,460,478 'includ':246 'incomplet':533 'increment':540 'inform':482 'instruct':149 'k8s':308 'k8s-deploy':307 'keyword':32,159 'larg':462 'level':362,515,550 'list':36,38,67,177,184,447,535 'make':301 'manag':64 'mani':466 'match':440,509,589 'max':170 'may':429,464,500 'mcp':15,18 'metadata':219 'mismatch':422 'must':508,588 'name':157 'need':517 'nest':571 'note':451 'org':122,126,136,137,145,188,207,232,407,474,519,611 'org/project':557 'organ':131,260 'orgs/projects':34 'outdat':490 'page':541 'pagin':452,537 'paramet':119 'pars':236 'pattern':590 'per':171 'perform':450 'pipelin':103,105,248,284,380,565 'present':259 'project':124,129,133,140,144,147,190,209,234,348,352,366,434,475,608,613 'purpos':25 'push':166,291 'queri':118,162,441,506 'refer':52,224,252,328,385,388,467,504,568 'referenc':554 'references/report-templates.md':275 'referredent':240 'relat':110 'releas':379 'release-pipelin':378 'report':264,266,269,461 'requir':610 'resourc':23,58,167,185,202,205,227,230 'respons':238,245 'result':437,456,539,544 'retriev':546 'return':212,497 'schema':59 'scope':42,115,116,182,401,413,421,426,472,507,511,560,607 'search':27,155,161,192,423,436,444,524 'sensit':582 'show':311,355,370 'singl':86 'skill':6,80 'skill-template-usage' 'solut':394 'source-harness' 'specif':181 'stage':93,95,99,101,344 'step':85,87,97,111,150,195,220,255 'stepgroup':107 'team':486 'templat':2,4,8,28,30,37,39,45,47,55,57,62,76,81,114,154,169,178,187,198,204,214,229,251,254,267,273,281,292,310,319,322,345,363,381,395,411,417,428,439,449,463,491,499,510,516,531,551,567,569,572,609 'template-usag':1 'term':193,445,527 'test':90 'togeth':113 'tool':17,20,22 'topic-agent-skills' 'topic-agents' 'track':7,334 'tri':442 'troubleshoot':493 'true':175 'type':24,82,83,168,172,186,203,228 'underscor':583 'unus':272,318,419 'updat':75,296 'usag':3,5,11,51,223,242,268,353,358,415,455,469,495,534 'use':21,77,279,286,349,405,431,487,522 'v2':16,19 'verifi':402,480,576 'version':49,216,335,339,481,492 'via':14,65 'visibl':117 'vs':489 'want':299,330 'within':142 'wrong':398 'z':594,600 'za':593,599","prices":[{"id":"8ad9da2d-c34b-4b7d-8665-430ab80667f5","listingId":"9f266b07-2cbb-48d6-8d4e-051fd7503d5e","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"harness","category":"harness-skills","install_from":"skills.sh"},"createdAt":"2026-05-09T01:05:30.006Z"}],"sources":[{"listingId":"9f266b07-2cbb-48d6-8d4e-051fd7503d5e","source":"github","sourceId":"harness/harness-skills/template-usage","sourceUrl":"https://github.com/harness/harness-skills/tree/main/skills/template-usage","isPrimary":false,"firstSeenAt":"2026-05-09T01:05:30.006Z","lastSeenAt":"2026-05-18T19:06:31.365Z"}],"details":{"listingId":"9f266b07-2cbb-48d6-8d4e-051fd7503d5e","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"harness","slug":"template-usage","github":{"repo":"harness/harness-skills","stars":15,"topics":["agent-skills","agents"],"license":"apache-2.0","html_url":"https://github.com/harness/harness-skills","pushed_at":"2026-05-13T01:28:28Z","description":"A collection of structured AI agent skills that   enable Claude Code, Cursor, GitHub Copilot, and   other AI coding assistants to create, operate,   debug, and govern Harness CI/CD workflows through   natural language.","skill_md_sha":"822f91f71e5fea6853b719e6e60a68d305879e0a","skill_md_path":"skills/template-usage/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/harness/harness-skills/tree/main/skills/template-usage"},"layout":"multi","source":"github","category":"harness-skills","frontmatter":{"name":"template-usage","license":"Apache-2.0","description":">-","compatibility":"Requires Harness MCP v2 server (harness-mcp-v2)"},"skills_sh_url":"https://skills.sh/harness/harness-skills/template-usage"},"updatedAt":"2026-05-18T19:06:31.365Z"}}