CtrlK
BlogDocsLog inGet started
Tessl Logo

lower-struct-types

Lower source-language struct, union, and tuple types to LLVM 22 IR. Covers creating StructType, computing field offsets, emitting GEP for field access, packed vs. padded layouts, unions via largest-member types, passing structs by value vs. pointer, and the alloca+mem2reg pattern for struct locals.

63

Quality

73%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

Fix and improve this skill with Tessl

tessl review fix ./tiles/tessl-llvm/skills/lower-struct-types/SKILL.md
SKILL.md
Quality
Evals
Security

Quality

Content

64%Scale 1-3

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

This is a strong, highly actionable skill with excellent executable code examples covering the full spectrum of struct/union/tuple lowering to LLVM IR. Its main weaknesses are the lack of validation checkpoints in the workflow (no verification steps after creating types or emitting GEPs), some self-correcting commentary in the union section that adds confusion, and the monolithic structure that could benefit from splitting advanced topics into referenced files.

Suggestions

Clean up the union section (Step 7) — remove the self-correcting BitCast/PointerCast lines and present only the correct opaque-pointer approach

Add a validation checkpoint after type creation (e.g., verify struct layout with DataLayout, dump the module and check for errors) to strengthen the workflow

Consider splitting advanced topics (unions, recursive types, ABI-specific passing conventions) into referenced files to improve progressive disclosure

DimensionReasoningScore

Conciseness

The skill is mostly efficient with good code examples, but some sections contain unnecessary commentary (e.g., the union section has self-correcting comments like 'Actually in LLVM 22 with opaque pointers, just use the alloca ptr directly'), and the redundant BitCast/PointerCast lines before the correction add noise. The overall length is substantial but most content earns its place.

2 / 3

Actionability

Every step provides fully executable C++ code using the LLVM API with concrete types, function calls, and realistic examples. The code is copy-paste ready and covers the complete workflow from type creation through field access, passing, copying, and recursive types.

3 / 3

Workflow Clarity

The steps are clearly numbered and sequenced from type creation through increasingly complex scenarios. However, there are no explicit validation checkpoints — no verification that struct layouts are correct, no error handling for setBody calls, and no feedback loops for catching mistakes during codegen. For IR generation involving struct manipulation, some validation guidance would strengthen this.

2 / 3

Progressive Disclosure

The content is well-structured with clear section headers and a logical progression from simple to complex. However, at ~150+ lines it's a monolithic document with no references to external files for advanced topics (e.g., ABI-specific calling conventions, debug info generation). The arrays-in-structs, unions, and recursive types sections could be split out.

2 / 3

Total

9

/

12

Passed

Description

82%Scale 1-3

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

This is a technically excellent and highly specific description that clearly enumerates the concrete compiler engineering tasks covered. Its main weakness is the absence of an explicit 'Use when...' clause, which would help Claude know precisely when to select this skill. The domain-specific terminology provides strong natural trigger terms for the target audience.

Suggestions

Add an explicit 'Use when...' clause, e.g., 'Use when the user asks about lowering structs, unions, or tuples to LLVM IR, or mentions GEP, field offsets, struct layout, or aggregate type codegen.'

DimensionReasoningScore

Specificity

Lists multiple specific concrete actions: creating StructType, computing field offsets, emitting GEP for field access, packed vs. padded layouts, unions via largest-member types, passing structs by value vs. pointer, and the alloca+mem2reg pattern. These are highly specific compiler engineering tasks.

3 / 3

Completeness

The 'what' is thoroughly covered with specific actions and techniques. However, there is no explicit 'Use when...' clause or equivalent trigger guidance telling Claude when to select this skill, which caps this dimension at 2 per the rubric guidelines.

2 / 3

Trigger Term Quality

Includes strong natural keywords a compiler developer would use: 'struct', 'union', 'tuple', 'LLVM IR', 'StructType', 'GEP', 'field access', 'packed', 'padded', 'alloca', 'mem2reg'. These are the exact terms someone working on lowering aggregate types to LLVM would search for.

3 / 3

Distinctiveness Conflict Risk

This is an extremely niche topic—lowering aggregate types to LLVM 22 IR—with highly specific terminology like GEP, StructType, mem2reg, and packed layouts. It is very unlikely to conflict with other skills.

3 / 3

Total

11

/

12

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation11 / 11 Passed

Validation for skill structure

No warnings or errors.

Repository
hbarve1/tessl-llvm
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.