create-agent-template
Skill2 starsChanged 7 months agoApache-2.0Archived repositoryView on GitHub
Generate Harness Agent Template files for AI-powered automation agents. Produces metadata.json, pipeline.yaml (v1 syntax), and wiki.MD files. Agents automate tasks like code review, security scanning, test generation, and documentation. This is a YAML generation skill. Use when asked to create an agent template, build an AI agent, create an automation agent, generate agent pipeline files, or set up a Harness agent. Trigger phrases: create agent template, agent template, AI agent, automation agent, build agent, code review agent, security scanner agent, Harness agent.
- Reads credentials
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 7 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
Validate consistency: - Ensure input references in pipeline.yaml match definitions in metadata.json
- Distinctive: line 307
Ensure the pipeline YAML uses correct v1 syntax with lowercase types and ${{ }} expressions.
- Very specific: line 308
Test that all input references in the pipeline match the inputs defined in metadata.json.
- Very specific: line 314
Verify all required: true inputs have values
- Distinctive: line 315
Check connector inputs are valid and accessible
- Very specific: line 320
Verify DRONE_REPO_SCM environment variable is available
- Distinctive: line 321
Check that connector tokens have correct permissions
- Distinctive: line 322
Test with a known SCM provider before adding multi-provider logic
- Distinctive: line 327
Verify the token has write access to create branches and PRs
- Very specific: line 328
Check that PLUGIN_REPO format matches the SCM provider expectations
- Very specific: line 332
Write outputs using echo "KEY=value" >> $DRONE_OUTPUT
- Very specific: line 333
Write secret outputs using echo "KEY=value" >> $HARNESS_OUTPUT_SECRET_FILE
- Very specific: line 338
Never hardcode secrets -- use type: secret inputs
- Very specific: line 339
Use type: connector for authentication rather than raw tokens
- Distinctive: line 341
Keep stages focused on single responsibilities
- Distinctive: line 342
Always include the SCM detection pattern for multi-provider support
≈ “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
Create Agent Template Skill
Generate Harness Agent Template files for AI-powered automation agents.
Instructions
- Identify the agent's purpose - What task should the agent automate (code review, security scanning, test generation, documentation)?
- Define inputs and configuration - What parameters does the agent need (repo, branch, connector, secrets)?
- Generate three files - metadata.json (template metadata), pipeline.yaml (v1 syntax), and wiki.MD (user documentation)
- Validate consistency - Ensure input references in pipeline.yaml match definitions in metadata.json
Overview
Agent templates are modular pipeline definitions that encapsulate AI-powered automation. Each template produces three files:
| File | Required | Purpose |
metadata.json | Yes | Template name, description, version |
pipeline.yaml | Yes | Pipeline definition (v1 syntax) |
wiki.MD | Recommended | User-facing documentation |
Directory Structure
templates/<agent-name>/
metadata.json
pipeline.yaml
wiki.MDmetadata.json
{
"name": "Agent Name",
"description": "Brief description of what this agent does (1-2 sentences)",
"version": "1.0.0"
}Rules:
name: Sentence Case (Code Review, notcode-review)description: Under 200 characters, clear value propositionversion: Semantic versioningMAJOR.MINOR.PATCH
pipeline.yaml
Core Structure
version: 1
pipeline:
clone:
depth: 1
ref:
name: <+inputs.branch>
type: branch
repo: <+inputs.repo>
connector: "<+inputs.gitConnector != null ? inputs.gitConnector.id : ''>"
stages:
- name: <stage-name>
steps:
- name: <step-name>
run:
container:
image: <registry>/<image>:<tag>
with:
param: value
env:
SECRET_VAR: <+inputs.secretInput>
platform:
os: linux
arch: arm64
inputs:
repo:
type: string
required: true
branch:
type: string
default: main
llmConnector:
type: connector
gitConnector:
type: connectorClone Configurations
Branch clone:
clone:
depth: 1
ref:
name: <+inputs.branch>
type: branch
repo: <+inputs.repo>
connector: "<+inputs.gitConnector != null ? inputs.gitConnector.id : ''>"Pull request clone:
clone:
depth: 1000
ref:
type: pull-request
number: <+inputs.pullReq>
repo: <+inputs.repo>Input Types
| Type | Usage | Example |
string | Text values | repo name, branch, file paths |
secret | Sensitive values | API keys, tokens |
connector | Harness connectors | Git connector, LLM connector |
inputs:
repo:
type: string
required: true
branch:
type: string
default: main
description: Branch to analyze
apiKey:
type: secret
default: account.my_secret
llmConnector:
type: connector
description: LLM provider connector
gitConnector:
type: connector
description: Git repository connectorStep Types
Container plugin step:
- name: my-step
run:
container:
image: registry/image:tag
with:
plugin_param: value
env:
API_KEY: <+inputs.apiKey>Shell script step:
- name: shell-step
run:
shell: bash
script: |-
echo "Running script"
git add -A
git diff --cached
env:
MY_VAR: valueExpression Syntax
# Input references
<+inputs.variableName>
# Connector token
<+inputs.connectorName.token>
# Step outputs
<+pipeline.stages.STAGE.steps.STEP.output.outputVariables.VAR>
# Environment variables
<+env.HARNESS_ACCOUNT_ID>
<+env.HARNESS_ORG_ID>
<+env.HARNESS_PROJECT_ID>
# Alternative syntax for inputs in env blocks
${{inputs.repo}}wiki.MD
# Agent Name
**Version:** 1.0.0
**Name:** Agent Name
## Overview
What this agent does and why it is useful.
---
## Key Capabilities
- **Capability 1**: Description
- **Capability 2**: Description
---
## How It Works
1. **Step 1**: Description
2. **Step 2**: Description
3. **Step 3**: Description
## Required Inputs
| Input | Type | Description | Default |
|-------|------|-------------|---------|
| `repo` | string | Repository identifier | -- |
| `branch` | string | Branch to analyze | main |
## Usage Example
\`\`\`yaml
inputs:
repo: "my-org/my-repo"
branch: "main"
\`\`\`
## Troubleshooting
### Common Issue 1
Solution description.Complete Examples and Common Patterns
For complete agent examples (Code Review, Security Scanner, Documentation Generator) and reusable patterns (SCM detection, coding agent, PR creation), consult references/agent-examples.md.
Examples
Create a code review agent
/create-agent-template
Create an agent template for code review that analyzes pull requests,
provides feedback, and posts review commentsCreate a security scanner agent
/create-agent-template
Generate a security scanner agent that finds vulnerabilities and
creates a reportCreate a documentation generator
/create-agent-template
Create an agent that analyzes a codebase and generates documentation,
then opens a PR with the resultsCreate a test generator
/create-agent-template
Build an agent template that generates unit tests to improve code coverageError Handling
| Error | Cause | Solution |
| Invalid metadata | Missing name, description, or version | Include all three required fields |
| Invalid version | Not semver format | Use MAJOR.MINOR.PATCH (e.g., 1.0.0) |
| Pipeline validation error | Invalid v1 YAML syntax | Verify pipeline structure follows v1 schema |
| Connector not found | Referenced connector does not exist | Create the connector before running the agent |
| Undefined input reference | <+inputs.x> used but x not defined in inputs | Add missing input definition |
Performance Notes
- Validate all three generated files (metadata.json, pipeline.yaml, wiki.MD) are consistent with each other.
- Ensure the pipeline YAML uses correct v1 syntax with lowercase types and ${{ }} expressions.
- Test that all input references in the pipeline match the inputs defined in metadata.json.
Troubleshooting
Agent Not Executing
- Verify all
required: trueinputs have values - Check connector inputs are valid and accessible
- Confirm container images exist and are accessible from the build infrastructure
SCM Provider Detection Failing
- Verify
DRONE_REPO_SCMenvironment variable is available - Check that connector tokens have correct permissions
- Test with a known SCM provider before adding multi-provider logic
PR Creation Failing
- Confirm git changes exist (
git diff --cachedis non-empty) - Verify the token has write access to create branches and PRs
- Check that
PLUGIN_REPOformat matches the SCM provider expectations
Output Variables Not Available
- Write outputs using
echo "KEY=value" >> $DRONE_OUTPUT - Write secret outputs using
echo "KEY=value" >> $HARNESS_OUTPUT_SECRET_FILE - Reference with full path:
<+pipeline.stages.STAGE.steps.STEP.output.outputVariables.KEY>
Best Practices
- Never hardcode secrets -- use
type: secretinputs - Use
type: connectorfor authentication rather than raw tokens - Include meaningful descriptions on all inputs
- Keep stages focused on single responsibilities
- Always include the SCM detection pattern for multi-provider support
- Store secret outputs with
$HARNESS_OUTPUT_SECRET_FILE, not$DRONE_OUTPUT - Set
depth: 1000for PR clones to ensure full diff history - Set
depth: 1for branch clones to minimize clone time
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- harness/harness-skills★ 12799% 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-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
- template-usageSkill
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.

