← AWS CDK Project InitCONTENT HISTORY

Update to AWS CDK Project Init

Snapshot Sep 30, 2026 · 23:14 UTC · version 1.0.1

Collection source: not recorded for this historical snapshot.

WHAT CHANGED · RULE-BASED ANALYSIS

First saved snapshot

No earlier snapshot is available to establish a change.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "name": "init-aws-cdk-project",
  "description": "Initialize a new AWS CDK TypeScript project from the bundled Traceability starter. Use when the user asks to create, bootstrap, initialize, scaffold, or start an AWS CDK project, especially when they mention CDK TypeScript, Traceability, standardized project naming, or renaming generated files, classes, and tests to the project name.",
  "included_files": [
    {
      "relative_path": "agents/openai.yaml",
      "size_in_bytes": 362
    },
    {
      "relative_path": "assets/aws-cdk-project-init-logo.png",
      "size_in_bytes": 291582
    },
    {
      "relative_path": "assets/github-environment-develop.png",
      "size_in_bytes": 24623
    },
    {
      "relative_path": "assets/github-environment-variables.png",
      "size_in_bytes": 45230
    },
    {
      "relative_path": "scripts/init_aws_cdk_project.sh",
      "size_in_bytes": 561
    },
    {
      "relative_path": "scripts/init_repo.sh",
      "size_in_bytes": 7610
    }
  ],
  "skill_md_contents": "---\nname: init-aws-cdk-project\ndescription: Initialize a new AWS CDK TypeScript project from the bundled Traceability starter. Use when the user asks to create, bootstrap, initialize, scaffold, or start an AWS CDK project, especially when they mention CDK TypeScript, Traceability, standardized project naming, or renaming generated files, classes, and tests to the project name.\n---\n\n# AWS CDK Project Init\n\n## Workflow\n\nUse the bundled `scripts/init_repo.sh` as the source of truth. Resolve all bundled scripts relative to this `SKILL.md`; do not rely on a user-specific absolute path. The initializer downloads Traceability `v1.0.4`, created by Lars Andersson, from `zipon/Traceability`, renames template files and references to the target folder name, runs `npm install`, and creates a fresh Git repository and initial commit.\n\n1. Determine the target project directory from the user request.\n2. If the user gives only a project name, create it under the current workspace unless they clearly specify another parent.\n3. Ensure the target directory exists and is empty. If it is not empty, stop and ask before proceeding.\n4. Run `scripts/init_aws_cdk_project.sh <target-directory>`.\n5. If the command fails because of network access, rerun with escalation; the script needs GitHub and npm registry access.\n6. Verify the generated project:\n   - `rg -n \"TraceabilityStack|PinkFluffy|bin/traceability|lib/traceability|traceability.test\" <target>/bin <target>/lib <target>/test <target>/cdk.json <target>/package.json` and confirm it finds no stale template identifiers. Do not search the README for the word `Traceability`; its attribution and article link are intentional.\n   - `npm run build`\n   - `npm test -- --runInBand`\n7. Report the created path and the generated names for `bin/`, `lib/`, `test/`, class name, and stack id.\n8. Always include the optional GitHub Actions deployment note below in the final handoff. State clearly that the AWS OIDC setup is needed only to deploy automatically through GitHub Actions. Project creation, local build and test, and manual deployment with the user's own AWS credentials do not depend on it.\n9. End the final handoff with this attribution: **Created by Lars Andersson. This skill uses the Traceability starter project, also created by Lars Andersson.**\n10. Immediately after the attribution, include: **Read more about the Traceability starter project:** [Where the hell is the git project that owns this?](https://lars-andersson.medium.com/where-the-hell-is-the-git-project-that-owns-this-550bd96dd230)\n\n## Optional GitHub Actions deployment prerequisites\n\nExplain the following after creating a project. Lead with: **This setup is only required for automatic AWS deployment through GitHub Actions. It is not required to initialize, build, test, or work with the project locally.** Use the user's actual repository, AWS account, region, and GitHub Environment names when known; otherwise keep placeholders and label screenshot-derived values as examples.\n\n1. In the target AWS account, create or confirm the GitHub Actions OIDC identity provider for `https://token.actions.githubusercontent.com` with audience `sts.amazonaws.com`.\n2. Create or confirm an IAM role named exactly `GitHubActionsOIDCRole`, matching the bundled screenshot. Its trust policy must use the GitHub OIDC provider and restrict access to the intended repository and deployment environment, for example `repo:<GITHUB_OWNER>/<GITHUB_REPOSITORY>:environment:<GITHUB_ENVIRONMENT>`. Attach only the AWS permissions the project's CDK deployment requires.\n3. In the GitHub repository, open **Settings → Environments**, create the environment used by the workflow, and add these environment variables:\n   - `AWS_ACCOUNT_ID`: the 12-digit target AWS account ID; do not hard-code it in the workflow.\n   - `AWS_REGION`: the target region, for example `eu-north-1`.\n   - `AWS_ROLE_NAME`: `GitHubActionsOIDCRole`.\n4. Ensure the environment name matches the branch-to-environment mapping in `.github/workflows/deploy-ts.yml`. The supplied example uses the `develop` environment.\n5. Ensure the workflow has `permissions: id-token: write` and `contents: read`, and configure it to assume `arn:aws:iam::<AWS_ACCOUNT_ID>:role/GitHubActionsOIDCRole` with short-lived credentials.\n6. Confirm the target account and region are bootstrapped for CDK before the first automated deployment.\n\nAlways show both bundled visual references immediately after this checklist:\n\n- `assets/github-environment-develop.png` — caption it as an example GitHub **Environments** page with a `develop` environment containing three variables.\n- `assets/github-environment-variables.png` — caption it as the `develop` environment variable list containing `AWS_ACCOUNT_ID`, `AWS_REGION`, and `AWS_ROLE_NAME`. State that the account ID is intentionally redacted and that all displayed values are examples.\n\nResolve each asset path relative to this `SKILL.md`. On Codex desktop, render each image using standard Markdown image syntax with its absolute installed filesystem path so the image displays in the response. On another supported surface, attach or render the bundled asset using that surface's normal mechanism. If a surface cannot display bundled images, provide the checklist and descriptive captions without inventing an external URL.\n\nState that the workflow uses GitHub's `id-token: write` permission to request short-lived AWS credentials. Do not instruct the user to create or store long-lived `AWS_ACCESS_KEY_ID` or `AWS_SECRET_ACCESS_KEY` credentials. Do not create the provider, role, trust policy, or deployment permissions unless the user explicitly asks for AWS infrastructure changes and supplies the required account and repository details.\n\n## Credits\n\nCredit Lars Andersson as the creator of both this skill and the Traceability starter project it uses. Preserve this attribution in user-facing handoffs and redistributed versions of the skill. Include the following article link so users can learn more about the starter project: [Where the hell is the git project that owns this?](https://lars-andersson.medium.com/where-the-hell-is-the-git-project-that-owns-this-550bd96dd230)\n\n## Notes\n\n- The initializer requires Bash, Git, Node.js, npm/npx, and network access to GitHub and the npm registry.\n- Do not edit the generated project manually unless verification shows a concrete issue.\n- Do not run this inside an existing non-empty project directory without explicit user confirmation.\n- The target folder name controls the generated kebab-case file base and PascalCase stack class.\n- Expected npm audit warnings come from upstream dependencies and are not initialization failures.\n- Use Traceability `v1.0.4`; do not silently switch the initializer back to a moving branch.\n- Treat AWS account IDs, repository names, role names, regions, and environment names as deployment-specific inputs. Never copy a redacted or example screenshot value as if it were the user's real configuration.\n"
}

SHA-256: 51eeb27cbf6a08492bc9cb049a99cdac021bda0b43aab74489d2c67c6dc86319