{"id":41118925,"url":"https://github.com/upbound/function-claude","last_synced_at":"2026-04-17T09:04:46.575Z","repository":{"id":310573470,"uuid":"988026003","full_name":"upbound/function-claude","owner":"upbound","description":"Compose resources using Claude AI","archived":false,"fork":false,"pushed_at":"2026-03-25T12:56:53.000Z","size":256,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-26T04:20:47.405Z","etag":null,"topics":["ai","anthropic","anthropic-claude","crossplane","crossplane-functions","functions","go","golang","intelligent-functions","upbound","upbound-ai","upbound-crossplane","upbound-official","uxp","xp"],"latest_commit_sha":null,"homepage":"https://docs.upbound.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/upbound.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-22T00:19:36.000Z","updated_at":"2026-02-18T09:28:59.000Z","dependencies_parsed_at":"2025-08-19T01:07:35.816Z","dependency_job_id":"52f2fd57-6273-4a84-8c66-4f7e37d97630","html_url":"https://github.com/upbound/function-claude","commit_stats":null,"previous_names":["upbound/function-claude"],"tags_count":19,"template":false,"template_full_name":"crossplane/function-template-go","purl":"pkg:github/upbound/function-claude","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upbound%2Ffunction-claude","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upbound%2Ffunction-claude/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upbound%2Ffunction-claude/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upbound%2Ffunction-claude/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/upbound","download_url":"https://codeload.github.com/upbound/function-claude/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upbound%2Ffunction-claude/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31922401,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","anthropic","anthropic-claude","crossplane","crossplane-functions","functions","go","golang","intelligent-functions","upbound","upbound-ai","upbound-crossplane","upbound-official","uxp","xp"],"created_at":"2026-01-22T17:12:51.521Z","updated_at":"2026-04-17T09:04:46.534Z","avatar_url":"https://github.com/upbound.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# function-claude\n[![CI](https://github.com/upbound/function-claude/actions/workflows/ci.yml/badge.svg)](https://github.com/upbound/function-claude/actions/workflows/ci.yml)\n[![Slack](https://img.shields.io/badge/slack-upbound_crossplane-purple?logo=slack)](https://crossplane.slack.com/archives/C01TRKD4623)\n[![GitHub release](https://img.shields.io/github/release/upbound/function-claude/all.svg)](https://github.com/upbound/function-claude/releases)\n\nUse natural language prompts to compose resources.\n\n## Model Support\n\nThis function supports all [Anthropic Claude\nmodels](https://docs.claude.com/en/docs/about-claude/models/overview). Configure\nthe model via the optional `modelName` field in the input. If not specified, the\ndefault model will be used.\n\n```yaml\napiVersion: apiextensions.crossplane.io/v1\nkind: Composition\nmetadata:\n  name: compose-an-app-with-claude\nspec:\n  compositeTypeRef:\n    apiVersion: example.crossplane.io/v1\n    kind: App\n  mode: Pipeline\n  pipeline:\n  - step: make-claude-do-it\n    functionRef:\n      name: function-claude\n    input:\n      apiVersion: claude.fn.upbound.io/v1alpha1\n      kind: Prompt\n      systemPrompt: |\n        You are a Kubernetes templating tool designed to generate and update Kubernetes\n        Resource Model (KRM) resources using Kubernetes server-side apply. Your task is\n        to create, update, or delete YAML manifests based on the provided composite\n        resource and any existing composed resources.\n      userPrompt: |\n        \u003cinstructions\u003e\n        Please follow these instructions carefully:\n\n        1. Analyze the provided composite resource and any existing composed resources.\n\n        2. Analyze the input to understand what composed resources you should create,\n           update, or delete. You may be asked to derive composed resources from the\n           composite resource, or from other composed resources.\n\n        3. Generate a stream of YAML manifests based on your analysis in steps 1 and 2.\n           Each manifest should:\n           a. Be valid for Kubernetes server-side apply (fully specified intent).\n           b. Omit names and namespaces.\n           c. Include an annotation with the key \"upbound.io/name\". This annotation\n              must uniquely identify the manifest within the YAML stream. It must be\n              lowercase, hyphen separated, and less than 30 characters long. Prefer\n              to use the manifest's kind. If two or more manifests have the same\n              kind, look for something unique about the manifest and append that to\n              the kind. This annotation is used to match the manifests you return to\n              any manifests that were passed you inside the \u003ccomposed\u003e tag, so if\n              your intent is to update a manifest never change its \"upbound.io/name\"\n              annotation. This is critically important.\n           d. If it's necessary to use labels to create relationships between\n              resources, use the name of the composite resource as the label value.\n\n        4. If there are existing composed resources:\n            a. You can update an existing composed resource by including it in your\n               output with any changes you deem necessary based on the input. Try to\n               reuse existing composed resource values as much as possible. Only\n               change values when you're sure it's necessary.\n            b. If the input indicates that a resource is no longer required, you can\n               delete it by omitting it from your output.\n\n        5. Your output must only be a stream of YAML manifests, each separated by\n           \"---\". Submit the YAML stream to the submit_yaml_stream tool.\n        \u003c/instructions\u003e\n\n        \u003cexample\u003e\n        ---\n        apiVersion: [api-version]\n        kind: [resource-kind]\n        metadata:\n          annotations:\n            upbound.io/name: [resource-kind]\n          labels:\n            [relationship-labels-if-needed]\n        spec:\n          [resource-specific-fields]\n        ---\n        [Additional resources as needed]\n        \u003c/example\u003e\n\n        Here is the composite resource you'll be working with:\n\n        \u003ccomposite\u003e\n        {{ .Composite }}\n        \u003c/composite\u003e\n\n        If there are any existing composed resources, they will be provided here:\n\n        \u003ccomposed\u003e\n        {{ .Composed }}\n        \u003c/composed\u003e\n\n        Use the resource in the \u003ccomposite\u003e tag to template a Deployment.\n        Use the value at JSON path .spec.replicas to set the Deployment's\n        replicas. Use the value at JSON path .spec.image to set its\n        container image.\n\n        Create a Service that exposes the Deployment's port 8080.\n    credentials:\n    - name: claude\n      source: Secret\n      secretRef:\n        namespace: crossplane-system\n        name: claude\n```\n\nSee `fn.go` for the prompt.\n\nComposed resource output _should_ be more stable if you pass the output back in\nusing the `--observed-resources` flag. The prompt asks Claude not to change\nexisting composed resources unless it has to.\n\n## Go Template Input support\n### Composition Pipeline\nFor `Input`'s using prompts targetting compositions, the following variables\nare available:\n```\n{{ .Composed }}\n{{ .Composite }}\n```\n\nIncluding these variables in your prompt will result in the variables being\nreplaced by the composed and composite resources progressing through the pipleline.\n\n### Operation Pipeline\nFor `Input`'s using prompts targetting operations, the following variable is available:\n```\n{{ .Resources }}\n```\n\nIncluding this variable in your prompt will result in the variable being\nreplaced by the required resource supplied to the function.\n\n[Anthropic]: https://docs.anthropic.com/en/docs/about-claude/models/overview\n[claude-sonnet-4-20250514]: https://docs.anthropic.com/en/docs/about-claude/models/overview#model-comparison-tables\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupbound%2Ffunction-claude","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fupbound%2Ffunction-claude","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupbound%2Ffunction-claude/lists"}