Skip to content

terraform-tidy-before-import: extract from terraform-search-import#66

Open
bbasata wants to merge 14 commits intomainfrom
mitosis
Open

terraform-tidy-before-import: extract from terraform-search-import#66
bbasata wants to merge 14 commits intomainfrom
mitosis

Conversation

@bbasata
Copy link
Copy Markdown
Collaborator

@bbasata bbasata commented Apr 17, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 17, 2026

Tessl Skill Review Results

Skill Status Review Score Change
terraform/code-generation/skills/terraform-search-import ✅ PASSED 92%
terraform/code-generation/skills/terraform-tidy-before-import ✅ PASSED 92%

Detailed Review

terraform/code-generation/skills/terraform-search-import — 92% (PASSED)
  Description: 92%
    \(.key): \(.value.score)/3 - \(.value.reasoning)
    \(.key): \(.value.score)/3 - \(.value.reasoning)
    \(.key): \(.value.score)/3 - \(.value.reasoning)
    \(.key): \(.value.score)/3 - \(.value.reasoning)

    Assessment: This is a well-structured description that clearly communicates both what the skill does and when to use it. The 'Use when...' clause provides three distinct trigger scenarios. The main weakness is that the capability description could be more specific about concrete actions beyond discover and import (e.g., generating configuration blocks, updating state files).

  Content: 92%
    \(.key): \(.value.score)/3 - \(.value.reasoning)
    \(.key): \(.value.score)/3 - \(.value.reasoning)
    \(.key): \(.value.score)/3 - \(.value.reasoning)
    \(.key): \(.value.score)/3 - \(.value.reasoning)

    Assessment: This is a well-structured, highly actionable skill that provides concrete executable examples for Terraform Search and bulk import workflows. The decision tree and progressive complexity of examples are strong points. The main weakness is moderate redundancy between sections (discovery commands repeated, some obvious best practices) that could be tightened to save tokens.

Suggestions:

  • Add more specific concrete actions to the capability portion, e.g., 'generate Terraform configuration blocks, update state files, reconcile drift' to improve specificity.
  • Remove the 'Prerequisites > Discover Available List Resources' subsection since it duplicates the 'Check Provider Support First' section above it, or consolidate them into one section.
  • Remove or condense the 'Supported List Resources' section which contains no actual content beyond telling the user to run the discovery script (already covered twice).
terraform/code-generation/skills/terraform-tidy-before-import — 92% (PASSED)
  Description: 92%
    \(.key): \(.value.score)/3 - \(.value.reasoning)
    \(.key): \(.value.score)/3 - \(.value.reasoning)
    \(.key): \(.value.score)/3 - \(.value.reasoning)
    \(.key): \(.value.score)/3 - \(.value.reasoning)

    Assessment: This is a strong skill description that clearly defines a specific niche (Terraform import preparation) with concrete actions and explicit trigger conditions. The 'Use this before...' clause effectively communicates when the skill should be selected. The main weakness is that trigger term coverage could be broader to capture more natural user phrasings.

  Content: 92%
    \(.key): \(.value.score)/3 - \(.value.reasoning)
    \(.key): \(.value.score)/3 - \(.value.reasoning)
    \(.key): \(.value.score)/3 - \(.value.reasoning)
    \(.key): \(.value.score)/3 - \(.value.reasoning)

    Assessment: This is a well-structured, actionable skill that clearly guides Claude through a complex multi-step Terraform code tidying process. Its strengths are the explicit validation checkpoints, concrete before/after examples, and appropriate use of progressive disclosure. Minor verbosity in the preamble paragraphs about preserving built-in arguments could be tightened, but the domain-specific guidance is valuable and well-organized.

Suggestions:

  • Add common user-facing variations like 'terraform import', 'tf import', 'HCL cleanup', or 'infrastructure as code' to improve trigger term coverage for how users naturally phrase requests.

Checks: frontmatter validity, required fields, body structure, examples, line count.
Review score is informational — not used for pass/fail gating.

bbasata and others added 2 commits April 17, 2026 17:29
Document that terraform-tidy-before-import removes only computed attributes that are not optional, and preserves computed+optional attributes unless they are explicitly set to null.

Assisted-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
@bbasata bbasata changed the title terraform-tidy-for-import: extract from terraform-search-import terraform-tidy-before-import: extract from terraform-search-import Apr 22, 2026
@bbasata bbasata marked this pull request as ready for review April 22, 2026 01:01
@bbasata bbasata requested a review from a team as a code owner April 22, 2026 01:01
Comment on lines +19 to +20
value = null # sensitive
value_wo = null # sensitive
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious: is the # sensitive generated by Terraform?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not. It was likely generated by an agent/model that assisted in writing this. Maybe it's better to remove it.

"evals": [
{
"id": 1,
"prompt": "Tidy the generated Terraform in aws_thorough_before_cleanup.tf so it is ready for import and safe to commit. Use the default thoroughness level, keep valid import blocks intact, preserve Terraform language meta-arguments and nested language blocks, and organize the finished configuration into appropriate Terraform files before you wrap up. Keep terraform.tf in any terraform working directories for base provider configuration. Make a best effort: if the final file does not validate or does not meet all criteria, the computer should still present it as output for evaluation.",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much instruction normally goes into the prompt vs into the skill?
How does it perform if this was just Tidy the generated Terraform config in aws_thorough_before_cleanup.tf?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right on, super helpful feedback. I think this prompt needs to be lighter. Agent fatigue. Time to edit.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't seem to find a schema for this filetype?
I looked at the docs of tessl, which is used in a Github Action of this repo, and I can only find different files: https://docs.tessl.io/evaluate/evaluating-your-codebase#file-formats

How to run this eval?

Copy link
Copy Markdown
Collaborator Author

@bbasata bbasata Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Yes, spot-on observation! 😃 I took a speculative leap in this pull request.

For the eval, I chose the format described on agentskills.io. I ran it locally (WORKS ON MY MACHINE 😃) with the skill-creator skill from anthropics/skills.

It would be Really Useful to include some output, would it not? 🙃

"expected_output": "A cleaned AWS configuration as close to aws_thorough_after_cleanup.tf as possible. Expect absence of provider-defined computed attributes and top-level timeout blocks while preserving valid import blocks, lifecycle/meta-arguments, and connection timeouts.",
"files": [
"evals/files/aws_thorough_before_cleanup.tf",
"evals/files/aws_thorough_after_cleanup.tf",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As Anthropic denotes these files as input files, do we need to somehow assert that the agent (while using the skill) does not read this file? Else it might be relatively easy to get to this result 🥷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants