Agent Skill · Harness

create-service

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.

Provider: Harness Path in repo: skills/create-service/SKILL.md

Skill body

Create Service

Generate Harness Service YAML and push to Harness via MCP.

Instructions

  1. Detect service type from codebase (if source code is available) - Scan the project for deployment manifests to auto-select the correct serviceDefinition.type and manifest configuration:
    • k8s/, kubernetes/, manifests/ with YAML files → Kubernetes with K8sManifest
    • kustomization.yamlKubernetes with Kustomize
    • Chart.yaml, charts/, helm/NativeHelm with HelmChart
    • task-definition.jsonECS with EcsTaskDefinition
    • serverless.yml / template.yaml (SAM) → ServerlessAwsLambda
    • function.json (Azure) → AzureWebApp
    • .NET + Windows → WinRm
    • Traditional app (JAR/WAR) without containers → Ssh
    • See create-pipeline/references/codebase-analysis.md Step 4 for the full decision tree
  2. Detect artifact source - Match Dockerfile registry references to artifact source type:
    • Docker Hub → DockerRegistry
    • *.dkr.ecr.*.amazonaws.comEcr
    • gcr.io / *-docker.pkg.devGcr
    • *.azurecr.ioAcr
  3. Confirm with user - Present detected service type, manifest type, and artifact source for confirmation
  4. Generate YAML following the structure below
  5. Create via MCP using harness_create with resource_type service

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: V3

Kustomize 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

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

Performance Notes

Troubleshooting

Skill frontmatter

metadata: {"author" => "Harness", "version" => "2.0.0", "mcp-server" => "harness-mcp-v2"} license: Apache-2.0 compatibility: Requires Harness MCP v2 server (harness-mcp-v2)

Work with this as data

Every skill here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for agent skills

4 MCP tools reach this
  • find_skillsBrowse and filter every skill in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This skill
curl "https://apis.io/api/v1/skills/create-service"
All agent skills
curl "https://apis.io/api/v1/skills?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.