create-service
Skill2 starsChanged 7 months agoApache-2.0Archived repositoryView on GitHub
Generate Harness Service YAML for deployable workloads and create via MCP. Supports Kubernetes, Helm, ECS, Serverless, SSH, and WinRm deployment types with artifact sources from Docker Hub, ECR, GCR, ACR, Nexus, and S3. Use when asked to create a service, define a Kubernetes service, set up a Helm chart deployment, configure an ECS service, or define what gets deployed. Trigger phrases: create service, service definition, Kubernetes service, Helm service, ECS service, deployment service, artifact source.
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 273
Verify that referenced connectors exist before creating the service definition.
- Distinctive: line 274
Ensure the deployment type matches the infrastructure type that will be used in the pipeline.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Create Service
Generate Harness Service YAML and push to Harness via MCP.
Instructions
- Detect service type from codebase (if source code is available) - Scan the project for deployment manifests to auto-select the correct
serviceDefinition.typeand manifest configuration:k8s/,kubernetes/,manifests/with YAML files →KuberneteswithK8sManifestkustomization.yaml→KuberneteswithKustomizeChart.yaml,charts/,helm/→NativeHelmwithHelmCharttask-definition.json→ECSwithEcsTaskDefinitionserverless.yml/template.yaml(SAM) →ServerlessAwsLambdafunction.json(Azure) →AzureWebApp.NET+ Windows →WinRm- Traditional app (JAR/WAR) without containers →
Ssh - See
create-pipeline/references/codebase-analysis.mdStep 4 for the full decision tree
- Detect artifact source - Match Dockerfile registry references to artifact source type:
- Docker Hub →
DockerRegistry *.dkr.ecr.*.amazonaws.com→Ecrgcr.io/*-docker.pkg.dev→Gcr*.azurecr.io→Acr
- Docker Hub →
- Confirm with user - Present detected service type, manifest type, and artifact source for confirmation
- Generate YAML following the structure below
- Create via MCP using
harness_createwith resource_typeservice
Service Structure
service:
name: My Service
identifier: my_service
orgIdentifier: default
projectIdentifier: my_project
serviceDefinition:
type: Kubernetes # Kubernetes, NativeHelm, ECS, ServerlessAwsLambda, Ssh, WinRm, AzureWebApp, AzureFunction, CustomDeployment
spec:
artifacts:
primary:
primaryArtifactRef: docker_image
sources:
- identifier: docker_image
type: DockerRegistry
spec:
connectorRef: dockerhub
imagePath: myorg/myimage
tag: <+input>
manifests:
- manifest:
identifier: k8s_manifest
type: K8sManifest
spec:
store:
type: Github
spec:
connectorRef: github_connector
repoName: my-manifests
branch: main
paths: [manifests/]
variables:
- name: replicas
type: String
value: "3"Deployment Types
Kubernetes Service
serviceDefinition:
type: Kubernetes
spec:
artifacts:
primary:
primaryArtifactRef: main_image
sources:
- identifier: main_image
type: DockerRegistry
spec:
connectorRef: dockerhub
imagePath: myorg/api
tag: <+input>
manifests:
- manifest:
identifier: manifests
type: K8sManifest
spec:
store:
type: Github
spec:
connectorRef: github
repoName: k8s-manifests
branch: main
paths: [deploy/]Helm Service
serviceDefinition:
type: NativeHelm
spec:
artifacts:
primary:
primaryArtifactRef: chart
sources:
- identifier: chart
type: DockerRegistry
spec:
connectorRef: dockerhub
imagePath: myorg/api
tag: <+input>
manifests:
- manifest:
identifier: helm_chart
type: HelmChart
spec:
store:
type: Http
spec:
connectorRef: helm_repo
chartName: my-chart
chartVersion: <+input>
helmVersion: V3Kustomize Service
serviceDefinition:
type: Kubernetes
spec:
artifacts:
primary:
primaryArtifactRef: main_image
sources:
- identifier: main_image
type: DockerRegistry
spec:
connectorRef: dockerhub
imagePath: myorg/api
tag: <+input>
manifests:
- manifest:
identifier: kustomize
type: Kustomize
spec:
store:
type: Github
spec:
connectorRef: github
repoName: k8s-config
branch: main
folderPath: overlays/production
pluginPath: ""ECS Service
serviceDefinition:
type: ECS
spec:
artifacts:
primary:
primaryArtifactRef: ecr_image
sources:
- identifier: ecr_image
type: Ecr
spec:
connectorRef: aws_connector
region: us-east-1
imagePath: my-image
tag: <+input>
manifests:
- manifest:
identifier: task_def
type: EcsTaskDefinition
spec:
store:
type: Github
spec:
connectorRef: github
repoName: ecs-config
branch: main
paths: [task-definition.json]Serverless Lambda Service
serviceDefinition:
type: ServerlessAwsLambda
spec:
artifacts:
primary:
primaryArtifactRef: s3_artifact
sources:
- identifier: s3_artifact
type: AmazonS3
spec:
connectorRef: aws_connector
region: us-east-1
bucketName: my-deployments
filePath: serverless-app.zip
manifests:
- manifest:
identifier: serverless_manifest
type: ServerlessAwsLambda
spec:
store:
type: Github
spec:
connectorRef: github
repoName: serverless-config
branch: main
paths: [serverless.yml]Artifact Source Types
DockerRegistry- Docker Hub (connectorRef, imagePath, tag)Ecr- AWS ECR (connectorRef, region, imagePath, tag)Gcr- Google GCR (connectorRef, registryHostname, imagePath, tag)GoogleArtifactRegistry- Google Artifact Registry (connectorRef, region, repositoryName, package, version)Acr- Azure ACR (connectorRef, subscriptionId, registry, repository, tag)ArtifactoryRegistry- JFrog Artifactory (connectorRef, repository, artifactPath, repositoryFormat, tag)Nexus3Registry- Nexus (connectorRef, repository, artifactPath, repositoryFormat, tag)GithubPackageRegistry- GitHub Packages (connectorRef, packageType, org, packageName, version)AmazonS3- S3 (connectorRef, region, bucketName, filePath)GoogleCloudStorage- GCS (connectorRef, project, bucket, artifactPath)CustomArtifact- Custom source (scripts, delegateSelectors, version)
Creating via MCP
Call MCP tool: harness_create
Parameters:
resource_type: "service"
org_id: "<organization>"
project_id: "<project>"
body: <service YAML>List existing services:
Call MCP tool: harness_list
Parameters:
resource_type: "service"
org_id: "<organization>"
project_id: "<project>"Examples
- "Create a K8s service with Docker Hub artifact" - Kubernetes type with DockerRegistry source
- "Create a Helm service" - NativeHelm type with HelmChart manifest
- "Create an ECS service with ECR" - ECS type with Ecr artifact source
Performance Notes
- Verify that referenced connectors exist before creating the service definition.
- Ensure the deployment type matches the infrastructure type that will be used in the pipeline.
- For artifact sources, confirm the image path and registry are accessible.
- Quality of service configuration is more important than speed.
Troubleshooting
CONNECTOR_NOT_FOUND- Create connector first or fix connectorRefDUPLICATE_IDENTIFIER- Service exists; useharness_update- Artifact tag
<+input>means the tag is provided at runtime
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- harness/harness-skills★ 12797% same
Wrote their own version · 5
- cachix/devenv★ 7.8ksame name
- TheDecipherist/claude-code-mastery-project-starter-kit★ 337same name
- buildpad-ai/skills★ 1same name
- amariwan/FastApi-template★ 0same name
- euronone/Claude-Code-Template★ 0same name
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-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.

