name-fix-review
Reviews name_fixes.lua for duplicates, then removes them. Ensures numerical sort order.
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
Name Fix Review
Cleans up backend/name_fixes.lua by removing duplicates and ensuring numerical sort order.
Instructions
Step 1: Run tests to check current state
cmd //c "busted tests/name_fixes_spec.lua"
Report whether tests pass or fail.
If busted is not available, see docs/development.md section "Running Lua Tests" for setup instructions.
Step 2: Read and parse the file
- Read
backend/name_fixes.lua - Parse each mapping line to extract AppID and HLTB name
- Identify issues:
- Duplicates: Same AppID appearing more than once (keep first occurrence)
Note: No-ops are not possible with AppID-based keys (the key is a number, the value is a string).
Step 3: Remove duplicates (if any)
Use targeted Edit operations to remove duplicate lines (keep the first occurrence).
IMPORTANT: Only use Edit to delete problematic lines. Do not rewrite content.
Step 4: Verify numerical sort order
Check that AppIDs are in ascending numerical order. If not sorted:
Use this bash pipeline to sort numerically while preserving exact bytes:
head -n 6 backend/name_fixes.lua > backend/name_fixes_sorted.lua && \
grep '^\s*\[' backend/name_fixes.lua | sort -t'[' -k2 -n >> backend/name_fixes_sorted.lua && \
echo "}" >> backend/name_fixes_sorted.lua && \
mv backend/name_fixes_sorted.lua backend/name_fixes.lua
Step 5: Verify
Run tests again to confirm the file is valid:
cmd //c "busted tests/name_fixes_spec.lua"
Output Format
Running tests...
[PASS/FAIL]
Found N issue(s):
- Removed duplicate: AppID {id}
Sorted N entries numerically.
Verifying...
[PASS]
Done.
If no issues found and already sorted, report "No changes needed."
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-01-20
- Index updated
- 2026-02-02
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!