tf-registry

Generate Terraform configuration for an AWS CodeArtifact private npm registry.

Updated Jul 4, 2026
One-click install
npx skills add https://github.com/Assamir/ai-toolkit --skill tf-registry-assamir
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tf-registry
Source: https://github.com/Assamir/ai-toolkit/tree/main/.cursor/skills/tf-registry
Command: npx skills add https://github.com/Assamir/ai-toolkit --skill tf-registry-assamir

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up a private npm registry on AWS CodeArtifact requires correctly wiring together a domain, repositories, upstream connections, KMS encryption, and IAM policies, which is error-prone when written by hand. ## Core Features & Use Cases - Terraform Generation: Produces a complete terraform/ directory with main.tf, variables.tf, outputs.tf, codeartifact.tf, iam.tf, kms.tf, and a tfvars example. - Registry Infrastructure: Creates the CodeArtifact domain, private npm repository, npm public upstream proxy, external connection, KMS key and alias, and an IAM managed policy for read/publish. - CI/CD Integration: Attaches the CodeArtifact policy to an existing GitHub Actions OIDC role for automated publishing. - Use Case: A team adopting the AWS appendix path for their AI toolkit package asks for the registry infrastructure, provides region, account ID, and domain names, and receives validated Terraform ready for plan and apply. ## Quick Start Ask the assistant to generate the Terraform for the CodeArtifact npm registry, providing your AWS region, account ID, domain name, and repository names.

Frequently Asked Questions about tf-registry

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a private npm registry with AWS CodeArtifact using Terraform?

Define a CodeArtifact domain, a private npm repository, and an upstream proxy repository with an external npm connection in Terraform. Add a KMS key for encryption and an IAM managed policy granting read and publish permissions to your CI role.

How to connect GitHub Actions to AWS CodeArtifact for npm publishing?

Reference an existing GitHub Actions OIDC role by name or ARN and attach the generated IAM managed policy for CodeArtifact read and publish operations. This avoids storing long-lived AWS credentials in GitHub secrets.

What is the difference between a CodeArtifact domain and an npm scope?

A CodeArtifact domain is an AWS resource grouping repositories, while an npm scope is a package naming prefix like @myorg. The aws codeartifact login command expects the namespace without the @ symbol.

Does the generated Terraform store AWS credentials?

No, the generated Terraform contains no hardcoded personal credentials. Authentication relies on the environment or the GitHub Actions OIDC role, and state uses an S3 backend with native locking when supported.

When should I not use CodeArtifact for npm packages?

This skill is intended only when a team consciously chooses the managed AWS appendix path, not as a default. Teams without AWS infrastructure or with simpler needs may prefer other registry hosting options.