From gomboc-community
Fixes source code violations using existing ORL rules or generates new ones. Supports Terraform, HCL/Terragrunt, CloudFormation, Bicep, Docker, Kubernetes, and Python.
How this skill is triggered — by the user, by Claude, or both
Slash command
/gomboc-community:apply-fixThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You apply fixes to source code — either by using an existing ORL rule or by generating a new one on the fly. After applying a fix, you optionally save it as a reusable rule package.
You apply fixes to source code — either by using an existing ORL rule or by generating a new one on the fly. After applying a fix, you optionally save it as a reusable rule package.
All orl commands MUST be run via Docker, mounting the current working directory into /workspace:
docker run -v "${PWD}:/workspace" gombocai/orl <command> [args...]
You receive from the diagnose skill (or directly from the user):
terraform, hcl, cloudformation-yaml, cloudformation-json, bicep, docker, kubernetes, python)When an existing rule covers the finding (identified by diagnose):
If the rule is local (e.g., in /orl-rules/final/, .orl-rules/, or .orl-fixes/), use its path directly:
Dry-run remediation to preview changes:
docker run -v "${PWD}:/workspace" gombocai/orl remediate -d --language <lang> -r <local-rule-path> <target-path>
Show the diff to the user and explain what will change.
On confirmation, apply the fix:
docker run -v "${PWD}:/workspace" gombocai/orl remediate --language <lang> -r <local-rule-path> <target-path>
Report which files were changed and what was fixed.
If the rule is in the Gomboc Rules Service, pull it first. Use the --search flag with compound queries — match by classification, resource, and language for precision:
Pull the rule:
# Best: match by classification + language
docker run -v "${PWD}:/workspace" -e "${RULE_SERVICE_TOKEN}" gombocai/orl rules pull \
--search '(and (any "<classification-name>" $.classification) (eq $.metadata.language "<lang>"))'
# Or by resource type + language
docker run -v "${PWD}:/workspace" -e "${RULE_SERVICE_TOKEN}" gombocai/orl rules pull \
--search '(and (any "<resource-type>" $.classification) (eq $.metadata.language "<lang>"))'
Dry-run remediation to preview changes:
docker run -v "${PWD}:/workspace" gombocai/orl remediate -d --language <lang> -r <pulled-rule-dir> <target-path>
Show the diff to the user and explain what will change.
On confirmation, apply the fix:
docker run -v "${PWD}:/workspace" gombocai/orl remediate --language <lang> -r <pulled-rule-dir> <target-path>
Report which files were changed and what was fixed.
When no existing rule covers the finding, generate one:
Invoke the appropriate language-*-expert skill for AST and syntax guidance:
| ORL Language | Expert Skill |
|---|---|
terraform | language-terraform-expert |
hcl | language-hcl-expert |
cloudformation-yaml | language-cloudformation-yaml-expert |
cloudformation-json | language-cloudformation-json-expert |
bicep | language-bicep-expert |
docker | language-docker-expert |
kubernetes | language-kubernetes-expert |
python | language-python-expert |
Create a temporary rule package directory in .orl-fixes/ within the project:
.orl-fixes/<rule-name>/
├── workspace/ # Copy of affected file(s) WITH the violation
├── workspace_expected/ # Copy of affected file(s) AFTER the fix
├── <rule-name>.orl # The rule (written in Step 4)
└── test.orl # Test definition (written in Step 5)
workspace/workspace_expected/ — apply the fix manually to the copyWalk the workspace to understand the tree-sitter node structure:
docker run -v "${PWD}:/workspace" gombocai/orl walk workspace --language <lang> .orl-fixes/<rule-name>/workspace
Use the output to identify the exact node types, capture names, and nesting structure for the audit query.
Create <rule-name>.orl using the tree-sitter query patterns appropriate for the language:
type: Ruleset
version: v1
metadata:
name: gomboc-ai/<rule-name>
spec:
template:
language: <orl-language-id>
audit_language: ast
rules:
- name: <descriptive-rule-name>
audit: |
<tree-sitter query>
remediation:
- command: replace|insert_after|insert_before|remove
path: <capture-name>
value: "<new value>"
Language-specific query patterns:
aResource, anAttribute, aMissingAttribute, aBlock, aMissingBlock)block, attribute, function_call nodesblock_mapping_pair, flow_node)pair, object, array)replace with template interpolation on props_bodyfrom_instruction, user_instruction, run_instruction, env_instruction, arg_instructionapiVersion/kind predicates on block_mapping_pair nodescall, import_statement, assignment, keyword_argument, decorated_definitionCritical rules:
_ (e.g., @_type)value — use flags: { indent: " " }| (literal block scalar) for multi-line values, not |- or quotesCreate test.orl:
type: Test
version: v1
metadata:
name: <rule-name>-test
spec:
rulespace: "."
cases:
- name: <Descriptive Test Name>
language: <orl-language-id>
workspace:
path: ./workspace
remediated_workspace:
path: ./workspace_expected
expected_report:
errors: []
cd .orl-fixes/<rule-name>
docker run -v "${PWD}:/workspace" gombocai/orl test .
If tests fail:
Once tests pass:
Dry-run against the user's actual code:
docker run -v "${PWD}:/workspace" gombocai/orl remediate -d --language <lang> -r .orl-fixes/<rule-name> <target-path>
Show the diff to the user.
On confirmation, apply:
docker run -v "${PWD}:/workspace" gombocai/orl remediate --language <lang> -r .orl-fixes/<rule-name> <target-path>
Report which files were changed.
Ask the user: "Save this fix as a reusable rule?"
If yes:
add-metadata skill on the rule package — pre-populate from the classification that triggered the finding:
classifications from the finding's policy namegomboc-ai/provider from the classification's gomboc-ai/providersgomboc-ai/resource from the matched resource typepush-rule to publish to the Gomboc Rules ServiceIf no:
.orl-fixes/ directory for reference.orl-fixes/<rule-name>/Before declaring a fix complete:
orl test . passes with zero failures@_name)indent flag used instead of hardcoded spaces in valuesBlocks Edit/Write/Bash actions until Claude investigates importers, data schemas, and user instructions. Improves output quality by forcing concrete facts before edits.
npx claudepluginhub gomboc-ai/gomboc-community-skills --plugin gomboc-community