SkillsReviewed · modulestf

Terraform Module Pull Request Fix

terraform-module-pr-fix is an AI assistant skill for Terraform maintainers repairing GitHub pull requests, but it needs companion skills and does not guarantee a mergeable result. It coordinates up to three repair rounds, produces a patch and reply drafts, and requires confirmation before pushing to the pull request's branch.

Researched 16 Nov 2026

In short.

terraform-module-pr-fix is an AI assistant skill for Terraform maintainers fixing GitHub pull requests, but a fix can qualify for pushing while existing findings remain open. Bash and jq scripts capture repository state, coordinate companion editing and review skills, restrict changes, and check confirmation parameters before pushes and replies. Completion separately requires a clean or low-severity-only local verdict and passing GitHub checks. Nothing was executed; runtime reliability, security effectiveness and repair success remain unassessed.

Researched and written by an AI model and checked by a second AI model. How it works

Covers .agents/skills/terraform-module-pr-fix/SKILL.md and its references/fix-run.jq, references/fix-run.sh, references/workflow.md and references/write-path.md at revision 2fcfd1e5a966785c05997266eca4720fd4dabb5c, together with the repository-root LICENSE. The supplied manifest identifies complete coverage of that selected folder. Referenced sibling skills, profiles, verification helpers, stage-contract implementation, wrapper-derivation implementation and tests are outside the supplied scope. No code was executed; GitHub writes, generated artifacts, Terraform results, host compatibility and security effectiveness were not tested.

The overview

What it is

The resource is the terraform-module-pr-fix skill in modulestf/modulestf. It combines an assistant instruction file with a Bash command runner, jq decision functions and two operating references. Its role is to coordinate repairs to one existing Terraform module pull request.

The version-specific source is [https://github.com/modulestf/modulestf/tree/2fcfd1e5a966785c05997266eca4720fd4dabb5c/.agents/skills/terraform-module-pr-fix]. It delegates editing and review to companion skills rather than supplying an AI model or a complete standalone repair application.

Where it fits

This is a useful candidate for maintainers who want an assistant to turn review feedback into a bounded patch while keeping GitHub writes under explicit human control. Its strongest documented features are destination checks, restricted edits, separate editing and review roles, and patch delivery when pushing is unavailable.

The push gate requires at least one resolved item and no newly introduced MEDIUM-or-higher finding fingerprint. It does not require all existing findings to disappear or directly require successful Terraform validation. The separate finished condition requires a clean or nits verdict among attributable findings and passing GitHub checks; that condition does not demonstrate deployed infrastructure correctness.

Who it is for

The intended users are Terraform module authors and maintainers handling an existing GitHub pull request. They need enough repository knowledge to choose feedback items, inspect changes and understand the destination branch and commit being approved.

Beginners can use the staged review and patch outputs to understand proposed repairs, but operating the skill still requires an agent environment, command-line dependencies and GitHub authentication. It is a weaker fit for unattended CI: bot identities and the recognized CI environment variables make the documented flow render-only.

What it can do

The normal flow captures a pull request, obtains an initial review, builds feedback items, coordinates up to three editing and review rounds, and exports the patch, item dispositions, reply drafts and final findings. Every started attempt counts toward the limit, including a failed attempt.

It can refresh supported wrapper versions.tf files and selected README documentation regions. A separate generated-only mode updates those artifacts before review, subject to profile declarations and version checks; a review at the resulting head remains a subsequent step.

When permissions and confirmations permit, it pushes to the pull request's own head branch and can post confirmed replies. Review posting is delegated to the companion review skill. Merging, force pushes, thread resolution and general pull-request metadata edits are excluded; a specifically confirmed conversation unlock is the documented exception.

Using it

What it needs

The documented flow needs an agent host capable of loading skills and starting editing and review subagents. The terraform-module-pr-review, terraform-module-maintainer and terraform-module-reviewer folders must be available in the expected sibling layout. The jq implementation imports stage-contract from the review skill, and verification, documentation generation and wrapper derivation also depend on sibling files.

The runner uses Bash, Git, GitHub CLI, jq, Perl with Digest::SHA, OpenSSL, shasum and standard Unix utilities. Terraform verification and terraform-docs generation have further companion-tool requirements. Minimum tool versions and supported agent products are not established by the supplied files.

Pushing requires an authenticated human GitHub account with suitable head-repository permissions, or qualifying maintainer access to a contributor's branch. Missing Git commit identity produces patch-only behavior. Failed state reads, unknown required fields, an invalid merge base or a bot/CI context prevent repair rounds.

How it works

Preparation records the authenticated account, pull-request state, repository permissions, comments and head commit. A separate clone checks that GitHub's reported merge base matches exactly one locally calculated merge base. Those pinned values define the repair target.

Reviewer findings and comments from the authenticated user are eligible for editing by default. Other comments require the user to name their item IDs for application. Comment origin comes from account fields, not claims made inside comment text.

Each round separates editing from review. Findings are tracked by rule, file, Terraform block address and severity rather than line number. Attribution rules determine which findings affect the local verdict; unrelated findings remain separately reported. The loop stops on a clean or nits verdict, non-actionable feedback, lack of progress, reappearing closed items or the round limit.

How to get started

Obtain the containing repository from [https://github.com/modulestf/modulestf] and retain the companion skill folders together. Revision 2fcfd1e5a966785c05997266eca4720fd4dabb5c identifies the supplied source. Copying only SKILL.md or only this folder does not provide its referenced implementations.

The documented entry command has the form bash /absolute/path/to/terraform-module-pr-fix/references/fix-run.sh prepare --repo OWNER/REPO --pr NUMBER. The helper must come from the skill checkout, outside the pull-request checkout. A user-specified output directory must already exist, be empty, use an absolute path, contain no symbolic-link path components and sit outside a Git work tree. If no output directory is specified, preparation creates a temporary output directory. An invalid user-specified directory is refused.

No installation command, supported-host matrix or successful setup transcript is supplied.

An illustrative use

An illustrative request is: Fix owner/repo#123 and prepare the changes for my approval. The documented flow first captures that pull request and produces an initial review. The user chooses which additional commenters' items may be applied, then the assistant coordinates editing, generation, bounded verification and another review.

Before a push, the user sees the patch, dispositions, destination branch, author identity, existing remote commit, proposed new commit and content digests. A new message naming the push, branch and new commit supplies the required push confirmation. Without push access, the deliverable is a patch. These are documented paths, not observed results.

Assessment & evidence

Important limits

Repair commits are restricted to regular files beneath the module root ending in .tf, .tfvars, .tftest.hcl or .md. CHANGELOG.md and wrapper paths are reserved, apart from narrowly admitted generated wrapper versions.tf updates. Fixes requiring scripts, workflow YAML, executable files or symbolic links cannot be completed through this edit rule.

Documentation generation targets existing READMEs beside changed Terraform files. Unsupported markers, symbolic links, configuration files and missing or differing version pins can leave artifacts stale or unknown. Generated-only mode does not cover Terraform formatting or all wrapper files.

Verification relies on the agent host's sandbox and runs provider code as the same operating-system user. The documentation explicitly acknowledges that such code could alter run files and their stored hashes. An emptied environment and digest checks do not establish complete filesystem isolation.

Comments are frozen for a run. Reusing an earlier review plan detects some later comment changes, but the documented GitHub review object lacks an update timestamp, so later edits to review bodies cannot be detected that way. Verification records describe initialization and validation; deployment behavior and actual infrastructure outcomes remain unassessed.

Why the controls matter

Several controls address concrete repository-maintenance mistakes. Rechecking the live head before pushing helps prevent writing against a stale pull request. Building the destination from pinned repository names limits destination substitution. Checking every repair commit catches a prohibited file even if a later commit removes it.

The normal push path requires the last reviewed tree, confirmed commit and displayed patch digest to agree. Generated-only mode has a separate content restriction. These checks make the proposed write inspectable, while confirmation still depends on the assistant following the conversational rules. Their effectiveness has not been demonstrated by execution evidence.

Related skills

The resource routes review-only requests to terraform-module-pr-review, changes in a local checkout without a pull request to terraform-module-maintainer, and merging to terraform-module-pr-merge. It names the antonbabenko/terraform-skill plugin for general Terraform questions.

These are alternatives identified by this skill's own instructions. Their implementations, compatibility and quality are not established by the supplied scope.

What the sources establish

The source basis includes SKILL.md, fix-run.sh, fix-run.jq, workflow.md and write-path.md at one repository revision, plus the root LICENSE. Together they establish the advertised purpose, documented operating sequence and inspectable decision logic.

The referenced companion implementations, profiles and test suites are not supplied. Source comments mentioning tests do not establish test results. No commands were executed, and no runtime outputs establish repair success, GitHub write behavior, verification isolation, performance or supported-host compatibility.

Access & freshness

Costs

The supplied files give no execution price, model choice, token consumption, runtime measurement or operating-cost estimate. Actual cost is unknown and depends on the chosen agent environment and any external services used.

Apache License 2.0 grants no-charge source rights under its terms. That does not establish free execution. The three-round limit bounds repair attempts, not model tokens, elapsed time or total charges.

License and reuse

The repository-root LICENSE states Apache License 2.0 and copyright 2026 Anton Babenko. It permits use, modification and redistribution subject to its conditions, including supplying the license, retaining applicable notices, marking modified files and preserving applicable NOTICE attribution when present.

The license includes a conditional patent grant, excludes a general trademark grant and provides the work without warranties. No separate skill-specific license is present in the supplied evidence.

Version and freshness

The supplied snapshot identifies commit 2fcfd1e5a966785c05997266eca4720fd4dabb5c and capture time 2026-11-16T07:55:10.082Z. This establishes the source revision described here; it does not establish a numbered skill release.

Later changes, current maintenance activity and compatibility with newer GitHub APIs, agent hosts or Terraform tools are unknown. The original master-branch address can change independently of this pinned revision.

Before adopting it

Confirm that the containing checkout includes the required companion skills, a suitable module profile and the external tools. Decide whether the task needs normal feedback repair or the narrower generated-only path.

A useful first evaluation would use a small pull request in a repository you control. Inspect the initial review and patch, distinguish existing findings from introduced ones, and examine every stale, unknown or skipped verification result before considering a write.

Check the exact destination branch, author and new commit at the gate. Treat push approval, review posting, replies and any conversation unlock as separate decisions. Evaluation outcomes and actual operating cost remain unknown until observed.

Evidence for this report

LICENSEnotice · checked 2026-11-16