ワンクリックで
catalog-info
Analyse the codebase and create or update catalog-info.yaml for Backstage
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Analyse the codebase and create or update catalog-info.yaml for Backstage
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Lag en risiko- og sårbarhetsanalyse (RoS) for et produkt eller en tjeneste. Bruk når noen ber om å lage, generere eller oppdatere en RoS. Produserer gyldig YAML i henhold til RoS-skjemaet.
Lag en risiko- og sårbarhetsanalyse (RoS) for et produkt eller en tjeneste. Bruk når noen ber om å lage, generere eller oppdatere en RoS. Produserer gyldig YAML i henhold til RoS-skjemaet.
SOC 職業分類に基づく
| name | catalog-info |
| description | Analyse the codebase and create or update catalog-info.yaml for Backstage |
Analyse the codebase in the current working directory and create or update catalog-info.yaml for Backstage.
catalog-info.yaml if it exists. Record all manually set values, especially spec.owner, spec.system, spec.lifecycle, metadata.description, and any metadata.annotations beyond github.com/project-slug.git remote get-url origin to get the GitHub slug (e.g. org/repo).gh repo view --json visibility -q .visibility to get the repository visibility. Convert the value to lowercase (e.g. PUBLIC → public, INTERNAL → internal, PRIVATE → private). If the command fails, skip this tag silently.Find every directory that contains a build file (build.gradle.kts, build.gradle, pom.xml, package.json, pyproject.toml). Each such directory is a component candidate. The repo root itself counts if it has a build file.
For each component root, collect:
Name — from the build file in this priority order:
rootProject.name or subproject name in settings.gradle.kts / settings.gradleartifactId in pom.xmlname field in package.jsonType — apply these rules:
plugin if the name or package.json keywords contain "backstage-plugin", or if there is a src/components directory alongside a package.json with @backstage/ dependencieswebsite if package.json dependencies include a frontend framework (react, vue, angular, next, vite) and there is no server-side entrypointlibrary if there is no main application entrypoint (no main method / main.ts / index.ts exporting a server, no Spring Boot @SpringBootApplication, no Application.kt)service otherwiseLanguage / framework tags — detect from build files and imports:
kotlin, java, typescript, javascript, pythonspring-boot (presence of spring-boot dependency), ktor, express, fastapi, nestjsgradle, maven, npm, yarnpublic, internal, or privateFor each component root, look for APIs in this order. Stop at the first hit per API type.
openapi.yaml, openapi.json, swagger.yaml, swagger.json, **/openapi/**/*.yaml, **/openapi/**/*.json. If found, record type: openapi and the file path.**/*.proto. If found, record type: grpc and extract service names.**/*.graphql, **/schema.graphql, **/schema.ts with gql template literals. If found, record type: graphql.service:
@RestController, @GetMapping, @PostMapping, @PutMapping, @DeleteMapping, @PatchMapping, @RequestMapping, or Ktor routing { } blocks. Extract HTTP method, path, and any @Operation / @Tag Swagger annotations.router.get(, app.post(, @Controller, @Get, @Post decorators.@app.get(, @router.post(, etc.# Inferred from source — replace with a generated spec for accuracy.type: openapi with the inline definition.application.yml, application.properties, application.conf, .env*, docker-compose*.yml for service URL patterns (http://, grpc://, or keys ending in -url, -host, -endpoint). Extract service names from hostnames where possible.WebClient, RestTemplate, FeignClient, axios.create, fetch(, httpx.AsyncClient) and try to extract base URLs or service names from adjacent configuration.consumesApis entry using the format <service-name>-api.Owner
catalog-info.yaml already has spec.owner set, use those values as-is. Do not look for any other source of owner information.team-name or group:team-name)" — never infer it from CODEOWNERS, git config, or any other file.catalog-info.yaml should reuse the owner already established for the repo — do not ask again.System
catalog-info.yaml already has spec.system set, use that value for all entities that belong to the same repo.spec.system is absent from all existing entities (or there is no existing file), ask the user: "What Backstage system does this component belong to? (leave blank to omit)" — never infer or guess.spec.system entirely.Produce a single catalog-info.yaml with multiple ----separated documents in this order:
kind: Component document per discovered component rootkind: API document per provided API (one per component that exposes an API)apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: <name>
description: <one-line description from README first paragraph, or empty>
annotations:
github.com/project-slug: <org/repo>
tags: <detected language/framework tags>
spec:
type: <service|library|website|plugin>
lifecycle: <from existing file, or 'experimental' as default>
owner: <owner>
system: <from existing file if set>
providesApis:
- <name>-api # only if this component exposes an API
consumesApis:
- <consumed-service>-api # repeat for each
Omit system, consumesApis, and providesApis entirely if they would be empty.
apiVersion: backstage.io/v1alpha1
kind: API
metadata:
name: <component-name>-api
description: <type> API for <component-name>
annotations:
github.com/project-slug: <org/repo>
spec:
type: <openapi|grpc|graphql>
lifecycle: <same as owning component>
owner: <same as owning component>
definition: |
<spec file contents, or synthesised OpenAPI definition>
catalog-info.yaml does not exist: write it directly and show the full content.catalog-info.yaml already exists: show a unified diff of the proposed changes and ask the user to confirm before writing. Preserve all existing fields not covered by discovery (do not remove custom annotations, links, or other metadata the user has added).